From b1476de1fdd0326c90a06b50b05ef1a41e7a652c Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Fri, 13 Dec 2024 17:08:03 +0800 Subject: [PATCH 1/2] http-client-java, migrate to http-specs (#5215) as before, currently code is actually generated in azure mode (still waiting for the release of Java clientcore for unbranded) report upload is temporarily disabled `EnableCadlRanchReport: false` will re-enable after https://github.com/Azure/autorest.java/issues/2986 test release (on test branch) is good --- .../http-client-java/eng/pipeline/publish.yml | 1 + .../eng/scripts/Test-Packages.ps1 | 17 +- .../http-client-generator-test/Generate.ps1 | 17 +- ...{CadlRanch-Tests.ps1 => Spector-Tests.ps1} | 12 +- .../http-client-generator-test/package.json | 9 +- .../RelativeModelInOperationAsyncClient.java | 4 +- .../RelativeModelInOperationClient.java | 4 +- .../RelativeModelInOperationsImpl.java | 4 +- .../payload/pageable/PageableAsyncClient.java | 104 + .../payload/pageable/PageableClient.java | 88 + .../pageable/PageableClientBuilder.java | 287 ++ .../implementation/PageableClientImpl.java | 427 +++ .../pageable/implementation/package-info.java | 11 + .../payload/pageable/models/User.java | 2 +- .../payload/pageable/models/package-info.java | 11 + .../azure/payload/pageable/package-info.java | 11 + .../OperationTemplatesManager.java | 275 ++ .../fluent/LroesClient.java | 193 ++ .../fluent/OperationTemplatesClient.java | 55 + .../fluent/models/ExportResultInner.java | 90 + .../fluent/models/OrderInner.java | 192 ++ .../fluent/models/package-info.java | 9 + .../fluent/package-info.java | 9 + .../implementation/ExportResultImpl.java | 32 + .../implementation/LroesClientImpl.java | 761 +++++ .../implementation/LroesImpl.java | 93 + .../OperationTemplatesClientBuilder.java | 138 + .../OperationTemplatesClientImpl.java | 288 ++ .../implementation/OrderImpl.java | 134 + .../implementation/ResourceManagerUtils.java | 195 ++ .../implementation/package-info.java | 9 + .../models/ExportRequest.java | 101 + .../models/ExportResult.java | 26 + .../operationtemplates/models/Lroes.java | 91 + .../operationtemplates/models/Order.java | 208 ++ .../models/OrderProperties.java | 145 + .../models/package-info.java | 9 + .../operationtemplates/package-info.java | 9 + .../payload/pageable/PageableAsyncClient.java | 71 +- .../java/payload/pageable/PageableClient.java | 52 +- .../pageable/PageableClientBuilder.java | 4 +- .../implementation/PageableClientImpl.java | 350 +- .../ServerDrivenPaginationsImpl.java | 151 + .../pageable/implementation/package-info.java | 2 +- .../java/payload/pageable/models/Pet.java | 105 + .../payload/pageable/models/package-info.java | 2 +- .../java/payload/pageable/package-info.java | 2 +- .../models/LinkResponse.java | 107 + .../models/LinkResponseLinks.java | 137 + .../models/package-info.java | 11 + .../versioning/removed/models/Versions.java | 4 +- ...zure-example-basic_apiview_properties.json | 14 +- ...e-payload-pageable_apiview_properties.json | 11 + .../proxy-config.json | 1 + .../reflect-config.json | 1 + .../payload-pageable_apiview_properties.json | 14 +- .../azure-payload-pageable.properties | 2 + .../example/basic/generated/BasicAction.java | 42 - .../_specs_/azure/core/lro/rpc/RpcTests.java | 6 +- .../azure/core/model/ModelClientTests.java | 2 +- .../azure/core/scalar/ScalarTests.java | 6 +- .../payload/pageable/PageableTests.java | 4 +- .../generated/PageableClientTestBase.java | 6 +- .../src/test/java/org/utils/FileUtils.java | 4 +- .../tsp/subclient.tsp | 4 +- packages/http-client-java/package-lock.json | 2838 +---------------- packages/http-client-java/package.json | 3 +- 67 files changed, 4713 insertions(+), 3314 deletions(-) rename packages/http-client-java/generator/http-client-generator-test/{CadlRanch-Tests.ps1 => Spector-Tests.ps1} (50%) create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableAsyncClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClientBuilder.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/PageableClientImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/package-info.java rename packages/http-client-java/generator/http-client-generator-test/src/main/java/{ => azure}/payload/pageable/models/User.java (98%) create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/OperationTemplatesManager.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/LroesClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/OperationTemplatesClient.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/ExportResultInner.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/OrderInner.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ExportResultImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesClientImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientBuilder.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OrderImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ResourceManagerUtils.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportRequest.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportResult.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Lroes.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Order.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/OrderProperties.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/Pet.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponse.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponseLinks.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/package-info.java create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-payload-pageable_apiview_properties.json create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/proxy-config.json create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/reflect-config.json create mode 100644 packages/http-client-java/generator/http-client-generator-test/src/main/resources/azure-payload-pageable.properties delete mode 100644 packages/http-client-java/generator/http-client-generator-test/src/samples/java/azure/example/basic/generated/BasicAction.java rename packages/http-client-java/generator/http-client-generator-test/src/test/java/{ => azure}/payload/pageable/PageableTests.java (92%) rename packages/http-client-java/generator/http-client-generator-test/src/test/java/{ => azure}/payload/pageable/generated/PageableClientTestBase.java (90%) diff --git a/packages/http-client-java/eng/pipeline/publish.yml b/packages/http-client-java/eng/pipeline/publish.yml index ef49a193bb..2a02c45d83 100644 --- a/packages/http-client-java/eng/pipeline/publish.yml +++ b/packages/http-client-java/eng/pipeline/publish.yml @@ -30,3 +30,4 @@ extends: LanguageShortName: "java" HasNugetPackages: false CadlRanchName: "@typespec/http-client-java" + EnableCadlRanchReport: false diff --git a/packages/http-client-java/eng/scripts/Test-Packages.ps1 b/packages/http-client-java/eng/scripts/Test-Packages.ps1 index 157fcde780..a343502aa8 100644 --- a/packages/http-client-java/eng/scripts/Test-Packages.ps1 +++ b/packages/http-client-java/eng/scripts/Test-Packages.ps1 @@ -29,31 +29,31 @@ try { Write-Host "Updated PATH: $env:PATH" - # cadl-ranch tests (unit tests included in java/typescript package build) + # Run Spector tests (unit tests included in java/typescript package build) try { $generatorTestDir = Join-Path $packageRoot 'generator/http-client-generator-test' Push-Location $generatorTestDir try { & ./Setup.ps1 - & ./CadlRanch-Tests.ps1 + & ./Spector-Tests.ps1 Set-Location $packageRoot - Write-Host 'Cadl ranch tests passed' + Write-Host "Spector tests passed" } finally { Pop-Location } } catch { - Write-Error "Cadl ranch tests failed: $_" + Write-Error "Spector tests failed: $_" } - # copy coverage report to artifacts dir + # Copy coverage report to artifacts directory try { $coverageReportDir = Join-Path $packageRoot 'generator/artifacts/coverage' if (!(Test-Path $coverageReportDir)) { New-Item -ItemType Directory -Path $coverageReportDir - $sourceFile = Join-Path $packageRoot 'generator/http-client-generator-test/cadl-ranch-coverage-java-standard.json' - $targetFile = Join-Path $coverageReportDir 'cadl-ranch-coverage-java-standard.json' + $sourceFile = Join-Path $packageRoot 'generator/http-client-generator-test/tsp-spector-coverage-java-standard.json' + $targetFile = Join-Path $coverageReportDir 'tsp-spector-coverage-java-standard.json' Copy-Item $sourceFile -Destination $targetFile } } catch { @@ -62,11 +62,12 @@ try { } if ($GenerationChecks) { Set-StrictMode -Version 1 - # run E2E Test for TypeSpec emitter + # Generate code for Spector tests Write-Host "Generating test projects ..." & "$packageRoot/eng/scripts/Generate.ps1" Write-Host 'Code generation is completed.' + # Check difference between code in branch, and code just generated try { Write-Host 'Checking for differences in generated code...' & "$packageRoot/eng/scripts/Check-GitChanges.ps1" diff --git a/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 b/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 index 235422fe37..89585acfdb 100644 --- a/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 +++ b/packages/http-client-java/generator/http-client-generator-test/Generate.ps1 @@ -89,7 +89,7 @@ $generateScript = { } $tspTrace = "--trace import-resolution --trace projection --trace http-client-java" - $tspCommand = "npx tsp compile $tspFile $tspOptions $tspTrace" + $tspCommand = "npx --no-install tsp compile $tspFile $tspOptions $tspTrace" $timer = [Diagnostics.Stopwatch]::StartNew() $generateOutput = Invoke-Expression $tspCommand @@ -137,28 +137,29 @@ if (Test-Path ./tsp-output) { Remove-Item ./tsp-output -Recurse -Force } -# run other local tests except partial update +# generate for other local test sources except partial update $job = Get-Item ./tsp/* -Filter "*.tsp" -Exclude "*partialupdate*" | ForEach-Object -Parallel $generateScript -ThrottleLimit $Parallelization -AsJob $job | Wait-Job -Timeout 600 $job | Receive-Job # partial update test -npx tsp compile ./tsp/partialupdate.tsp --option="@typespec/http-client-java.emitter-output-dir={project-root}/existingcode" +npx --no-install tsp compile ./tsp/partialupdate.tsp --option="@typespec/http-client-java.emitter-output-dir={project-root}/existingcode" Copy-Item -Path ./existingcode/src/main/java/tsptest/partialupdate -Destination ./src/main/java/tsptest/partialupdate -Recurse -Force Remove-Item ./existingcode -Recurse -Force -# run cadl ranch tests sources -Copy-Item -Path node_modules/@azure-tools/cadl-ranch-specs/http -Destination ./ -Recurse -Force +# generate for http-specs/azure-http-specs test sources +Copy-Item -Path node_modules/@typespec/http-specs/specs -Destination ./ -Recurse -Force +Copy-Item -Path node_modules/@azure-tools/azure-http-specs/specs -Destination ./ -Recurse -Force # remove xml tests, emitter has not supported xml model -Remove-Item ./http/payload/xml -Recurse -Force +Remove-Item ./specs/payload/xml -Recurse -Force -$job = (Get-ChildItem ./http -Include "main.tsp","old.tsp" -File -Recurse) | ForEach-Object -Parallel $generateScript -ThrottleLimit $Parallelization -AsJob +$job = (Get-ChildItem ./specs -Include "main.tsp","old.tsp" -File -Recurse) | ForEach-Object -Parallel $generateScript -ThrottleLimit $Parallelization -AsJob $job | Wait-Job -Timeout 1200 $job | Receive-Job -Remove-Item ./http -Recurse -Force +Remove-Item ./specs -Recurse -Force Copy-Item -Path ./tsp-output/*/src -Destination ./ -Recurse -Force -Exclude @("ReadmeSamples.java", "module-info.java") diff --git a/packages/http-client-java/generator/http-client-generator-test/CadlRanch-Tests.ps1 b/packages/http-client-java/generator/http-client-generator-test/Spector-Tests.ps1 similarity index 50% rename from packages/http-client-java/generator/http-client-generator-test/CadlRanch-Tests.ps1 rename to packages/http-client-java/generator/http-client-generator-test/Spector-Tests.ps1 index 871331de0a..2fce786d8c 100644 --- a/packages/http-client-java/generator/http-client-generator-test/CadlRanch-Tests.ps1 +++ b/packages/http-client-java/generator/http-client-generator-test/Spector-Tests.ps1 @@ -3,16 +3,16 @@ $ErrorActionPreference = 'Stop' Set-StrictMode -Version 3.0 -Write-Host "Running cadl ranch tests" +Write-Host "Running Spector tests" -Write-Host "Starting the test server" -npm run testserver-start +Write-Host "Starting the Spector server" +npm run spector-start Write-Host "Compile and run the tests" mvn clean test --no-transfer-progress -T 1C if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -Write-Host "Stopping the test server" -npm run testserver-stop +Write-Host "Stopping the Spector server" +npm run spector-stop -Write-Host "Finished running the cadl ranch tests" +Write-Host "Finished running the Spector tests" diff --git a/packages/http-client-java/generator/http-client-generator-test/package.json b/packages/http-client-java/generator/http-client-generator-test/package.json index 132966467b..65332739e6 100644 --- a/packages/http-client-java/generator/http-client-generator-test/package.json +++ b/packages/http-client-java/generator/http-client-generator-test/package.json @@ -7,12 +7,13 @@ "format": "npm run -s prettier -- --write", "check-format": "npm run prettier -- --check", "prettier": "prettier --config ./.prettierrc.yaml **/*.tsp", - "testserver-run": "cadl-ranch serve ./node_modules/@azure-tools/cadl-ranch-specs/http --coverageFile ./cadl-ranch-coverage-java-standard.json", - "testserver-start": "cadl-ranch server start ./node_modules/@azure-tools/cadl-ranch-specs/http --coverageFile ./cadl-ranch-coverage-java-standard.json", - "testserver-stop": "cadl-ranch server stop" + "spector-serve": "tsp-spector serve ./node_modules/@typespec/http-specs/specs ./node_modules/@azure-tools/azure-http-specs/specs --coverageFile ./tsp-spector-coverage-java-standard.json", + "spector-start": "tsp-spector server start ./node_modules/@typespec/http-specs/specs ./node_modules/@azure-tools/azure-http-specs/specs --coverageFile ./tsp-spector-coverage-java-standard.json", + "spector-stop": "tsp-spector server stop" }, "dependencies": { - "@azure-tools/cadl-ranch-specs": "0.39.5", + "@typespec/http-specs": "0.1.0-alpha.5", + "@azure-tools/azure-http-specs": "0.1.0-alpha.4", "@typespec/http-client-java": "file:/../../typespec-http-client-java-0.1.4.tgz", "@typespec/http-client-java-tests": "file:" }, diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java index 605bf84b10..56b9f268c3 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java @@ -80,7 +80,7 @@ Mono> operationWithResponse(String name, RequestOptions req } /** - * Expected query parameter: kind= "real" + * Expected query parameter: kind="real" * Expected response body: * ```json * { @@ -147,7 +147,7 @@ Mono operation(String name) { } /** - * Expected query parameter: kind= "real" + * Expected query parameter: kind="real" * Expected response body: * ```json * { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java index 23db1d465b..e7c7ef912e 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java @@ -77,7 +77,7 @@ Response operationWithResponse(String name, RequestOptions requestOp } /** - * Expected query parameter: kind= "real" + * Expected query parameter: kind="real" * Expected response body: * ```json * { @@ -141,7 +141,7 @@ OuterModel operation(String name) { } /** - * Expected query parameter: kind= "real" + * Expected query parameter: kind="real" * Expected response body: * ```json * { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java index 465147f3ac..b82198ff39 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java @@ -177,7 +177,7 @@ public Response operationWithResponse(String name, RequestOptions re } /** - * Expected query parameter: kind= "real" + * Expected query parameter: kind="real" * Expected response body: * ```json * { @@ -213,7 +213,7 @@ public Mono> discriminatorWithResponseAsync(String kind, Re } /** - * Expected query parameter: kind= "real" + * Expected query parameter: kind="real" * Expected response body: * ```json * { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableAsyncClient.java new file mode 100644 index 0000000000..83a35a3319 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableAsyncClient.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.payload.pageable; + +import azure.payload.pageable.implementation.PageableClientImpl; +import azure.payload.pageable.models.User; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; +import java.util.stream.Collectors; +import reactor.core.publisher.Flux; + +/** + * Initializes a new instance of the asynchronous PageableClient type. + */ +@ServiceClient(builder = PageableClientBuilder.class, isAsync = true) +public final class PageableAsyncClient { + @Generated + private final PageableClientImpl serviceClient; + + /** + * Initializes an instance of PageableAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PageableAsyncClient(PageableClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List users. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list(RequestOptions requestOptions) { + return this.serviceClient.listAsync(requestOptions); + } + + /** + * List users. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of User items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux list() { + // Generated convenience method for list + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = list(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(User.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClient.java new file mode 100644 index 0000000000..68c3882885 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClient.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.payload.pageable; + +import azure.payload.pageable.implementation.PageableClientImpl; +import azure.payload.pageable.models.User; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous PageableClient type. + */ +@ServiceClient(builder = PageableClientBuilder.class) +public final class PageableClient { + @Generated + private final PageableClientImpl serviceClient; + + /** + * Initializes an instance of PageableClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PageableClient(PageableClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * List users. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + return this.serviceClient.list(requestOptions); + } + + /** + * List users. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of User items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + // Generated convenience method for list + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.list(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(User.class)); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClientBuilder.java new file mode 100644 index 0000000000..9be4c17710 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/PageableClientBuilder.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.payload.pageable; + +import azure.payload.pageable.implementation.PageableClientImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +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.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +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.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the PageableClient type. + */ +@ServiceClientBuilder(serviceClients = { PageableClient.class, PageableAsyncClient.class }) +public final class PageableClientBuilder implements HttpTrait, + ConfigurationTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES = CoreUtils.getProperties("azure-payload-pageable.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the PageableClientBuilder. + */ + @Generated + public PageableClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public PageableClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the PageableClientBuilder. + */ + @Generated + public PageableClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of PageableClientImpl with the provided parameters. + * + * @return an instance of PageableClientImpl. + */ + @Generated + private PageableClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + String localEndpoint = (endpoint != null) ? endpoint : "http://localhost:3000"; + PageableClientImpl client + = new PageableClientImpl(localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), localEndpoint); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of PageableAsyncClient class. + * + * @return an instance of PageableAsyncClient. + */ + @Generated + public PageableAsyncClient buildAsyncClient() { + return new PageableAsyncClient(buildInnerClient()); + } + + /** + * Builds an instance of PageableClient class. + * + * @return an instance of PageableClient. + */ + @Generated + public PageableClient buildClient() { + return new PageableClient(buildInnerClient()); + } + + private static final ClientLogger LOGGER = new ClientLogger(PageableClientBuilder.class); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/PageableClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/PageableClientImpl.java new file mode 100644 index 0000000000..70002c4a3e --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/PageableClientImpl.java @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.payload.pageable.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +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.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.UrlBuilder; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the PageableClient type. + */ +public final class PageableClientImpl { + /** + * The proxy service used to perform REST calls. + */ + private final PageableClientService service; + + /** + * Service host. + */ + private final String endpoint; + + /** + * Gets Service host. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * 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 PageableClient client. + * + * @param endpoint Service host. + */ + public PageableClientImpl(String endpoint) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint); + } + + /** + * Initializes an instance of PageableClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint Service host. + */ + public PageableClientImpl(HttpPipeline httpPipeline, String endpoint) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint); + } + + /** + * Initializes an instance of PageableClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint Service host. + */ + public PageableClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.service = RestProxy.create(PageableClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for PageableClient to be used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PageableClient") + public interface PageableClientService { + @Get("/azure/payload/pageable") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> list(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/azure/payload/pageable") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listSync(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + } + + /** + * List users. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.list(this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * List users. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * List users. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listSync(this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * List users. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return paged collection of User items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + private List getValues(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + List values = (List) obj.get(path); + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String path) { + try { + Map obj = binaryData.toObject(Map.class); + return (String) obj.get(path); + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/package-info.java new file mode 100644 index 0000000000..e03f730af7 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the implementations for Pageable. + * Test describing pageable. + * + */ +package azure.payload.pageable.implementation; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/User.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/User.java similarity index 98% rename from packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/User.java rename to packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/User.java index 920bae6b63..b21b986ab8 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/User.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/User.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package payload.pageable.models; +package azure.payload.pageable.models; import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/package-info.java new file mode 100644 index 0000000000..ea5290238a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the data models for Pageable. + * Test describing pageable. + * + */ +package azure.payload.pageable.models; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/package-info.java new file mode 100644 index 0000000000..da31e5e394 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/payload/pageable/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the classes for Pageable. + * Test describing pageable. + * + */ +package azure.payload.pageable; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/OperationTemplatesManager.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/OperationTemplatesManager.java new file mode 100644 index 0000000000..ac8c0311ec --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/OperationTemplatesManager.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates; + +import azure.resourcemanager.operationtemplates.fluent.OperationTemplatesClient; +import azure.resourcemanager.operationtemplates.implementation.LroesImpl; +import azure.resourcemanager.operationtemplates.implementation.OperationTemplatesClientBuilder; +import azure.resourcemanager.operationtemplates.models.Lroes; +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.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +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.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to OperationTemplatesManager. + * Arm Resource Provider management API. + */ +public final class OperationTemplatesManager { + private Lroes lroes; + + private final OperationTemplatesClient clientObject; + + private OperationTemplatesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new OperationTemplatesClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of OperationTemplates service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the OperationTemplates service API instance. + */ + public static OperationTemplatesManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of OperationTemplates service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the OperationTemplates service API instance. + */ + public static OperationTemplatesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new OperationTemplatesManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create OperationTemplatesManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new OperationTemplatesManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of OperationTemplates service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the OperationTemplates service API instance. + */ + public OperationTemplatesManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("azure.resourcemanager.operationtemplates") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new OperationTemplatesManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Lroes. It manages Order. + * + * @return Resource collection API of Lroes. + */ + public Lroes lroes() { + if (this.lroes == null) { + this.lroes = new LroesImpl(clientObject.getLroes(), this); + } + return lroes; + } + + /** + * Gets wrapped service client OperationTemplatesClient providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client OperationTemplatesClient. + */ + public OperationTemplatesClient serviceClient() { + return this.clientObject; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/LroesClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/LroesClient.java new file mode 100644 index 0000000000..a3b6d81429 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/LroesClient.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.fluent; + +import azure.resourcemanager.operationtemplates.fluent.models.ExportResultInner; +import azure.resourcemanager.operationtemplates.fluent.models.OrderInner; +import azure.resourcemanager.operationtemplates.models.ExportRequest; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; + +/** + * An instance of this class provides access to all the operations defined in LroesClient. + */ +public interface LroesClient { + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OrderInner> beginCreateOrReplace(String resourceGroupName, String orderName, + OrderInner resource); + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OrderInner> beginCreateOrReplace(String resourceGroupName, String orderName, + OrderInner resource, Context context); + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OrderInner createOrReplace(String resourceGroupName, String orderName, OrderInner resource); + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OrderInner createOrReplace(String resourceGroupName, String orderName, OrderInner resource, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExportResultInner> beginExport(String resourceGroupName, String orderName, + ExportRequest body); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExportResultInner> beginExport(String resourceGroupName, String orderName, + ExportRequest body, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExportResultInner export(String resourceGroupName, String orderName, ExportRequest body); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExportResultInner export(String resourceGroupName, String orderName, ExportRequest body, Context context); + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String orderName); + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String orderName, Context context); + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String orderName); + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String orderName, Context context); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/OperationTemplatesClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/OperationTemplatesClient.java new file mode 100644 index 0000000000..523746cba2 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/OperationTemplatesClient.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for OperationTemplatesClient class. + */ +public interface OperationTemplatesClient { + /** + * Gets Service host. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Version parameter. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the LroesClient object to access its operations. + * + * @return the LroesClient object. + */ + LroesClient getLroes(); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/ExportResultInner.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/ExportResultInner.java new file mode 100644 index 0000000000..ee5caa3a21 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/ExportResultInner.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ExportResult model. + */ +@Immutable +public final class ExportResultInner implements JsonSerializable { + /* + * Content of the exported order. + */ + private String content; + + /** + * Creates an instance of ExportResultInner class. + */ + private ExportResultInner() { + } + + /** + * Get the content property: Content of the exported order. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (content() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property content in model ExportResultInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExportResultInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("content", this.content); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportResultInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExportResultInner. + */ + public static ExportResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportResultInner deserializedExportResultInner = new ExportResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("content".equals(fieldName)) { + deserializedExportResultInner.content = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportResultInner; + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/OrderInner.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/OrderInner.java new file mode 100644 index 0000000000..db538b0a12 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/OrderInner.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.fluent.models; + +import azure.resourcemanager.operationtemplates.models.OrderProperties; +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Concrete tracked resource types can be created by aliasing this type using a specific property type. + */ +@Fluent +public final class OrderInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private OrderProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of OrderInner class. + */ + public OrderInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public OrderProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the OrderInner object itself. + */ + public OrderInner withProperties(OrderProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public OrderInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OrderInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OrderInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OrderInner if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OrderInner. + */ + public static OrderInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OrderInner deserializedOrderInner = new OrderInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedOrderInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOrderInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedOrderInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedOrderInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedOrderInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedOrderInner.properties = OrderProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedOrderInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedOrderInner; + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/models/package-info.java new file mode 100644 index 0000000000..15ba9bbc45 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/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) TypeSpec Code Generator. + +/** + * Package containing the inner data models for OperationTemplates. + * Arm Resource Provider management API. + */ +package azure.resourcemanager.operationtemplates.fluent.models; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/package-info.java new file mode 100644 index 0000000000..c750d61510 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the service clients for OperationTemplates. + * Arm Resource Provider management API. + */ +package azure.resourcemanager.operationtemplates.fluent; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ExportResultImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ExportResultImpl.java new file mode 100644 index 0000000000..3170b71ca1 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ExportResultImpl.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.implementation; + +import azure.resourcemanager.operationtemplates.fluent.models.ExportResultInner; +import azure.resourcemanager.operationtemplates.models.ExportResult; + +public final class ExportResultImpl implements ExportResult { + private ExportResultInner innerObject; + + private final azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager; + + ExportResultImpl(ExportResultInner innerObject, + azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String content() { + return this.innerModel().content(); + } + + public ExportResultInner innerModel() { + return this.innerObject; + } + + private azure.resourcemanager.operationtemplates.OperationTemplatesManager manager() { + return this.serviceManager; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesClientImpl.java new file mode 100644 index 0000000000..10a213645d --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesClientImpl.java @@ -0,0 +1,761 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.implementation; + +import azure.resourcemanager.operationtemplates.fluent.LroesClient; +import azure.resourcemanager.operationtemplates.fluent.models.ExportResultInner; +import azure.resourcemanager.operationtemplates.fluent.models.OrderInner; +import azure.resourcemanager.operationtemplates.models.ExportRequest; +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +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.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.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +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 LroesClient. + */ +public final class LroesClientImpl implements LroesClient { + /** + * The proxy service used to perform REST calls. + */ + private final LroesService service; + + /** + * The service client containing this operation class. + */ + private final OperationTemplatesClientImpl client; + + /** + * Initializes an instance of LroesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LroesClientImpl(OperationTemplatesClientImpl client) { + this.service = RestProxy.create(LroesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OperationTemplatesClientLroes to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "OperationTemplatesCl") + public interface LroesService { + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.OperationTemplates/orders/{orderName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrReplace(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("orderName") String orderName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OrderInner resource, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.OperationTemplates/orders/{orderName}/export") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> export(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("orderName") String orderName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExportRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.OperationTemplates/orders/{orderName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("orderName") String orderName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String orderName, OrderInner resource) { + 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 (orderName == null) { + return Mono.error(new IllegalArgumentException("Parameter orderName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, orderName, contentType, accept, resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName, + String orderName, OrderInner resource, 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 (orderName == null) { + return Mono.error(new IllegalArgumentException("Parameter orderName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, orderName, contentType, accept, resource, context); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OrderInner> beginCreateOrReplaceAsync(String resourceGroupName, + String orderName, OrderInner resource) { + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, orderName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), OrderInner.class, + OrderInner.class, this.client.getContext()); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OrderInner> beginCreateOrReplaceAsync(String resourceGroupName, + String orderName, OrderInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrReplaceWithResponseAsync(resourceGroupName, orderName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), OrderInner.class, + OrderInner.class, context); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OrderInner> beginCreateOrReplace(String resourceGroupName, + String orderName, OrderInner resource) { + return this.beginCreateOrReplaceAsync(resourceGroupName, orderName, resource).getSyncPoller(); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OrderInner> beginCreateOrReplace(String resourceGroupName, + String orderName, OrderInner resource, Context context) { + return this.beginCreateOrReplaceAsync(resourceGroupName, orderName, resource, context).getSyncPoller(); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrReplaceAsync(String resourceGroupName, String orderName, OrderInner resource) { + return beginCreateOrReplaceAsync(resourceGroupName, orderName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrReplaceAsync(String resourceGroupName, String orderName, OrderInner resource, + Context context) { + return beginCreateOrReplaceAsync(resourceGroupName, orderName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OrderInner createOrReplace(String resourceGroupName, String orderName, OrderInner resource) { + return createOrReplaceAsync(resourceGroupName, orderName, resource).block(); + } + + /** + * Create a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OrderInner createOrReplace(String resourceGroupName, String orderName, OrderInner resource, + Context context) { + return createOrReplaceAsync(resourceGroupName, orderName, resource, context).block(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> exportWithResponseAsync(String resourceGroupName, String orderName, + ExportRequest body) { + 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 (orderName == null) { + return Mono.error(new IllegalArgumentException("Parameter orderName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.export(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, orderName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> exportWithResponseAsync(String resourceGroupName, String orderName, + ExportRequest body, 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 (orderName == null) { + return Mono.error(new IllegalArgumentException("Parameter orderName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.export(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, orderName, contentType, accept, body, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExportResultInner> beginExportAsync(String resourceGroupName, + String orderName, ExportRequest body) { + Mono>> mono = exportWithResponseAsync(resourceGroupName, orderName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExportResultInner.class, ExportResultInner.class, this.client.getContext()); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExportResultInner> beginExportAsync(String resourceGroupName, + String orderName, ExportRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = exportWithResponseAsync(resourceGroupName, orderName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExportResultInner.class, ExportResultInner.class, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExportResultInner> beginExport(String resourceGroupName, + String orderName, ExportRequest body) { + return this.beginExportAsync(resourceGroupName, orderName, body).getSyncPoller(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExportResultInner> beginExport(String resourceGroupName, + String orderName, ExportRequest body, Context context) { + return this.beginExportAsync(resourceGroupName, orderName, body, context).getSyncPoller(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono exportAsync(String resourceGroupName, String orderName, ExportRequest body) { + return beginExportAsync(resourceGroupName, orderName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono exportAsync(String resourceGroupName, String orderName, ExportRequest body, + Context context) { + return beginExportAsync(resourceGroupName, orderName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExportResultInner export(String resourceGroupName, String orderName, ExportRequest body) { + return exportAsync(resourceGroupName, orderName, body).block(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExportResultInner export(String resourceGroupName, String orderName, ExportRequest body, Context context) { + return exportAsync(resourceGroupName, orderName, body, context).block(); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String orderName) { + 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 (orderName == null) { + return Mono.error(new IllegalArgumentException("Parameter orderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, orderName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String orderName, + 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 (orderName == null) { + return Mono.error(new IllegalArgumentException("Parameter orderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, orderName, accept, context); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String orderName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, orderName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String orderName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, orderName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String orderName) { + return this.beginDeleteAsync(resourceGroupName, orderName).getSyncPoller(); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String orderName, Context context) { + return this.beginDeleteAsync(resourceGroupName, orderName, context).getSyncPoller(); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String orderName) { + return beginDeleteAsync(resourceGroupName, orderName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String orderName, Context context) { + return beginDeleteAsync(resourceGroupName, orderName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 orderName) { + deleteAsync(resourceGroupName, orderName).block(); + } + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 orderName, Context context) { + deleteAsync(resourceGroupName, orderName, context).block(); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesImpl.java new file mode 100644 index 0000000000..b528a78346 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/LroesImpl.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.implementation; + +import azure.resourcemanager.operationtemplates.fluent.LroesClient; +import azure.resourcemanager.operationtemplates.fluent.models.ExportResultInner; +import azure.resourcemanager.operationtemplates.models.ExportRequest; +import azure.resourcemanager.operationtemplates.models.ExportResult; +import azure.resourcemanager.operationtemplates.models.Lroes; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; + +public final class LroesImpl implements Lroes { + private static final ClientLogger LOGGER = new ClientLogger(LroesImpl.class); + + private final LroesClient innerClient; + + private final azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager; + + public LroesImpl(LroesClient innerClient, + azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public ExportResult export(String resourceGroupName, String orderName, ExportRequest body) { + ExportResultInner inner = this.serviceClient().export(resourceGroupName, orderName, body); + if (inner != null) { + return new ExportResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExportResult export(String resourceGroupName, String orderName, ExportRequest body, Context context) { + ExportResultInner inner = this.serviceClient().export(resourceGroupName, orderName, body, context); + if (inner != null) { + return new ExportResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String orderName) { + this.serviceClient().delete(resourceGroupName, orderName); + } + + public void delete(String resourceGroupName, String orderName, Context context) { + this.serviceClient().delete(resourceGroupName, orderName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String orderName = ResourceManagerUtils.getValueFromIdByName(id, "orders"); + if (orderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'orders'.", id))); + } + this.delete(resourceGroupName, orderName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String orderName = ResourceManagerUtils.getValueFromIdByName(id, "orders"); + if (orderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'orders'.", id))); + } + this.delete(resourceGroupName, orderName, context); + } + + private LroesClient serviceClient() { + return this.innerClient; + } + + private azure.resourcemanager.operationtemplates.OperationTemplatesManager manager() { + return this.serviceManager; + } + + public OrderImpl define(String name) { + return new OrderImpl(name, this.manager()); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientBuilder.java new file mode 100644 index 0000000000..bc9c3f5d43 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.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.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the OperationTemplatesClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { OperationTemplatesClientImpl.class }) +public final class OperationTemplatesClientBuilder { + /* + * Service host + */ + private String endpoint; + + /** + * Sets Service host. + * + * @param endpoint the endpoint value. + * @return the OperationTemplatesClientBuilder. + */ + public OperationTemplatesClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The ID of the target subscription. The value must be an UUID. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. The value must be an UUID. + * + * @param subscriptionId the subscriptionId value. + * @return the OperationTemplatesClientBuilder. + */ + public OperationTemplatesClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the OperationTemplatesClientBuilder. + */ + public OperationTemplatesClientBuilder 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 OperationTemplatesClientBuilder. + */ + public OperationTemplatesClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + 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 OperationTemplatesClientBuilder. + */ + public OperationTemplatesClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + 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 OperationTemplatesClientBuilder. + */ + public OperationTemplatesClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of OperationTemplatesClientImpl with the provided parameters. + * + * @return an instance of OperationTemplatesClientImpl. + */ + public OperationTemplatesClientImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + OperationTemplatesClientImpl client = new OperationTemplatesClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + return client; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientImpl.java new file mode 100644 index 0000000000..aa23fb9452 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OperationTemplatesClientImpl.java @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.implementation; + +import azure.resourcemanager.operationtemplates.fluent.LroesClient; +import azure.resourcemanager.operationtemplates.fluent.OperationTemplatesClient; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +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.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the OperationTemplatesClientImpl type. + */ +@ServiceClient(builder = OperationTemplatesClientBuilder.class) +public final class OperationTemplatesClientImpl implements OperationTemplatesClient { + /** + * Service host. + */ + private final String endpoint; + + /** + * Gets Service host. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Version parameter. + */ + private final String apiVersion; + + /** + * Gets Version parameter. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * 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. + */ + 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 LroesClient object to access its operations. + */ + private final LroesClient lroes; + + /** + * Gets the LroesClient object to access its operations. + * + * @return the LroesClient object. + */ + public LroesClient getLroes() { + return this.lroes; + } + + /** + * Initializes an instance of OperationTemplatesClient 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. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + */ + OperationTemplatesClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.endpoint = endpoint; + this.subscriptionId = subscriptionId; + this.apiVersion = "2023-12-01-preview"; + this.lroes = new LroesClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(HttpHeaderName.fromString(s)); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationTemplatesClientImpl.class); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OrderImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OrderImpl.java new file mode 100644 index 0000000000..ff8fba0c5a --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/OrderImpl.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.implementation; + +import azure.resourcemanager.operationtemplates.fluent.models.OrderInner; +import azure.resourcemanager.operationtemplates.models.ExportRequest; +import azure.resourcemanager.operationtemplates.models.ExportResult; +import azure.resourcemanager.operationtemplates.models.Order; +import azure.resourcemanager.operationtemplates.models.OrderProperties; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import java.util.Collections; +import java.util.Map; + +public final class OrderImpl implements Order, Order.Definition { + private OrderInner innerObject; + + private final azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager; + + OrderImpl(OrderInner innerObject, + azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public OrderProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public OrderInner innerModel() { + return this.innerObject; + } + + private azure.resourcemanager.operationtemplates.OperationTemplatesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String orderName; + + public OrderImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Order create() { + this.innerObject = serviceManager.serviceClient() + .getLroes() + .createOrReplace(resourceGroupName, orderName, this.innerModel(), Context.NONE); + return this; + } + + public Order create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getLroes() + .createOrReplace(resourceGroupName, orderName, this.innerModel(), context); + return this; + } + + OrderImpl(String name, azure.resourcemanager.operationtemplates.OperationTemplatesManager serviceManager) { + this.innerObject = new OrderInner(); + this.serviceManager = serviceManager; + this.orderName = name; + } + + public ExportResult export(ExportRequest body) { + return serviceManager.lroes().export(resourceGroupName, orderName, body); + } + + public ExportResult export(ExportRequest body, Context context) { + return serviceManager.lroes().export(resourceGroupName, orderName, body, context); + } + + public OrderImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public OrderImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public OrderImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public OrderImpl withProperties(OrderProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ResourceManagerUtils.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ResourceManagerUtils.java new file mode 100644 index 0000000000..3cc05aedfd --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/ResourceManagerUtils.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.implementation; + +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.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/implementation/package-info.java new file mode 100644 index 0000000000..fd1cf17805 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/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) TypeSpec Code Generator. + +/** + * Package containing the implementations for OperationTemplates. + * Arm Resource Provider management API. + */ +package azure.resourcemanager.operationtemplates.implementation; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportRequest.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportRequest.java new file mode 100644 index 0000000000..4a6e9a623c --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportRequest.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ExportRequest model. + */ +@Fluent +public final class ExportRequest implements JsonSerializable { + /* + * Format of the exported order. + */ + private String format; + + /** + * Creates an instance of ExportRequest class. + */ + public ExportRequest() { + } + + /** + * Get the format property: Format of the exported order. + * + * @return the format value. + */ + public String format() { + return this.format; + } + + /** + * Set the format property: Format of the exported order. + * + * @param format the format value to set. + * @return the ExportRequest object itself. + */ + public ExportRequest withFormat(String format) { + this.format = format; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (format() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property format in model ExportRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExportRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("format", this.format); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExportRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExportRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExportRequest. + */ + public static ExportRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExportRequest deserializedExportRequest = new ExportRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("format".equals(fieldName)) { + deserializedExportRequest.format = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExportRequest; + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportResult.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportResult.java new file mode 100644 index 0000000000..7b1b795b87 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/ExportResult.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.models; + +import azure.resourcemanager.operationtemplates.fluent.models.ExportResultInner; + +/** + * An immutable client-side representation of ExportResult. + */ +public interface ExportResult { + /** + * Gets the content property: Content of the exported order. + * + * @return the content value. + */ + String content(); + + /** + * Gets the inner azure.resourcemanager.operationtemplates.fluent.models.ExportResultInner object. + * + * @return the inner object. + */ + ExportResultInner innerModel(); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Lroes.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Lroes.java new file mode 100644 index 0000000000..92398ca748 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Lroes.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.models; + +import com.azure.core.util.Context; + +/** + * Resource collection API of Lroes. + */ +public interface Lroes { + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportResult export(String resourceGroupName, String orderName, ExportRequest body); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportResult export(String resourceGroupName, String orderName, ExportRequest body, Context context); + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String orderName); + + /** + * Delete a Order. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param orderName The name of the Order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String orderName, Context context); + + /** + * Delete a Order. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Order. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Order resource. + * + * @param name resource name. + * @return the first stage of the new Order definition. + */ + Order.DefinitionStages.Blank define(String name); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Order.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Order.java new file mode 100644 index 0000000000..9155502b9e --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/Order.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.models; + +import azure.resourcemanager.operationtemplates.fluent.models.OrderInner; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import java.util.Map; + +/** + * An immutable client-side representation of Order. + */ +public interface Order { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + OrderProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner azure.resourcemanager.operationtemplates.fluent.models.OrderInner object. + * + * @return the inner object. + */ + OrderInner innerModel(); + + /** + * The entirety of the Order definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The Order definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Order definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Order definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the Order definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the Order definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + Order create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Order create(Context context); + } + + /** + * The stage of the Order definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the Order definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(OrderProperties properties); + } + } + + /** + * A long-running resource action. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportResult export(ExportRequest body); + + /** + * A long-running resource action. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportResult export(ExportRequest body, Context context); +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/OrderProperties.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/OrderProperties.java new file mode 100644 index 0000000000..0719f2a717 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/OrderProperties.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package azure.resourcemanager.operationtemplates.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The OrderProperties model. + */ +@Fluent +public final class OrderProperties implements JsonSerializable { + /* + * The product ID of the order. + */ + private String productId; + + /* + * Amount of the product. + */ + private int amount; + + /* + * The provisioning state of the product. + */ + private String provisioningState; + + /** + * Creates an instance of OrderProperties class. + */ + public OrderProperties() { + } + + /** + * Get the productId property: The product ID of the order. + * + * @return the productId value. + */ + public String productId() { + return this.productId; + } + + /** + * Set the productId property: The product ID of the order. + * + * @param productId the productId value to set. + * @return the OrderProperties object itself. + */ + public OrderProperties withProductId(String productId) { + this.productId = productId; + return this; + } + + /** + * Get the amount property: Amount of the product. + * + * @return the amount value. + */ + public int amount() { + return this.amount; + } + + /** + * Set the amount property: Amount of the product. + * + * @param amount the amount value to set. + * @return the OrderProperties object itself. + */ + public OrderProperties withAmount(int amount) { + this.amount = amount; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the product. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (productId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property productId in model OrderProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OrderProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("productId", this.productId); + jsonWriter.writeIntField("amount", this.amount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OrderProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OrderProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OrderProperties. + */ + public static OrderProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OrderProperties deserializedOrderProperties = new OrderProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("productId".equals(fieldName)) { + deserializedOrderProperties.productId = reader.getString(); + } else if ("amount".equals(fieldName)) { + deserializedOrderProperties.amount = reader.getInt(); + } else if ("provisioningState".equals(fieldName)) { + deserializedOrderProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOrderProperties; + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/models/package-info.java new file mode 100644 index 0000000000..32a6c3f333 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/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) TypeSpec Code Generator. + +/** + * Package containing the data models for OperationTemplates. + * Arm Resource Provider management API. + */ +package azure.resourcemanager.operationtemplates.models; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/package-info.java new file mode 100644 index 0000000000..77cea3ac70 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/azure/resourcemanager/operationtemplates/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the classes for OperationTemplates. + * Arm Resource Provider management API. + */ +package azure.resourcemanager.operationtemplates; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableAsyncClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableAsyncClient.java index 1c3183437a..d1feec3d6e 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableAsyncClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableAsyncClient.java @@ -12,15 +12,13 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; -import java.util.stream.Collectors; -import payload.pageable.implementation.PageableClientImpl; -import payload.pageable.models.User; -import reactor.core.publisher.Flux; +import com.azure.core.util.FluxUtil; +import payload.pageable.implementation.ServerDrivenPaginationsImpl; +import payload.pageable.serverdrivenpagination.models.LinkResponse; +import reactor.core.publisher.Mono; /** * Initializes a new instance of the asynchronous PageableClient type. @@ -28,7 +26,7 @@ @ServiceClient(builder = PageableClientBuilder.class, isAsync = true) public final class PageableAsyncClient { @Generated - private final PageableClientImpl serviceClient; + private final ServerDrivenPaginationsImpl serviceClient; /** * Initializes an instance of PageableAsyncClient class. @@ -36,25 +34,29 @@ public final class PageableAsyncClient { * @param serviceClient the service client implementation. */ @Generated - PageableAsyncClient(PageableClientImpl serviceClient) { + PageableAsyncClient(ServerDrivenPaginationsImpl serviceClient) { this.serviceClient = serviceClient; } /** - * List users. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
- * You can add these to a request with {@link RequestOptions#addQueryParam} + * The link operation. *

Response Body Schema

* *
      * {@code
      * {
-     *     name: String (Required)
+     *     pets (Required): [
+     *          (Required){
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     links (Required): {
+     *         next: String (Optional)
+     *         prev: String (Optional)
+     *         first: String (Optional)
+     *         last: String (Optional)
+     *     }
      * }
      * }
      * 
@@ -64,41 +66,30 @@ public final class PageableAsyncClient { * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items as paginated response with {@link PagedFlux}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux list(RequestOptions requestOptions) { - return this.serviceClient.listAsync(requestOptions); + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> linkWithResponse(RequestOptions requestOptions) { + return this.serviceClient.linkWithResponseAsync(requestOptions); } /** - * List users. + * The link operation. * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of User items as paginated response with {@link PagedFlux}. + * @return the response body on successful completion of {@link Mono}. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux list() { - // Generated convenience method for list + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono link() { + // Generated convenience method for linkWithResponse RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = list(requestOptions); - return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { - Flux> flux = (continuationTokenParam == null) - ? pagedFluxResponse.byPage().take(1) - : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), - pagedResponse.getStatusCode(), pagedResponse.getHeaders(), - pagedResponse.getValue() - .stream() - .map(protocolMethodData -> protocolMethodData.toObject(User.class)) - .collect(Collectors.toList()), - pagedResponse.getContinuationToken(), null)); - }); + return linkWithResponse(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(LinkResponse.class)); } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClient.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClient.java index 22faa0127f..df73ffa91f 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClient.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClient.java @@ -12,11 +12,11 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; -import payload.pageable.implementation.PageableClientImpl; -import payload.pageable.models.User; +import payload.pageable.implementation.ServerDrivenPaginationsImpl; +import payload.pageable.serverdrivenpagination.models.LinkResponse; /** * Initializes a new instance of the synchronous PageableClient type. @@ -24,7 +24,7 @@ @ServiceClient(builder = PageableClientBuilder.class) public final class PageableClient { @Generated - private final PageableClientImpl serviceClient; + private final ServerDrivenPaginationsImpl serviceClient; /** * Initializes an instance of PageableClient class. @@ -32,25 +32,29 @@ public final class PageableClient { * @param serviceClient the service client implementation. */ @Generated - PageableClient(PageableClientImpl serviceClient) { + PageableClient(ServerDrivenPaginationsImpl serviceClient) { this.serviceClient = serviceClient; } /** - * List users. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
- * You can add these to a request with {@link RequestOptions#addQueryParam} + * The link operation. *

Response Body Schema

* *
      * {@code
      * {
-     *     name: String (Required)
+     *     pets (Required): [
+     *          (Required){
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     links (Required): {
+     *         next: String (Optional)
+     *         prev: String (Optional)
+     *         first: String (Optional)
+     *         last: String (Optional)
+     *     }
      * }
      * }
      * 
@@ -60,29 +64,29 @@ public final class PageableClient { * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items as paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(RequestOptions requestOptions) { - return this.serviceClient.list(requestOptions); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response linkWithResponse(RequestOptions requestOptions) { + return this.serviceClient.linkWithResponse(requestOptions); } /** - * List users. + * The link operation. * * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of User items as paginated response with {@link PagedIterable}. + * @return the response. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - // Generated convenience method for list + @ServiceMethod(returns = ReturnType.SINGLE) + public LinkResponse link() { + // Generated convenience method for linkWithResponse RequestOptions requestOptions = new RequestOptions(); - return serviceClient.list(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(User.class)); + return linkWithResponse(requestOptions).getValue().toObject(LinkResponse.class); } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClientBuilder.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClientBuilder.java index 56329b5d4f..923de32ffb 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClientBuilder.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/PageableClientBuilder.java @@ -270,7 +270,7 @@ private HttpPipeline createHttpPipeline() { */ @Generated public PageableAsyncClient buildAsyncClient() { - return new PageableAsyncClient(buildInnerClient()); + return new PageableAsyncClient(buildInnerClient().getServerDrivenPaginations()); } /** @@ -280,7 +280,7 @@ public PageableAsyncClient buildAsyncClient() { */ @Generated public PageableClient buildClient() { - return new PageableClient(buildInnerClient()); + return new PageableClient(buildInnerClient().getServerDrivenPaginations()); } private static final ClientLogger LOGGER = new ClientLogger(PageableClientBuilder.class); diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/PageableClientImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/PageableClientImpl.java index a7e8f53a79..d540ad925e 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/PageableClientImpl.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/PageableClientImpl.java @@ -4,51 +4,17 @@ package payload.pageable.implementation; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.exception.ClientAuthenticationException; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.exception.ResourceModifiedException; -import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -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.RequestOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.BinaryData; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.UrlBuilder; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import reactor.core.publisher.Mono; /** * Initializes a new instance of the PageableClient type. */ public final class PageableClientImpl { - /** - * The proxy service used to perform REST calls. - */ - private final PageableClientService service; - /** * Service host. */ @@ -91,6 +57,20 @@ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } + /** + * The ServerDrivenPaginationsImpl object to access its operations. + */ + private final ServerDrivenPaginationsImpl serverDrivenPaginations; + + /** + * Gets the ServerDrivenPaginationsImpl object to access its operations. + * + * @return the ServerDrivenPaginationsImpl object. + */ + public ServerDrivenPaginationsImpl getServerDrivenPaginations() { + return this.serverDrivenPaginations; + } + /** * Initializes an instance of PageableClient client. * @@ -122,306 +102,6 @@ public PageableClientImpl(HttpPipeline httpPipeline, SerializerAdapter serialize this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.service = RestProxy.create(PageableClientService.class, this.httpPipeline, this.getSerializerAdapter()); - } - - /** - * The interface defining all the services for PageableClient to be used by the proxy service to perform REST calls. - */ - @Host("{endpoint}") - @ServiceInterface(name = "PageableClient") - public interface PageableClientService { - @Get("/payload/pageable") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> list(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, - RequestOptions requestOptions, Context context); - - @Get("/payload/pageable") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response listSync(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, - RequestOptions requestOptions, Context context); - - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, - Context context); - - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, - Context context); - } - - /** - * List users. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.list(this.getEndpoint(), accept, requestOptions, context)) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); - } - - /** - * List users. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync(RequestOptions requestOptions) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); - return new PagedFlux<>((pageSize) -> { - RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; - if (pageSize != null) { - requestOptionsLocal.addRequestCallback(requestLocal -> { - UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); - urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); - requestLocal.setUrl(urlBuilder.toString()); - }); - } - return listSinglePageAsync(requestOptionsLocal); - }, (nextLink, pageSize) -> { - RequestOptions requestOptionsLocal = new RequestOptions(); - requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); - if (pageSize != null) { - requestOptionsLocal.addRequestCallback(requestLocal -> { - UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); - urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); - requestLocal.setUrl(urlBuilder.toString()); - }); - } - return listNextSinglePageAsync(nextLink, requestOptionsLocal); - }); - } - - /** - * List users. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(RequestOptions requestOptions) { - final String accept = "application/json"; - Response res = service.listSync(this.getEndpoint(), accept, requestOptions, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); - } - - /** - * List users. - *

Query Parameters

- * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoThe maximum number of result items per page.
- * You can add these to a request with {@link RequestOptions#addQueryParam} - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     * }
-     * }
-     * 
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(RequestOptions requestOptions) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); - return new PagedIterable<>((pageSize) -> { - RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; - if (pageSize != null) { - requestOptionsLocal.addRequestCallback(requestLocal -> { - UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); - urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); - requestLocal.setUrl(urlBuilder.toString()); - }); - } - return listSinglePage(requestOptionsLocal); - }, (nextLink, pageSize) -> { - RequestOptions requestOptionsLocal = new RequestOptions(); - requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); - if (pageSize != null) { - requestOptionsLocal.addRequestCallback(requestLocal -> { - UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); - urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); - requestLocal.setUrl(urlBuilder.toString()); - }); - } - return listNextSinglePage(nextLink, requestOptionsLocal); - }); - } - - /** - * Get the next page of items. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     * }
-     * }
-     * 
- * - * @param nextLink The URL to get the next list of items. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); - } - - /** - * Get the next page of items. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     name: String (Required)
-     * }
-     * }
-     * 
- * - * @param nextLink The URL to get the next list of items. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return paged collection of User items along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, RequestOptions requestOptions) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); - } - - private List getValues(BinaryData binaryData, String path) { - try { - Map obj = binaryData.toObject(Map.class); - List values = (List) obj.get(path); - return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); - } catch (RuntimeException e) { - return null; - } - } - - private String getNextLink(BinaryData binaryData, String path) { - try { - Map obj = binaryData.toObject(Map.class); - return (String) obj.get(path); - } catch (RuntimeException e) { - return null; - } + this.serverDrivenPaginations = new ServerDrivenPaginationsImpl(this); } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java new file mode 100644 index 0000000000..a02e2a572e --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/ServerDrivenPaginationsImpl.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package payload.pageable.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +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.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ServerDrivenPaginations. + */ +public final class ServerDrivenPaginationsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final ServerDrivenPaginationsService service; + + /** + * The service client containing this operation class. + */ + private final PageableClientImpl client; + + /** + * Initializes an instance of ServerDrivenPaginationsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServerDrivenPaginationsImpl(PageableClientImpl client) { + this.service = RestProxy.create(ServerDrivenPaginationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for PageableClientServerDrivenPaginations to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "PageableClientServer") + public interface ServerDrivenPaginationsService { + @Get("/payload/pageable/server-driven-pagination/link") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> link(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/payload/pageable/server-driven-pagination/link") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response linkSync(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + } + + /** + * The link operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     pets (Required): [
+     *          (Required){
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     links (Required): {
+     *         next: String (Optional)
+     *         prev: String (Optional)
+     *         first: String (Optional)
+     *         last: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> linkWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.link(this.client.getEndpoint(), accept, requestOptions, context)); + } + + /** + * The link operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     pets (Required): [
+     *          (Required){
+     *             id: String (Required)
+     *             name: String (Required)
+     *         }
+     *     ]
+     *     links (Required): {
+     *         next: String (Optional)
+     *         prev: String (Optional)
+     *         first: String (Optional)
+     *         last: String (Optional)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response linkWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.linkSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/package-info.java index af1a7908b1..21fdeab777 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/implementation/package-info.java @@ -5,7 +5,7 @@ /** * * Package containing the implementations for Pageable. - * Test describing pageable. + * Test for pageable payload. * */ package payload.pageable.implementation; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/Pet.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/Pet.java new file mode 100644 index 0000000000..eb1cd346b7 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/Pet.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package payload.pageable.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Pet model. + */ +@Immutable +public final class Pet implements JsonSerializable { + /* + * The id property. + */ + @Generated + private final String id; + + /* + * The name property. + */ + @Generated + private final String name; + + /** + * Creates an instance of Pet class. + * + * @param id the id value to set. + * @param name the name value to set. + */ + @Generated + private Pet(String id, String name) { + this.id = id; + this.name = name; + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Pet from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Pet if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Pet. + */ + @Generated + public static Pet fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + String name = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("name".equals(fieldName)) { + name = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new Pet(id, name); + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/package-info.java index cdd8bd0725..c8d9bde6ec 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/models/package-info.java @@ -5,7 +5,7 @@ /** * * Package containing the data models for Pageable. - * Test describing pageable. + * Test for pageable payload. * */ package payload.pageable.models; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/package-info.java index 18e1f23a24..7ca0948654 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/package-info.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/package-info.java @@ -5,7 +5,7 @@ /** * * Package containing the classes for Pageable. - * Test describing pageable. + * Test for pageable payload. * */ package payload.pageable; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponse.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponse.java new file mode 100644 index 0000000000..d2311b73ba --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponse.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package payload.pageable.serverdrivenpagination.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import payload.pageable.models.Pet; + +/** + * The LinkResponse model. + */ +@Immutable +public final class LinkResponse implements JsonSerializable { + /* + * The pets property. + */ + @Generated + private final List pets; + + /* + * The links property. + */ + @Generated + private final LinkResponseLinks links; + + /** + * Creates an instance of LinkResponse class. + * + * @param pets the pets value to set. + * @param links the links value to set. + */ + @Generated + private LinkResponse(List pets, LinkResponseLinks links) { + this.pets = pets; + this.links = links; + } + + /** + * Get the pets property: The pets property. + * + * @return the pets value. + */ + @Generated + public List getPets() { + return this.pets; + } + + /** + * Get the links property: The links property. + * + * @return the links value. + */ + @Generated + public LinkResponseLinks getLinks() { + return this.links; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("pets", this.pets, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("links", this.links); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LinkResponse. + */ + @Generated + public static LinkResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List pets = null; + LinkResponseLinks links = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("pets".equals(fieldName)) { + pets = reader.readArray(reader1 -> Pet.fromJson(reader1)); + } else if ("links".equals(fieldName)) { + links = LinkResponseLinks.fromJson(reader); + } else { + reader.skipChildren(); + } + } + return new LinkResponse(pets, links); + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponseLinks.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponseLinks.java new file mode 100644 index 0000000000..e2b4673b81 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/LinkResponseLinks.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package payload.pageable.serverdrivenpagination.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The LinkResponseLinks model. + */ +@Immutable +public final class LinkResponseLinks implements JsonSerializable { + /* + * The next property. + */ + @Generated + private String next; + + /* + * The prev property. + */ + @Generated + private String prev; + + /* + * The first property. + */ + @Generated + private String first; + + /* + * The last property. + */ + @Generated + private String last; + + /** + * Creates an instance of LinkResponseLinks class. + */ + @Generated + private LinkResponseLinks() { + } + + /** + * Get the next property: The next property. + * + * @return the next value. + */ + @Generated + public String getNext() { + return this.next; + } + + /** + * Get the prev property: The prev property. + * + * @return the prev value. + */ + @Generated + public String getPrev() { + return this.prev; + } + + /** + * Get the first property: The first property. + * + * @return the first value. + */ + @Generated + public String getFirst() { + return this.first; + } + + /** + * Get the last property: The last property. + * + * @return the last value. + */ + @Generated + public String getLast() { + return this.last; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("next", this.next); + jsonWriter.writeStringField("prev", this.prev); + jsonWriter.writeStringField("first", this.first); + jsonWriter.writeStringField("last", this.last); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkResponseLinks from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkResponseLinks if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LinkResponseLinks. + */ + @Generated + public static LinkResponseLinks fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinkResponseLinks deserializedLinkResponseLinks = new LinkResponseLinks(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("next".equals(fieldName)) { + deserializedLinkResponseLinks.next = reader.getString(); + } else if ("prev".equals(fieldName)) { + deserializedLinkResponseLinks.prev = reader.getString(); + } else if ("first".equals(fieldName)) { + deserializedLinkResponseLinks.first = reader.getString(); + } else if ("last".equals(fieldName)) { + deserializedLinkResponseLinks.last = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLinkResponseLinks; + }); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/package-info.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/package-info.java new file mode 100644 index 0000000000..c88442bcae --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/payload/pageable/serverdrivenpagination/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the data models for Pageable. + * Test for pageable payload. + * + */ +package payload.pageable.serverdrivenpagination.models; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/versioning/removed/models/Versions.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/versioning/removed/models/Versions.java index a7b05fb3ff..9c1ad1685f 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/versioning/removed/models/Versions.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/versioning/removed/models/Versions.java @@ -9,7 +9,7 @@ */ public enum Versions { /** - * The original version v1. + * The version v1. */ V1("v1"), @@ -19,7 +19,7 @@ public enum Versions { V2PREVIEW("v2preview"), /** - * The latest version v2. + * The version v2. */ V2("v2"); diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-example-basic_apiview_properties.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-example-basic_apiview_properties.json index 7f357179d6..bfdc0a71ff 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-example-basic_apiview_properties.json +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-example-basic_apiview_properties.json @@ -1,13 +1,13 @@ { "flavor": "Azure", "CrossLanguageDefinitionId": { - "azure.example.basic.AzureExampleAsyncClient": "Client.AzureExampleClient", - "azure.example.basic.AzureExampleAsyncClient.basicAction": "Client.AzureExampleClient.basicAction", - "azure.example.basic.AzureExampleAsyncClient.basicActionWithResponse": "Client.AzureExampleClient.basicAction", - "azure.example.basic.AzureExampleClient": "Client.AzureExampleClient", - "azure.example.basic.AzureExampleClient.basicAction": "Client.AzureExampleClient.basicAction", - "azure.example.basic.AzureExampleClient.basicActionWithResponse": "Client.AzureExampleClient.basicAction", - "azure.example.basic.AzureExampleClientBuilder": "Client.AzureExampleClient", + "azure.example.basic.AzureExampleAsyncClient": "AzureExampleBasicClient.AzureExampleClient", + "azure.example.basic.AzureExampleAsyncClient.basicAction": "AzureExampleBasicClient.AzureExampleClient.basicAction", + "azure.example.basic.AzureExampleAsyncClient.basicActionWithResponse": "AzureExampleBasicClient.AzureExampleClient.basicAction", + "azure.example.basic.AzureExampleClient": "AzureExampleBasicClient.AzureExampleClient", + "azure.example.basic.AzureExampleClient.basicAction": "AzureExampleBasicClient.AzureExampleClient.basicAction", + "azure.example.basic.AzureExampleClient.basicActionWithResponse": "AzureExampleBasicClient.AzureExampleClient.basicAction", + "azure.example.basic.AzureExampleClientBuilder": "AzureExampleBasicClient.AzureExampleClient", "azure.example.basic.models.ActionRequest": "_Specs_.Azure.Example.Basic.ActionRequest", "azure.example.basic.models.ActionResponse": "_Specs_.Azure.Example.Basic.ActionResponse", "azure.example.basic.models.Enum": "_Specs_.Azure.Example.Basic.Enum", diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-payload-pageable_apiview_properties.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-payload-pageable_apiview_properties.json new file mode 100644 index 0000000000..bd89a3061c --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/azure-payload-pageable_apiview_properties.json @@ -0,0 +1,11 @@ +{ + "flavor": "Azure", + "CrossLanguageDefinitionId": { + "azure.payload.pageable.PageableAsyncClient": "_Specs_.Azure.Payload.Pageable", + "azure.payload.pageable.PageableAsyncClient.list": "_Specs_.Azure.Payload.Pageable.list", + "azure.payload.pageable.PageableClient": "_Specs_.Azure.Payload.Pageable", + "azure.payload.pageable.PageableClient.list": "_Specs_.Azure.Payload.Pageable.list", + "azure.payload.pageable.PageableClientBuilder": "_Specs_.Azure.Payload.Pageable", + "azure.payload.pageable.models.User": "_Specs_.Azure.Payload.Pageable.User" + } +} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/proxy-config.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/proxy-config.json new file mode 100644 index 0000000000..862a50ed68 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/proxy-config.json @@ -0,0 +1 @@ +[["azure.resourcemanager.operationtemplates.implementation.LroesClientImpl$LroesService"]] \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/reflect-config.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/reflect-config.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-operationtemplates-generated/reflect-config.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json index 27166da5e3..558c02a0ef 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/META-INF/payload-pageable_apiview_properties.json @@ -1,11 +1,15 @@ { "flavor": "Azure", "CrossLanguageDefinitionId": { - "payload.pageable.PageableAsyncClient": "Payload.Pageable", - "payload.pageable.PageableAsyncClient.list": "Payload.Pageable.list", - "payload.pageable.PageableClient": "Payload.Pageable", - "payload.pageable.PageableClient.list": "Payload.Pageable.list", + "payload.pageable.PageableAsyncClient": "null", + "payload.pageable.PageableAsyncClient.link": "Payload.Pageable.ServerDrivenPagination.link", + "payload.pageable.PageableAsyncClient.linkWithResponse": "Payload.Pageable.ServerDrivenPagination.link", + "payload.pageable.PageableClient": "null", + "payload.pageable.PageableClient.link": "Payload.Pageable.ServerDrivenPagination.link", + "payload.pageable.PageableClient.linkWithResponse": "Payload.Pageable.ServerDrivenPagination.link", "payload.pageable.PageableClientBuilder": "Payload.Pageable", - "payload.pageable.models.User": "Payload.Pageable.User" + "payload.pageable.models.Pet": "Payload.Pageable.Pet", + "payload.pageable.serverdrivenpagination.models.LinkResponse": "Payload.Pageable.ServerDrivenPagination.link.Response.anonymous", + "payload.pageable.serverdrivenpagination.models.LinkResponseLinks": "Payload.Pageable.ServerDrivenPagination.link.Response.links.anonymous" } } diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/resources/azure-payload-pageable.properties b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/azure-payload-pageable.properties new file mode 100644 index 0000000000..ca812989b4 --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/resources/azure-payload-pageable.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/samples/java/azure/example/basic/generated/BasicAction.java b/packages/http-client-java/generator/http-client-generator-test/src/samples/java/azure/example/basic/generated/BasicAction.java deleted file mode 100644 index 87c29de9ba..0000000000 --- a/packages/http-client-java/generator/http-client-generator-test/src/samples/java/azure/example/basic/generated/BasicAction.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package azure.example.basic.generated; - -import azure.example.basic.AzureExampleClient; -import azure.example.basic.AzureExampleClientBuilder; -import azure.example.basic.models.ActionRequest; -import azure.example.basic.models.ActionResponse; -import azure.example.basic.models.Enum; -import azure.example.basic.models.Model; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -public class BasicAction { - public static void main(String[] args) { - AzureExampleClient azureExampleClient - = new AzureExampleClientBuilder().endpoint("http://localhost:3000").buildClient(); - // BEGIN:azure.example.basic.generated.basicaction.basicaction - ActionResponse response = azureExampleClient.basicAction("query", "header", - new ActionRequest("text") - .setModelProperty( - new Model().setInt32Property(1).setFloat32Property(1.5D).setEnumProperty(Enum.ENUM_VALUE1)) - .setArrayProperty(Arrays.asList("item")) - .setRecordProperty(mapOf("record", "value"))); - // END:azure.example.basic.generated.basicaction.basicaction - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/lro/rpc/RpcTests.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/lro/rpc/RpcTests.java index e41c531004..449c3ef2ca 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/lro/rpc/RpcTests.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/lro/rpc/RpcTests.java @@ -5,8 +5,6 @@ import _specs_.azure.core.lro.rpc.models.GenerationOptions; import _specs_.azure.core.lro.rpc.models.GenerationResult; -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollOperationDetails; import com.azure.core.util.polling.PollResponse; @@ -16,9 +14,7 @@ public class RpcTests { - private final RpcClient client - = new RpcClientBuilder().httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)) - .buildClient(); + private final RpcClient client = new RpcClientBuilder().buildClient(); @Test public void testRpc() { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/model/ModelClientTests.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/model/ModelClientTests.java index 0ed95d8f3e..dd964907f6 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/model/ModelClientTests.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/model/ModelClientTests.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test; public class ModelClientTests { - ModelClient client = new ModelClientBuilder().buildClient(); + private final ModelClient client = new ModelClientBuilder().buildClient(); @Test public void get() { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/scalar/ScalarTests.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/scalar/ScalarTests.java index c4870f7c36..2da45de11f 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/scalar/ScalarTests.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/_specs_/azure/core/scalar/ScalarTests.java @@ -4,17 +4,13 @@ package _specs_.azure.core.scalar; import _specs_.azure.core.scalar.models.AzureLocationModel; -import com.azure.core.http.policy.HttpLogDetailLevel; -import com.azure.core.http.policy.HttpLogOptions; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class ScalarTests { private final static String LOCATION_REGION = "eastus"; - private final ScalarClient client - = new ScalarClientBuilder().httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)) - .buildClient(); + private final ScalarClient client = new ScalarClientBuilder().buildClient(); @Test public void testGet() { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/PageableTests.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/payload/pageable/PageableTests.java similarity index 92% rename from packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/PageableTests.java rename to packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/payload/pageable/PageableTests.java index 5508096709..0732efa4df 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/PageableTests.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/payload/pageable/PageableTests.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package payload.pageable; +package azure.payload.pageable; +import azure.payload.pageable.models.User; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.rest.PagedIterable; @@ -10,7 +11,6 @@ import java.util.HashSet; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import payload.pageable.models.User; public class PageableTests { diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/generated/PageableClientTestBase.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/payload/pageable/generated/PageableClientTestBase.java similarity index 90% rename from packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/generated/PageableClientTestBase.java rename to packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/payload/pageable/generated/PageableClientTestBase.java index a513e45ce1..b9e8543f58 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/payload/pageable/generated/PageableClientTestBase.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/azure/payload/pageable/generated/PageableClientTestBase.java @@ -2,19 +2,19 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package payload.pageable.generated; +package azure.payload.pageable.generated; // The Java test files under 'generated' package are generated for your reference. // If you wish to modify these files, please copy them out of the 'generated' package, and modify there. // See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. +import azure.payload.pageable.PageableClient; +import azure.payload.pageable.PageableClientBuilder; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.test.TestMode; import com.azure.core.test.TestProxyTestBase; import com.azure.core.util.Configuration; -import payload.pageable.PageableClient; -import payload.pageable.PageableClientBuilder; class PageableClientTestBase extends TestProxyTestBase { protected PageableClient pageableClient; diff --git a/packages/http-client-java/generator/http-client-generator-test/src/test/java/org/utils/FileUtils.java b/packages/http-client-java/generator/http-client-generator-test/src/test/java/org/utils/FileUtils.java index 0bfb2107e0..f002da96f9 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/test/java/org/utils/FileUtils.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/test/java/org/utils/FileUtils.java @@ -14,11 +14,11 @@ private FileUtils() { } public static Path getJpgFile() { - return Paths.get("node_modules/@azure-tools/cadl-ranch-specs/assets/image.jpg"); + return Paths.get("node_modules/@typespec/http-specs/assets/image.jpg"); } public static Path getPngFile() { - return Paths.get("node_modules/@azure-tools/cadl-ranch-specs/assets/image.png"); + return Paths.get("node_modules/@typespec/http-specs/assets/image.png"); } public static byte[] getJpgBytes() { diff --git a/packages/http-client-java/generator/http-client-generator-test/tsp/subclient.tsp b/packages/http-client-java/generator/http-client-generator-test/tsp/subclient.tsp index 417bed2032..b255ff4b64 100644 --- a/packages/http-client-java/generator/http-client-generator-test/tsp/subclient.tsp +++ b/packages/http-client-java/generator/http-client-generator-test/tsp/subclient.tsp @@ -1,14 +1,14 @@ import "@typespec/http"; -import "@azure-tools/cadl-ranch-expect"; +import "@typespec/spector"; import "@azure-tools/typespec-client-generator-core"; using TypeSpec.Http; +using TypeSpec.Spector; using Azure.ClientGenerator.Core; /** * Describe client with `@clientInitialization` */ -@supportedBy("dpg") @scenarioService("/client/initialization/basic") @scenario @scenarioDoc(""" diff --git a/packages/http-client-java/package-lock.json b/packages/http-client-java/package-lock.json index 89fb0ef4ae..5bbcfa2a3d 100644 --- a/packages/http-client-java/package-lock.json +++ b/packages/http-client-java/package-lock.json @@ -15,7 +15,6 @@ "lodash": "~4.17.21" }, "devDependencies": { - "@azure-tools/cadl-ranch": "0.16.1", "@azure-tools/typespec-autorest": "0.49.0", "@azure-tools/typespec-azure-core": "0.49.0", "@azure-tools/typespec-azure-resource-manager": "0.49.0", @@ -90,192 +89,6 @@ "node": ">=10.12.0" } }, - "node_modules/@azure-tools/cadl-ranch": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch/-/cadl-ranch-0.16.1.tgz", - "integrity": "sha512-4tyd+2GDsZjkcsiB14T2m5imkPCokJkFLKrPe0mINb5Z6DVVzk/2BkhId//zk9KinpYL0ThG9ewM1ZeJ0jnoeg==", - "dev": true, - "dependencies": { - "@azure-tools/cadl-ranch-api": "~0.5.0", - "@azure-tools/cadl-ranch-coverage-sdk": "~0.9.0", - "@azure-tools/cadl-ranch-expect": "~0.15.6", - "@azure/identity": "^4.4.1", - "@types/js-yaml": "^4.0.5", - "@typespec/compiler": "~0.62.0", - "@typespec/http": "~0.62.0", - "@typespec/rest": "~0.62.0", - "ajv": "8.17.1", - "axios": "^1.7.5", - "body-parser": "^1.20.3", - "deep-equal": "^2.2.0", - "express": "^4.20.0", - "express-promise-router": "^4.1.1", - "form-data": "^3.0.1", - "glob": "^11.0.0", - "jackspeak": "4.0.1", - "js-yaml": "^4.1.0", - "morgan": "^1.10.0", - "multer": "^1.4.5-lts.1", - "node-fetch": "^3.3.1", - "picocolors": "^1.0.0", - "source-map-support": "^0.5.21", - "winston": "^3.14.0", - "xml2js": "^0.6.2", - "yargs": "^17.7.1" - }, - "bin": { - "cadl-ranch": "cmd/cli.mjs" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch-api": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-api/-/cadl-ranch-api-0.5.0.tgz", - "integrity": "sha512-awgLMCWGy4VxIJ5n9SJuTH0WfZFsUv5kYffIYfvGPtV3NIkCwO1u39Polb4BBR8GLELWjRuHMxYsmhwpTzRBpw==", - "dev": true, - "dependencies": { - "body-parser": "^1.20.3", - "deep-equal": "^2.2.0", - "express": "^4.20.0", - "express-promise-router": "^4.1.1", - "glob": "^11.0.0", - "morgan": "^1.10.0", - "multer": "^1.4.5-lts.1", - "picocolors": "^1.0.0", - "winston": "^3.14.0", - "xml-formatter": "^3.6.3", - "xml2js": "^0.6.2", - "yargs": "^17.7.1" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch-coverage-sdk": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-coverage-sdk/-/cadl-ranch-coverage-sdk-0.9.0.tgz", - "integrity": "sha512-u4WU5U6Ps6oct9E3FiBdORMsSiqpV1VBFeiqH4ZTXCV3A245n3GzznRexZ5bDuRlRY4ea2BVvKrVnemaYaLp+w==", - "dev": true, - "dependencies": { - "@azure/identity": "^4.4.1", - "@azure/storage-blob": "^12.24.0", - "@types/node": "^22.1.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch/node_modules/@azure-tools/cadl-ranch-expect": { - "version": "0.15.6", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-expect/-/cadl-ranch-expect-0.15.6.tgz", - "integrity": "sha512-t601oyRwiSy/Nbbro5A7OHZSKsVGxGRJMPnd4X80dYetTBinUHXS2+cVx+fVQlUmb/4Ru/qNOvG0jtTJY9/XHw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.62.0", - "@typespec/http": "~0.62.0", - "@typespec/rest": "~0.62.0", - "@typespec/versioning": "~0.62.0" - } - }, - "node_modules/@azure-tools/cadl-ranch/node_modules/@typespec/compiler": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.62.0.tgz", - "integrity": "sha512-RfKJ/rF2Wjxu7dl74oJE8yEfSkeL7NopFlyJ4dW1JQXpRN2IOJYPxas12qZA6H9ZEIB8rBjyrHNxJSQbvn/UDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "~7.25.7", - "ajv": "~8.17.1", - "change-case": "~5.4.4", - "globby": "~14.0.2", - "mustache": "~4.2.0", - "picocolors": "~1.1.0", - "prettier": "~3.3.3", - "prompts": "~2.4.2", - "semver": "^7.6.3", - "temporal-polyfill": "^0.2.5", - "vscode-languageserver": "~9.0.1", - "vscode-languageserver-textdocument": "~1.0.12", - "yaml": "~2.5.1", - "yargs": "~17.7.2" - }, - "bin": { - "tsp": "cmd/tsp.js", - "tsp-server": "cmd/tsp-server.js" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch/node_modules/@typespec/http": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.62.0.tgz", - "integrity": "sha512-6H9y9e32lb2s76MMy29ITCwSZNG42sa/qWthiByUvfbTEXMpu5a1fQHNj7RXg+xmDKmVIHv3gAfjGPAWfXhkaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.62.0", - "@typespec/streams": "~0.62.0" - }, - "peerDependenciesMeta": { - "@typespec/streams": { - "optional": true - } - } - }, - "node_modules/@azure-tools/cadl-ranch/node_modules/@typespec/rest": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.62.0.tgz", - "integrity": "sha512-ci5UjelEKFwsPTdpgysoUoDCcw02EnbG4GBuYJdR5mRrFCBZMxrbro+OJLgSN3g/TORSsWlW7dEOWLfbyrmlZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.62.0", - "@typespec/http": "~0.62.0" - } - }, - "node_modules/@azure-tools/cadl-ranch/node_modules/@typespec/versioning": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.62.0.tgz", - "integrity": "sha512-M5KTCVH5fBniZU8eQlw+NV13vAmPr58HyBLDIyxeOuV+SHNlx+f+qanUEDIPaJheKlaSSNTEZKsDhs83/iIMMA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.62.0" - } - }, - "node_modules/@azure-tools/cadl-ranch/node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/@azure-tools/codegen": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/@azure-tools/codegen/-/codegen-2.10.0.tgz", @@ -393,244 +206,6 @@ "@typespec/versioning": "~0.63.0" } }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", - "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "dev": true, - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz", - "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.11.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-client": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz", - "integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.9.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", - "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-http-compat": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz", - "integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.3.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-lro": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", - "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.2.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-paging": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz", - "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", - "dev": true, - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.18.0.tgz", - "integrity": "sha512-QSoGUp4Eq/gohEFNJaUOwTN7BCc2nHTjjbm75JT0aD7W65PWM1H/tItz0GsABn22uaKyGxiMhWQLt2r+FGU89Q==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.8.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz", - "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", - "dev": true, - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz", - "integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-xml": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.4.4.tgz", - "integrity": "sha512-J4FYAqakGXcbfeZjwjMzjNcpcH4E+JtEBv+xcV1yL0Ydn/6wbQfeFKTCHh9wttAi0lmajHw7yBbHPRG+YHckZQ==", - "dev": true, - "dependencies": { - "fast-xml-parser": "^4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/identity": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.5.0.tgz", - "integrity": "sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-rest-pipeline": "^1.17.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^3.26.1", - "@azure/msal-node": "^2.15.0", - "events": "^3.0.0", - "jws": "^4.0.0", - "open": "^8.0.0", - "stoppable": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", - "integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==", - "dev": true, - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/msal-browser": { - "version": "3.27.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.27.0.tgz", - "integrity": "sha512-+b4ZKSD8+vslCtVRVetkegEhOFMLP3rxDWJY212ct+2r6jVg6OSQKc1Qz3kCoXo0FgwaXkb+76TMZfpHp8QtgA==", - "dev": true, - "dependencies": { - "@azure/msal-common": "14.16.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-common": { - "version": "14.16.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz", - "integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-node": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.1.tgz", - "integrity": "sha512-1NEFpTmMMT2A7RnZuvRl/hUmJU+GLPjh+ShyIqPktG2PvSd2yvPnzGd/BxIBAAvJG5nr9lH4oYcQXepDbaE7fg==", - "dev": true, - "dependencies": { - "@azure/msal-common": "14.16.0", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@azure/storage-blob": { - "version": "12.25.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.25.0.tgz", - "integrity": "sha512-oodouhA3nCCIh843tMMbxty3WqfNT+Vgzj3Xo5jqR9UPnzq3d7mzLjlHAYz7lW+b4km3SIgz+NAgztvhm7Z6kQ==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.4.0", - "@azure/core-client": "^1.6.2", - "@azure/core-http-compat": "^2.0.0", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.10.1", - "@azure/core-tracing": "^1.1.2", - "@azure/core-util": "^1.6.1", - "@azure/core-xml": "^1.4.3", - "@azure/logger": "^1.0.0", - "events": "^3.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.9.tgz", @@ -711,26 +286,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@colors/colors": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", - "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "dev": true, - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", @@ -1912,12 +1467,6 @@ "undici-types": "~6.20.0" } }, - "node_modules/@types/triple-beam": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", - "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", - "dev": true - }, "node_modules/@typespec/compiler": { "version": "0.63.0", "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.63.0.tgz", @@ -2207,31 +1756,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -2301,39 +1825,11 @@ "node": ">=4" } }, - "node_modules/append-field": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", - "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", - "dev": true - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -2344,119 +1840,10 @@ "node": ">=12" } }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", - "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/basic-auth/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "node_modules/brace-expansion": { @@ -2479,39 +1866,6 @@ "node": ">=8" } }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "dev": true - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/c8": { "version": "10.1.3", "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz", @@ -2566,25 +1920,6 @@ "node": ">=8" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/chai": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", @@ -2643,16 +1978,6 @@ "node": ">=12" } }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2666,107 +1991,18 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dev": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "dev": true, - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2781,15 +2017,6 @@ "node": ">= 8" } }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, "node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -2817,191 +2044,17 @@ "node": ">=6" } }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, - "node_modules/enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", - "dev": true - }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es-module-lexer": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", @@ -3056,12 +2109,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3080,24 +2127,6 @@ "@types/estree": "^1.0.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/expect-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", @@ -3108,115 +2137,30 @@ "node": ">=12.0.0" } }, - "node_modules/express": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", - "dev": true, - "license": "MIT", + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", - "proxy-addr": "~2.0.7", - "qs": "6.13.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" + "engines": { + "node": ">=8.6.0" } }, - "node_modules/express-promise-router": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/express-promise-router/-/express-promise-router-4.1.1.tgz", - "integrity": "sha512-Lkvcy/ZGrBhzkl3y7uYBHLMtLI4D6XQ2kiFg9dq7fbktBch5gjqJ0+KovX0cvCAvTJw92raWunRLM/OM+5l4fA==", - "dev": true, - "dependencies": { - "is-promise": "^4.0.0", - "lodash.flattendeep": "^4.0.0", - "methods": "^1.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "@types/express": "^4.0.0", - "express": "^4.0.0" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dependencies": { "is-glob": "^4.0.1" }, @@ -3229,28 +2173,6 @@ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" }, - "node_modules/fast-xml-parser": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", - "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - ], - "dependencies": { - "strnum": "^1.0.5" - }, - "bin": { - "fxparser": "src/cli/cli.js" - } - }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -3259,35 +2181,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", - "dev": true - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, "node_modules/fflate": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", @@ -3306,39 +2199,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", - "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3362,41 +2222,6 @@ "dev": true, "license": "ISC" }, - "node_modules/fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, "node_modules/foreground-child": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", @@ -3413,50 +2238,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.2.tgz", - "integrity": "sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dev": true, - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -3496,15 +2277,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3513,25 +2285,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/glob": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", @@ -3575,32 +2328,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -3609,57 +2341,6 @@ "node": ">=4" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -3678,60 +2359,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -3750,113 +2377,6 @@ "node": ">=8" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-core-module": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", @@ -3872,36 +2392,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3929,18 +2419,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -3949,158 +2427,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-promise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "dev": true - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", - "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4234,70 +2560,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "dev": true, - "dependencies": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dev": true, - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dev": true, - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "dev": true, - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "dev": true, - "dependencies": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -4306,12 +2568,6 @@ "node": ">=6" } }, - "node_modules/kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", - "dev": true - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -4327,75 +2583,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "dev": true - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", - "dev": true - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "dev": true - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "dev": true - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "dev": true - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "dev": true - }, - "node_modules/logform": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", - "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", - "dev": true, - "dependencies": { - "@colors/colors": "1.6.0", - "@types/triple-beam": "^1.3.2", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 12.0.0" - } + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/loupe": { "version": "3.1.2", @@ -4450,24 +2641,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4476,15 +2649,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -4497,39 +2661,6 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/minimatch": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", @@ -4545,15 +2676,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -4563,61 +2685,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/morgan/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/morgan/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", @@ -4634,24 +2701,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/multer": { - "version": "1.4.5-lts.1", - "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz", - "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", - "dev": true, - "dependencies": { - "append-field": "^1.0.0", - "busboy": "^1.0.0", - "concat-stream": "^1.5.2", - "mkdirp": "^0.5.4", - "object-assign": "^4.1.1", - "type-is": "^1.6.4", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/mustache": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", @@ -4679,163 +2728,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dev": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "dev": true, - "dependencies": { - "fn.name": "1.x.x" - } - }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dev": true, - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4872,15 +2764,6 @@ "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", "dev": true }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4921,13 +2804,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "dev": true, - "license": "MIT" - }, "node_modules/path-type": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", @@ -4983,15 +2859,6 @@ "node": ">=4" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/postcss": { "version": "8.4.49", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", @@ -5035,12 +2902,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -5065,25 +2926,6 @@ "node": ">=4.0.0" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -5094,21 +2936,6 @@ "node": ">=6" } }, - "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5128,75 +2955,6 @@ } ] }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", - "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -5299,39 +3057,16 @@ "@rollup/rollup-linux-s390x-gnu": "4.28.1", "@rollup/rollup-linux-x64-gnu": "4.28.1", "@rollup/rollup-linux-x64-musl": "4.28.1", - "@rollup/rollup-win32-arm64-msvc": "4.28.1", - "@rollup/rollup-win32-ia32-msvc": "4.28.1", - "@rollup/rollup-win32-x64-msvc": "4.28.1", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" + "@rollup/rollup-win32-arm64-msvc": "4.28.1", + "@rollup/rollup-win32-ia32-msvc": "4.28.1", + "@rollup/rollup-win32-x64-msvc": "4.28.1", + "fsevents": "~2.3.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "funding": [ { "type": "github", @@ -5345,29 +3080,11 @@ "type": "consulting", "url": "https://feross.org/support" } - ] - }, - "node_modules/safe-stable-stringify": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", - "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", - "dev": true, - "engines": { - "node": ">=10" + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "dev": true - }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -5379,107 +3096,6 @@ "node": ">=10" } }, - "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", - "dev": true, - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.19.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5501,24 +3117,6 @@ "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -5538,15 +3136,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, "node_modules/sirv": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz", @@ -5598,16 +3187,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5615,15 +3194,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -5631,15 +3201,6 @@ "dev": true, "license": "MIT" }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/std-env": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", @@ -5647,52 +3208,6 @@ "dev": true, "license": "MIT" }, - "node_modules/stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "dev": true, - "dependencies": { - "internal-slot": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "dev": true, - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/string-argv": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", @@ -5767,12 +3282,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "dev": true - }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -5895,12 +3404,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", - "dev": true - }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", @@ -5998,15 +3501,6 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/totalist": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", @@ -6017,40 +3511,6 @@ "node": ">=6" } }, - "node_modules/triple-beam": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", - "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", - "dev": true, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, "node_modules/typescript": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", @@ -6093,15 +3553,6 @@ "node": ">= 4.0.0" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -6112,30 +3563,6 @@ "punycode": "^2.1.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -6150,15 +3577,6 @@ "node": ">=10.12.0" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/vite": { "version": "5.4.11", "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", @@ -6346,15 +3764,6 @@ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6370,59 +3779,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -6440,70 +3796,6 @@ "node": ">=8" } }, - "node_modules/winston": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", - "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", - "dev": true, - "dependencies": { - "@colors/colors": "^1.6.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.7.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.9.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/winston-transport": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", - "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", - "dev": true, - "dependencies": { - "logform": "^2.7.0", - "readable-stream": "^3.6.2", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/winston-transport/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/winston/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -6601,58 +3893,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/xml-formatter": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/xml-formatter/-/xml-formatter-3.6.3.tgz", - "integrity": "sha512-++x1TlRO1FRlQ82AZ4WnoCSufaI/PT/sycn4K8nRl4gnrNC1uYY2VV/67aALZ2m0Q4Q/BLj/L69K360Itw9NNg==", - "dev": true, - "dependencies": { - "xml-parser-xo": "^4.1.2" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/xml-parser-xo": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/xml-parser-xo/-/xml-parser-xo-4.1.2.tgz", - "integrity": "sha512-Z/DRB0ZAKj5vAQg++XsfQQKfT73Vfj5n5lKIVXobBDQEva6NHWUTxOA6OohJmEcpoy8AEqBmSGkXXAnFwt5qAA==", - "dev": true, - "engines": { - "node": ">= 16" - } - }, - "node_modules/xml2js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", - "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", - "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/packages/http-client-java/package.json b/packages/http-client-java/package.json index dafce26a16..b75e74490d 100644 --- a/packages/http-client-java/package.json +++ b/packages/http-client-java/package.json @@ -79,7 +79,6 @@ "c8": "~10.1.3", "rimraf": "~6.0.1", "typescript": "~5.7.2", - "vitest": "^2.1.8", - "@azure-tools/cadl-ranch": "0.16.1" + "vitest": "^2.1.8" } } From 6f6ee2a31d684cd4239a80e4abbe69a32ad8da7e Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 13 Dec 2024 18:10:09 +0000 Subject: [PATCH 2/2] `typespec` repository - Upload Manifest file to the new storage account (#5336) In the `cadl-ranch` repository, during the publish process, the CI publishes the manifest file to the `azuresdkcadlranch` storage account. You can find the code [here](https://github.com/Azure/cadl-ranch/blob/main/.azure-pipelines/publish.yml#L35) With the new Spec Dashboard, the `typespec` repository CI has to publish the manifest file to the `typespec` storage account. I have tested this code in CI in my branch. You can find the link [here](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4401569&view=logs&j=feeac6a1-95f5-5e4f-b973-2aeaa4cef844). Please review and approve the PR. Thanks --- eng/tsp-core/pipelines/publish.yml | 30 +++++++++++++++++++++++++++++ packages/spec-dashboard/src/apis.ts | 3 +++ 2 files changed, 33 insertions(+) diff --git a/eng/tsp-core/pipelines/publish.yml b/eng/tsp-core/pipelines/publish.yml index e70f764fb0..e31d1acca0 100644 --- a/eng/tsp-core/pipelines/publish.yml +++ b/eng/tsp-core/pipelines/publish.yml @@ -176,3 +176,33 @@ extends: displayName: "Build" - script: docker push $(imageName) --all-tags displayName: "Push" + + - stage: publish_manifest + displayName: Manifest + dependsOn: build + jobs: + - job: publish_manifest + displayName: Publish Manifest + pool: + name: $(WINDOWSPOOL) + image: $(WINDOWSVMIMAGE) + os: windows + variables: + TYPESPEC_SKIP_DOCUSAURUS_BUILD: true # Disable docusaurus build + steps: + - template: /eng/tsp-core/pipelines/templates/install.yml + - template: /eng/tsp-core/pipelines/templates/build.yml + + - script: pnpm run validate-scenarios --debug + displayName: Validate Scenarios + + - script: pnpm run validate-mock-apis --debug + displayName: Validate mock apis + + - task: AzureCLI@2 + displayName: Upload scenario manifest + inputs: + azureSubscription: "TypeSpec Storage" + scriptType: "bash" + scriptLocation: "inlineScript" + inlineScript: "pnpm upload-manifest" diff --git a/packages/spec-dashboard/src/apis.ts b/packages/spec-dashboard/src/apis.ts index 82ea1166ad..3e6090d3d7 100644 --- a/packages/spec-dashboard/src/apis.ts +++ b/packages/spec-dashboard/src/apis.ts @@ -70,6 +70,9 @@ export async function getCoverageSummaries(): Promise { (manifest: ScenarioManifest) => manifest.setName !== "@azure-tools/azure-http-specs", )[0]; for (const key in generatorReports["standard"]) { + if (!(generatorReports["standard"] as any)[key]) { + continue; + } (generatorReports["standard"] as any)[key] = { ...(generatorReports["standard"] as any)[key][0], generatorMetadata: (generatorReports["standard"] as any)[key]["generatorMetadata"],