From 7ed803f1b7b2f87197c912eb2871a865f99b1796 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 18 Nov 2024 06:52:30 +0000 Subject: [PATCH] CodeGen from PR 31342 in Azure/azure-rest-api-specs Merge 91f21f8d6543b54f209ae9413eb9a1a6572c4169 into 297c3a012316e290e6a6ab737ec8944611554542 --- common/config/rush/pnpm-lock.yaml | 37 +- sdk/storagesync/arm-storagesync/CHANGELOG.md | 65 +- sdk/storagesync/arm-storagesync/LICENSE | 2 +- sdk/storagesync/arm-storagesync/README.md | 2 +- sdk/storagesync/arm-storagesync/_meta.json | 10 +- sdk/storagesync/arm-storagesync/package.json | 71 +- .../review/arm-storagesync.api.md | 236 +- sdk/storagesync/arm-storagesync/sample.env | 5 +- .../arm-storagesync/src/lroImpl.ts | 54 +- .../src/microsoftStorageSync.ts | 56 +- .../arm-storagesync/src/models/index.ts | 575 ++- .../arm-storagesync/src/models/mappers.ts | 4095 ++++++++++------- .../arm-storagesync/src/models/parameters.ts | 143 +- .../src/operations/cloudEndpoints.ts | 594 +-- .../operations/operationStatusOperations.ts | 22 +- .../src/operations/operations.ts | 32 +- .../operations/privateEndpointConnections.ts | 204 +- .../src/operations/privateLinkResources.ts | 20 +- .../src/operations/registeredServers.ts | 418 +- .../src/operations/serverEndpoints.ts | 346 +- .../src/operations/storageSyncServices.ts | 304 +- .../src/operations/syncGroups.ts | 88 +- .../src/operations/workflows.ts | 69 +- .../operationsInterfaces/cloudEndpoints.ts | 77 +- .../operationStatusOperations.ts | 4 +- .../src/operationsInterfaces/operations.ts | 2 +- .../privateEndpointConnections.ts | 32 +- .../privateLinkResources.ts | 4 +- .../operationsInterfaces/registeredServers.ts | 70 +- .../operationsInterfaces/serverEndpoints.ts | 40 +- .../storageSyncServices.ts | 36 +- .../src/operationsInterfaces/syncGroups.ts | 10 +- .../src/operationsInterfaces/workflows.ts | 8 +- .../arm-storagesync/src/pagingHelper.ts | 2 +- .../arm-storagesync/test/sampleTest.ts | 8 +- sdk/storagesync/arm-storagesync/tsconfig.json | 12 +- 36 files changed, 4610 insertions(+), 3143 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e2ac4a887b9b..b1a6c75507a2 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12348,7 +12348,7 @@ packages: dev: false file:projects/ai-language-text.tgz: - resolution: {integrity: sha512-PqM9ui81lmdhXEtP8GIAjLVcVvlupuMDmN23SvaEKLDAwj7x83KNuxMXUC03nuAu7GGw7f6duJQPj59nEyUXig==, tarball: file:projects/ai-language-text.tgz} + resolution: {integrity: sha512-6C3jjNxEgVBUU20JjosTiobhkOlbsaBeUq+OJ0mXgqnm/Y3L5EhJz6zvG8MgM9Mj2yQPfX9VWCy4+Pn9Nkhslw==, tarball: file:projects/ai-language-text.tgz} name: '@rush-temp/ai-language-text' version: 0.0.0 dependencies: @@ -12506,7 +12506,7 @@ packages: dev: false file:projects/ai-translation-document.tgz: - resolution: {integrity: sha512-tczwZFFKsT8A5tYnAH8FLQ1cpw9B0tFIiAVb5wPaI40o9Rx3gBKBxZ7mGU9lPdXwAy03uyqtXOAwr1JzaNTj4A==, tarball: file:projects/ai-translation-document.tgz} + resolution: {integrity: sha512-Ab59rauKcO/H7u7fQJ0DmNlyMycKybpGa1Wsaw9GNLpNJxh+ibmPDS44TaOAcFwxOLIadyxaj7vsrmXXkM5Ocg==, tarball: file:projects/ai-translation-document.tgz} name: '@rush-temp/ai-translation-document' version: 0.0.0 dependencies: @@ -12710,7 +12710,7 @@ packages: dev: false file:projects/api-management-custom-widgets-tools.tgz: - resolution: {integrity: sha512-+ezPIFcLbT94W1qUmvCf/8ZmRXgcIp4ZPWPvZChsGG05CeBCDrZecSEeO58F3vnVQDhYQAwOUwmqhgYJanVg0g==, tarball: file:projects/api-management-custom-widgets-tools.tgz} + resolution: {integrity: sha512-dMAIacqzLU3uGgVdn+A8r+/Vv7vC4Emr0Z0T3lCVhq7JoQmL3I7yyUueYdP6tPVYSGzko9MdRYXA11RvB9GHPA==, tarball: file:projects/api-management-custom-widgets-tools.tgz} name: '@rush-temp/api-management-custom-widgets-tools' version: 0.0.0 dependencies: @@ -15416,7 +15416,7 @@ packages: dev: false file:projects/arm-hybridcompute.tgz: - resolution: {integrity: sha512-+DX7eIMt7WAbn6AD+QZpjVyoMuXdNpGH452FuoUH2UvFhOBtlZD3B5y8bwW/oE8d3E/u2eZ3B4N2cAFV32bgbw==, tarball: file:projects/arm-hybridcompute.tgz} + resolution: {integrity: sha512-IxFMCCeH0D2P6u+4Vwi9ROrWBKeO0DJEfs2jxyfJnrGNMrRKAWfplx0QVZY6ETK5Thjlm3myTMffxO2BT5PBiA==, tarball: file:projects/arm-hybridcompute.tgz} name: '@rush-temp/arm-hybridcompute' version: 0.0.0 dependencies: @@ -18324,7 +18324,7 @@ packages: dev: false file:projects/arm-storagesync.tgz: - resolution: {integrity: sha512-fKD6uofi9+UqrnP9CXLuy4Gtwzg9qZpaWToXmrqZumPplzkMBRexrY7UexQrqyctQG5KhIA0Ivg9uhALersfQg==, tarball: file:projects/arm-storagesync.tgz} + resolution: {integrity: sha512-GnXeZLIN/ZSuTJMfm74zZUA/daalnP+YQx3IDSFDJ57zoDfqyOXkCN/YWANQOkQigJ1ygwlzeQBpGktJGJngCg==, tarball: file:projects/arm-storagesync.tgz} name: '@rush-temp/arm-storagesync' version: 0.0.0 dependencies: @@ -18332,14 +18332,19 @@ packages: '@azure-tools/test-recorder': 3.5.2 '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 + '@microsoft/api-extractor': 7.47.11(@types/node@18.19.64) '@types/chai': 4.3.20 '@types/mocha': 10.0.9 '@types/node': 18.19.64 chai: 4.3.10 + cross-env: 7.0.3 + dotenv: 16.4.5 mocha: 10.8.2 ts-node: 10.9.2(@types/node@18.19.64)(typescript@5.6.3) tslib: 2.8.1 + tsx: 4.19.2 typescript: 5.6.3 + uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -19240,7 +19245,7 @@ packages: dev: false file:projects/communication-job-router.tgz: - resolution: {integrity: sha512-xPt7oEFIEnDcZHXkEsgPlaOBwbjSF6dQq4uDtXsp/yeslQgiTdGNnO5bUMfuqpTTiiwSsXCyCKEy2FmmrcRHLw==, tarball: file:projects/communication-job-router.tgz} + resolution: {integrity: sha512-2asWr03USbfs287ufZkj8sgX94e8AIkX8BU9mVvBxqPp+5NwM8F2I2OeKa/ZRb9z7dcawliux8IwyB2kNGIEAg==, tarball: file:projects/communication-job-router.tgz} name: '@rush-temp/communication-job-router' version: 0.0.0 dependencies: @@ -20784,7 +20789,7 @@ packages: dev: false file:projects/eventhubs-checkpointstore-blob.tgz(chai@4.3.10): - resolution: {integrity: sha512-d0r9Tcp+PR88ElbvXVtloMca/5o3x7baoqzfzU6erNYp3+qDb28vnauB7wgtSr/JCNFXUUEwCRdCDkqnj2SjIg==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} + resolution: {integrity: sha512-QIMCv2kTVX8O/o5j/9cm9cj3M1Yu68nIK2z4ubzIx+w0ZJ4Sby3hc2F+UFe5oj59UyA29uZLX6sfITm7+SuKgQ==, tarball: file:projects/eventhubs-checkpointstore-blob.tgz} id: file:projects/eventhubs-checkpointstore-blob.tgz name: '@rush-temp/eventhubs-checkpointstore-blob' version: 0.0.0 @@ -21817,7 +21822,7 @@ packages: dev: false file:projects/microsoft-playwright-testing.tgz: - resolution: {integrity: sha512-5ZtQtASg+gjAwV0BZ3pqTl2taVn2mW46wnhVjYnUhjn08xDzhaRqPvupmTT6S4Nfc1TcP+J/dQWhqEqwD22HGw==, tarball: file:projects/microsoft-playwright-testing.tgz} + resolution: {integrity: sha512-LOfcpsGhkCQlf/ONHLHqjTVgWCasb0ImH6OcRwRpzkO4ybQbiAi4eQvnD2CVwpoa3crRHI9hebbLeSvBsBKAVA==, tarball: file:projects/microsoft-playwright-testing.tgz} name: '@rush-temp/microsoft-playwright-testing' version: 0.0.0 dependencies: @@ -22645,7 +22650,7 @@ packages: dev: false file:projects/perf-storage-blob.tgz: - resolution: {integrity: sha512-bP40paE6XWSxK1NI6IqTFa3TnZ/KV+oOwXvHOlWlnpDa6vHxzuVaSLO22jn2HKpusBkvMhL2znxbrnglHkXp7Q==, tarball: file:projects/perf-storage-blob.tgz} + resolution: {integrity: sha512-gC/6yI3RAsLz8yW4HuwmY/hZJdfQ4WpTasQrnaGM2o0ADvshX7BbTMziACBVC1IJ+SZS0f25nzWdMrf1cKEPUA==, tarball: file:projects/perf-storage-blob.tgz} name: '@rush-temp/perf-storage-blob' version: 0.0.0 dependencies: @@ -22664,7 +22669,7 @@ packages: dev: false file:projects/perf-storage-file-datalake.tgz: - resolution: {integrity: sha512-lOYRq0haEkX/2PuDMltoOo+lVVv6qQ6vg9V9bTtsf49Dw0Cl+6GBEzEdY5zzfK/QJj8GqH0BDKJe9SH0dFtnuw==, tarball: file:projects/perf-storage-file-datalake.tgz} + resolution: {integrity: sha512-/Ci5NG7Th6jCRFjxNQnQIN066A0l8K8hkuTPVCvaChixw0hduEm6MN1HeVT+Qmwkko8uVFlLNu1s7HgLwy8rLw==, tarball: file:projects/perf-storage-file-datalake.tgz} name: '@rush-temp/perf-storage-file-datalake' version: 0.0.0 dependencies: @@ -22683,7 +22688,7 @@ packages: dev: false file:projects/perf-storage-file-share.tgz: - resolution: {integrity: sha512-2xwPxzCMbVfYgHjYiUFtyHhpNoU3rDDiz8voS+JIJni80uABgbEZbbTqb/sGDiMkix0lky1xHLBgplcoq50p8g==, tarball: file:projects/perf-storage-file-share.tgz} + resolution: {integrity: sha512-PA4GNlP5egvK17bRRWDzOrPQgQ87ZxFP+UzUQxy/Wa1NwuHJdBlcsa8P3do4HTkD0UpSzTyeNQ5P7X2etFM+8A==, tarball: file:projects/perf-storage-file-share.tgz} name: '@rush-temp/perf-storage-file-share' version: 0.0.0 dependencies: @@ -22967,7 +22972,7 @@ packages: dev: false file:projects/quantum-jobs.tgz: - resolution: {integrity: sha512-LcPcq+CQlLRl1qN04ARwMlUE2OQi7Bef8aO8uqXIxhejiYFVDLUvtES/oJPoqRTAcYiNs0+6dW7DV/tlyyncdQ==, tarball: file:projects/quantum-jobs.tgz} + resolution: {integrity: sha512-7t0BJaiAPuiDKNgRvOYijVm/Nd8OdjCrk2UhxSYDCVAaJkxRcbNExsrj1RLHv7LrmDbg3AcKymMM+dP9KPBAeA==, tarball: file:projects/quantum-jobs.tgz} name: '@rush-temp/quantum-jobs' version: 0.0.0 dependencies: @@ -23235,7 +23240,7 @@ packages: dev: false file:projects/storage-blob-changefeed.tgz: - resolution: {integrity: sha512-g3z0U7sH8A+7aPtYY/h7NmhPoYx4N12mE1GyVw0EENN4iO6jFRVFh4r8y1qcfPXCUewloCiPfF2DxwZR8KmyXg==, tarball: file:projects/storage-blob-changefeed.tgz} + resolution: {integrity: sha512-ulb7cStYuBYLz5klWzekE1UG2EGSPjv5VqYpaBmA73FZHcjYXumEFAsnGOdUxJFL2/mJAUHJ2nutM3jWLwoH/g==, tarball: file:projects/storage-blob-changefeed.tgz} name: '@rush-temp/storage-blob-changefeed' version: 0.0.0 dependencies: @@ -23327,7 +23332,7 @@ packages: dev: false file:projects/storage-file-datalake.tgz: - resolution: {integrity: sha512-0S+88/SFOzE4eUYtKCMMikxfTh8NzfL5hEGTleZyl+URlPSpUBt/SJE35R9OlVOI+ihfc9RE66XdsYktjy5SBQ==, tarball: file:projects/storage-file-datalake.tgz} + resolution: {integrity: sha512-FVV+PJzMPt7z/pAYIE+3/XbfTv9nR1icrxKEnPtNjNiu1SIFzxoqsSfyzWEhM3OaDxw7cGkn5CVEb1dGo0yoRA==, tarball: file:projects/storage-file-datalake.tgz} name: '@rush-temp/storage-file-datalake' version: 0.0.0 dependencies: @@ -23374,7 +23379,7 @@ packages: dev: false file:projects/storage-file-share.tgz: - resolution: {integrity: sha512-YwK1nFzjoDaHcHuGiKSexyTzZmiRARdZ6VeWkvXMmmOckWkIzYfcUkwEnIhU60ban96FVT/6BrczNFgvHMOCUg==, tarball: file:projects/storage-file-share.tgz} + resolution: {integrity: sha512-UIGe6OIq8WYfDcVyTGSBN+NoU0a62Gp8CPRLfLLdhyewy7MtMfQeQeqsJA0UheHGE7KiVMdEJ1Y7CqVnVBT4+A==, tarball: file:projects/storage-file-share.tgz} name: '@rush-temp/storage-file-share' version: 0.0.0 dependencies: @@ -23460,7 +23465,7 @@ packages: dev: false file:projects/storage-queue.tgz: - resolution: {integrity: sha512-7PfyEm0o178jiAjKrXJJ/BGBF09A1GzA3dTgPIPNQ6Y4XJitrpDIm4jliYFQYvoiJgBDG2zvzjNP2Z4HCa2sCw==, tarball: file:projects/storage-queue.tgz} + resolution: {integrity: sha512-5eSIt9TpDfdl5IHCDEjtBqAe+1Ipe/bEju6w4pdLRo7/j/dcOrewCOj+c96FLKsU334aj4qhvZ0/5TQqyxizpw==, tarball: file:projects/storage-queue.tgz} name: '@rush-temp/storage-queue' version: 0.0.0 dependencies: diff --git a/sdk/storagesync/arm-storagesync/CHANGELOG.md b/sdk/storagesync/arm-storagesync/CHANGELOG.md index 05e80a0031a8..fe952057f02e 100644 --- a/sdk/storagesync/arm-storagesync/CHANGELOG.md +++ b/sdk/storagesync/arm-storagesync/CHANGELOG.md @@ -1,15 +1,64 @@ # Release History - -## 9.1.1 (Unreleased) - + +## 10.0.0 (2024-11-18) + ### Features Added -### Breaking Changes + - Added operation CloudEndpoints.afsShareMetadataCertificatePublicKeys + - Added operation RegisteredServers.beginUpdate + - Added operation RegisteredServers.beginUpdateAndWait + - Added Interface CloudEndpointAfsShareMetadataCertificatePublicKeys + - Added Interface CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders + - Added Interface CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams + - Added Interface CloudTieringLowDiskMode + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface ManagedServiceIdentity + - Added Interface RegisteredServersUpdateHeaders + - Added Interface RegisteredServersUpdateOptionalParams + - Added Interface RegisteredServerUpdateParameters + - Added Interface ServerEndpointProvisioningStatus + - Added Interface ServerEndpointProvisioningStepStatus + - Added Interface SystemData + - Added Interface UserAssignedIdentity + - Added Type Alias CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse + - Added Type Alias CloudTieringLowDiskModeState + - Added Type Alias CreatedByType + - Added Type Alias ManagedServiceIdentityType + - Added Type Alias RegisteredServersUpdateResponse + - Added Type Alias ServerAuthType + - Added Type Alias ServerProvisioningStatus + - Interface OperationResourceMetricSpecification has a new optional parameter lockAggregationType + - Interface OperationResourceMetricSpecification has a new optional parameter supportedAggregationTypes + - Interface PrivateEndpointConnection has a new optional parameter groupIds + - Interface RegisteredServer has a new optional parameter activeAuthType + - Interface RegisteredServer has a new optional parameter applicationId + - Interface RegisteredServer has a new optional parameter identity + - Interface RegisteredServer has a new optional parameter latestApplicationId + - Interface RegisteredServerCreateParameters has a new optional parameter applicationId + - Interface RegisteredServerCreateParameters has a new optional parameter identity + - Interface Resource has a new optional parameter systemData + - Interface ServerEndpoint has a new optional parameter serverEndpointProvisioningStatus + - Interface ServerEndpointCloudTieringStatus has a new optional parameter lowDiskMode + - Interface StorageSyncApiError has a new optional parameter innererror + - Interface StorageSyncService has a new optional parameter identity + - Interface StorageSyncService has a new optional parameter useIdentity + - Interface StorageSyncServiceCreateParameters has a new optional parameter identity + - Interface StorageSyncServiceCreateParameters has a new optional parameter useIdentity + - Interface StorageSyncServiceUpdateParameters has a new optional parameter identity + - Interface StorageSyncServiceUpdateParameters has a new optional parameter useIdentity + - Added Enum KnownCloudTieringLowDiskModeState + - Added Enum KnownCreatedByType + - Added Enum KnownManagedServiceIdentityType + - Added Enum KnownServerAuthType + - Added Enum KnownServerProvisioningStatus -### Bugs Fixed - -### Other Changes +### Breaking Changes + - Interface StorageSyncApiError no longer has parameter innerError + + ## 9.1.0 (2022-12-12) ### Features Added @@ -43,4 +92,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/storagesync/arm-storagesync/LICENSE b/sdk/storagesync/arm-storagesync/LICENSE index 5d1d36e0af80..7d5934740965 100644 --- a/sdk/storagesync/arm-storagesync/LICENSE +++ b/sdk/storagesync/arm-storagesync/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2024 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/storagesync/arm-storagesync/README.md b/sdk/storagesync/arm-storagesync/README.md index e097fddcda80..463db11332ae 100644 --- a/sdk/storagesync/arm-storagesync/README.md +++ b/sdk/storagesync/arm-storagesync/README.md @@ -2,7 +2,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure MicrosoftStorageSync client. -Microsoft Storage Sync Service API +Microsoft Storage Sync Service API. This belongs to Microsoft.StorageSync Resource Provider [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagesync/arm-storagesync) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-storagesync) | diff --git a/sdk/storagesync/arm-storagesync/_meta.json b/sdk/storagesync/arm-storagesync/_meta.json index 6348bf10f638..0094b0d86259 100644 --- a/sdk/storagesync/arm-storagesync/_meta.json +++ b/sdk/storagesync/arm-storagesync/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", - "readme": "specification\\storagesync\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\storagesync\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", + "commit": "bf367cd10a062f9a3608a301f75b119621488e72", + "readme": "specification/storagesync/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/storagesync/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", - "use": "@autorest/typescript@6.0.0-rc.4" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.16", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/storagesync/arm-storagesync/package.json b/sdk/storagesync/arm-storagesync/package.json index 44ef868b50da..460fa9091c06 100644 --- a/sdk/storagesync/arm-storagesync/package.json +++ b/sdk/storagesync/arm-storagesync/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for MicrosoftStorageSync.", - "version": "9.1.1", + "version": "10.0.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.6.1", - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-client": "^1.7.0", + "@azure/core-auth": "^1.6.0", + "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,19 +28,23 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-storagesync.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@microsoft/api-extractor": "^7.31.1", + "typescript": "~5.6.2", + "uglify-js": "^3.4.9", + "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", + "@azure/identity": "^4.2.1", + "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^1.1.0", + "mocha": "^10.0.0", "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", + "tsx": "^4.7.1", + "@types/chai": "^4.2.8", "chai": "^4.2.0", - "mocha": "^10.0.0", - "ts-node": "^10.0.0", - "typescript": "~5.6.2" + "cross-env": "^7.0.2", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagesync/arm-storagesync", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -67,28 +71,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", "test": "npm run integration-test", - "test:browser": "echo skipped", "test:node": "echo skipped", + "test:browser": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -101,12 +105,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storagesync?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storagesync/arm-storagesync" +} \ No newline at end of file diff --git a/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md b/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md index 310d7a09b86e..86e048ec87ea 100644 --- a/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md +++ b/sdk/storagesync/arm-storagesync/review/arm-storagesync.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface BackupRequest { @@ -45,6 +45,12 @@ export interface CloudEndpoint extends ProxyResource { storageAccountTenantId?: string; } +// @public +export interface CloudEndpointAfsShareMetadataCertificatePublicKeys { + readonly firstKey?: string; + readonly secondKey?: string; +} + // @public export interface CloudEndpointArray { value?: CloudEndpoint[]; @@ -100,25 +106,39 @@ export interface CloudEndpointLastChangeEnumerationStatus { // @public export interface CloudEndpoints { - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, options?: CloudEndpointsCreateOptionalParams): Promise, CloudEndpointsCreateResponse>>; + afsShareMetadataCertificatePublicKeys(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams): Promise; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, options?: CloudEndpointsCreateOptionalParams): Promise, CloudEndpointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, options?: CloudEndpointsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsDeleteOptionalParams): Promise, CloudEndpointsDeleteResponse>>; + beginDelete(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsDeleteOptionalParams): Promise, CloudEndpointsDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsDeleteOptionalParams): Promise; - beginPostBackup(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, options?: CloudEndpointsPostBackupOptionalParams): Promise, CloudEndpointsPostBackupResponse>>; + beginPostBackup(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, options?: CloudEndpointsPostBackupOptionalParams): Promise, CloudEndpointsPostBackupResponse>>; beginPostBackupAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, options?: CloudEndpointsPostBackupOptionalParams): Promise; - beginPostRestore(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, options?: CloudEndpointsPostRestoreOptionalParams): Promise, void>>; + beginPostRestore(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, options?: CloudEndpointsPostRestoreOptionalParams): Promise, void>>; beginPostRestoreAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, options?: CloudEndpointsPostRestoreOptionalParams): Promise; - beginPreBackup(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, options?: CloudEndpointsPreBackupOptionalParams): Promise, CloudEndpointsPreBackupResponse>>; + beginPreBackup(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, options?: CloudEndpointsPreBackupOptionalParams): Promise, CloudEndpointsPreBackupResponse>>; beginPreBackupAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, options?: CloudEndpointsPreBackupOptionalParams): Promise; - beginPreRestore(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, options?: CloudEndpointsPreRestoreOptionalParams): Promise, void>>; + beginPreRestore(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, options?: CloudEndpointsPreRestoreOptionalParams): Promise, void>>; beginPreRestoreAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, options?: CloudEndpointsPreRestoreOptionalParams): Promise; - beginTriggerChangeDetection(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, options?: CloudEndpointsTriggerChangeDetectionOptionalParams): Promise, void>>; + beginTriggerChangeDetection(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, options?: CloudEndpointsTriggerChangeDetectionOptionalParams): Promise, void>>; beginTriggerChangeDetectionAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, options?: CloudEndpointsTriggerChangeDetectionOptionalParams): Promise; get(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsGetOptionalParams): Promise; listBySyncGroup(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, options?: CloudEndpointsListBySyncGroupOptionalParams): PagedAsyncIterableIterator; restoreheartbeat(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsRestoreheartbeatOptionalParams): Promise; } +// @public +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders { + xMsCorrelationRequestId?: string; + xMsRequestId?: string; +} + +// @public +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse = CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders & CloudEndpointAfsShareMetadataCertificatePublicKeys; + // @public export interface CloudEndpointsCreateHeaders { xMsCorrelationRequestId?: string; @@ -280,6 +300,15 @@ export interface CloudTieringFilesNotTiering { readonly totalFileCount?: number; } +// @public +export interface CloudTieringLowDiskMode { + readonly lastUpdatedTimestamp?: Date; + readonly state?: CloudTieringLowDiskModeState; +} + +// @public +export type CloudTieringLowDiskModeState = string; + // @public export interface CloudTieringSpaceSavings { readonly cachedSizeBytes?: number; @@ -297,6 +326,29 @@ export interface CloudTieringVolumeFreeSpacePolicyStatus { readonly lastUpdatedTimestamp?: Date; } +// @public +export type CreatedByType = string; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + +// @public +export interface ErrorResponse { + error?: ErrorDetail; +} + // @public export type FeatureStatus = string; @@ -336,6 +388,20 @@ export enum KnownCloudEndpointChangeEnumerationTotalCountsState { Final = "Final" } +// @public +export enum KnownCloudTieringLowDiskModeState { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownCreatedByType { + Application = "Application", + Key = "Key", + ManagedIdentity = "ManagedIdentity", + User = "User" +} + // @public export enum KnownFeatureStatus { Off = "off", @@ -367,6 +433,14 @@ export enum KnownLocalCacheMode { UpdateLocallyCachedFiles = "UpdateLocallyCachedFiles" } +// @public +export enum KnownManagedServiceIdentityType { + None = "None", + SystemAssigned = "SystemAssigned", + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", + UserAssigned = "UserAssigned" +} + // @public export enum KnownOperationDirection { Cancel = "cancel", @@ -415,6 +489,12 @@ export enum KnownRegisteredServerAgentVersionStatus { Ok = "Ok" } +// @public +export enum KnownServerAuthType { + Certificate = "Certificate", + ManagedIdentity = "ManagedIdentity" +} + // @public export enum KnownServerEndpointHealthState { Error = "Error", @@ -446,6 +526,15 @@ export enum KnownServerEndpointSyncMode { SnapshotUpload = "SnapshotUpload" } +// @public +export enum KnownServerProvisioningStatus { + Error = "Error", + InProgress = "InProgress", + NotStarted = "NotStarted", + ReadySyncFunctional = "Ready_SyncFunctional", + ReadySyncNotFunctional = "Ready_SyncNotFunctional" +} + // @public export enum KnownWorkflowStatus { Aborted = "aborted", @@ -476,6 +565,19 @@ export interface LocationOperationStatusOptionalParams extends coreClient.Operat // @public export type LocationOperationStatusResponse = MicrosoftStorageSyncLocationOperationStatusHeaders & LocationOperationStatus; +// @public +export interface ManagedServiceIdentity { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity | null; + }; +} + +// @public +export type ManagedServiceIdentityType = string; + // @public (undocumented) export class MicrosoftStorageSync extends coreClient.ServiceClient { // (undocumented) @@ -569,7 +671,9 @@ export interface OperationResourceMetricSpecification { displayDescription?: string; displayName?: string; fillGapWithZero?: boolean; + lockAggregationType?: string; name?: string; + supportedAggregationTypes?: string[]; unit?: string; } @@ -680,6 +784,7 @@ export interface PrivateEndpoint { // @public export interface PrivateEndpointConnection extends Resource { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpoint; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; readonly provisioningState?: PrivateEndpointConnectionProvisioningState; @@ -695,9 +800,9 @@ export type PrivateEndpointConnectionProvisioningState = string; // @public export interface PrivateEndpointConnections { - beginCreate(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise, PrivateEndpointConnectionsCreateResponse>>; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise, PrivateEndpointConnectionsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; get(resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams): PagedAsyncIterableIterator; @@ -808,16 +913,20 @@ export interface RecallActionParameters { // @public export interface RegisteredServer extends ProxyResource { + readonly activeAuthType?: ServerAuthType; agentVersion?: string; readonly agentVersionExpirationDate?: Date; readonly agentVersionStatus?: RegisteredServerAgentVersionStatus; + applicationId?: string; clusterId?: string; clusterName?: string; discoveryEndpointUri?: string; friendlyName?: string; + readonly identity?: boolean; lastHeartBeat?: string; lastOperationName?: string; lastWorkflowId?: string; + latestApplicationId?: string; managementEndpointUri?: string; monitoringConfiguration?: string; monitoringEndpointUri?: string; @@ -844,9 +953,11 @@ export interface RegisteredServerArray { // @public export interface RegisteredServerCreateParameters extends ProxyResource { agentVersion?: string; + applicationId?: string; clusterId?: string; clusterName?: string; friendlyName?: string; + identity?: boolean; lastHeartBeat?: string; serverCertificate?: string; serverId?: string; @@ -856,12 +967,14 @@ export interface RegisteredServerCreateParameters extends ProxyResource { // @public export interface RegisteredServers { - beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, options?: RegisteredServersCreateOptionalParams): Promise, RegisteredServersCreateResponse>>; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, options?: RegisteredServersCreateOptionalParams): Promise, RegisteredServersCreateResponse>>; beginCreateAndWait(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, options?: RegisteredServersCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, storageSyncServiceName: string, serverId: string, options?: RegisteredServersDeleteOptionalParams): Promise, RegisteredServersDeleteResponse>>; + beginDelete(resourceGroupName: string, storageSyncServiceName: string, serverId: string, options?: RegisteredServersDeleteOptionalParams): Promise, RegisteredServersDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, storageSyncServiceName: string, serverId: string, options?: RegisteredServersDeleteOptionalParams): Promise; - beginTriggerRollover(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, options?: RegisteredServersTriggerRolloverOptionalParams): Promise, RegisteredServersTriggerRolloverResponse>>; + beginTriggerRollover(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, options?: RegisteredServersTriggerRolloverOptionalParams): Promise, RegisteredServersTriggerRolloverResponse>>; beginTriggerRolloverAndWait(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, options?: RegisteredServersTriggerRolloverOptionalParams): Promise; + beginUpdate(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: RegisteredServerUpdateParameters, options?: RegisteredServersUpdateOptionalParams): Promise, RegisteredServersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, storageSyncServiceName: string, serverId: string, parameters: RegisteredServerUpdateParameters, options?: RegisteredServersUpdateOptionalParams): Promise; get(resourceGroupName: string, storageSyncServiceName: string, serverId: string, options?: RegisteredServersGetOptionalParams): Promise; listByStorageSyncService(resourceGroupName: string, storageSyncServiceName: string, options?: RegisteredServersListByStorageSyncServiceOptionalParams): PagedAsyncIterableIterator; } @@ -937,10 +1050,32 @@ export interface RegisteredServersTriggerRolloverOptionalParams extends coreClie // @public export type RegisteredServersTriggerRolloverResponse = RegisteredServersTriggerRolloverHeaders; +// @public +export interface RegisteredServersUpdateHeaders { + xMsCorrelationRequestId?: string; + xMsRequestId?: string; +} + +// @public +export interface RegisteredServersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type RegisteredServersUpdateResponse = RegisteredServersUpdateHeaders & RegisteredServer; + +// @public +export interface RegisteredServerUpdateParameters extends ProxyResource { + applicationId?: string; + identity?: boolean; +} + // @public export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } @@ -956,6 +1091,9 @@ export interface RestoreFileSpec { path?: string; } +// @public +export type ServerAuthType = string; + // @public export interface ServerEndpoint extends ProxyResource { cloudTiering?: FeatureStatus; @@ -972,6 +1110,7 @@ export interface ServerEndpoint extends ProxyResource { readonly offlineDataTransferStorageAccountTenantId?: string; readonly provisioningState?: string; readonly recallStatus?: ServerEndpointRecallStatus; + serverEndpointProvisioningStatus?: ServerEndpointProvisioningStatus; serverLocalPath?: string; readonly serverName?: string; serverResourceId?: string; @@ -1003,6 +1142,7 @@ export interface ServerEndpointCloudTieringStatus { readonly lastCloudTieringResult?: number; readonly lastSuccessTimestamp?: Date; readonly lastUpdatedTimestamp?: Date; + readonly lowDiskMode?: CloudTieringLowDiskMode; readonly spaceSavings?: CloudTieringSpaceSavings; readonly volumeFreeSpacePolicyStatus?: CloudTieringVolumeFreeSpacePolicyStatus; } @@ -1035,6 +1175,27 @@ export type ServerEndpointHealthState = string; // @public export type ServerEndpointOfflineDataTransferState = string; +// @public +export interface ServerEndpointProvisioningStatus { + readonly provisioningStatus?: ServerProvisioningStatus; + readonly provisioningStepStatuses?: ServerEndpointProvisioningStepStatus[]; + readonly provisioningType?: string; +} + +// @public +export interface ServerEndpointProvisioningStepStatus { + readonly additionalInformation?: { + [propertyName: string]: string; + }; + readonly endTime?: Date; + readonly errorCode?: number; + readonly minutesLeft?: number; + readonly name?: string; + readonly progressPercentage?: number; + readonly startTime?: Date; + readonly status?: string; +} + // @public export interface ServerEndpointRecallError { readonly count?: number; @@ -1050,13 +1211,13 @@ export interface ServerEndpointRecallStatus { // @public export interface ServerEndpoints { - beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, options?: ServerEndpointsCreateOptionalParams): Promise, ServerEndpointsCreateResponse>>; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, options?: ServerEndpointsCreateOptionalParams): Promise, ServerEndpointsCreateResponse>>; beginCreateAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, options?: ServerEndpointsCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsDeleteOptionalParams): Promise, ServerEndpointsDeleteResponse>>; + beginDelete(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsDeleteOptionalParams): Promise, ServerEndpointsDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsDeleteOptionalParams): Promise; - beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, options?: ServerEndpointsRecallActionOptionalParams): Promise, ServerEndpointsRecallActionResponse>>; + beginRecallAction(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, options?: ServerEndpointsRecallActionOptionalParams): Promise, ServerEndpointsRecallActionResponse>>; beginRecallActionAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, options?: ServerEndpointsRecallActionOptionalParams): Promise; - beginUpdate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsUpdateOptionalParams): Promise, ServerEndpointsUpdateResponse>>; + beginUpdate(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsUpdateOptionalParams): Promise, ServerEndpointsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsUpdateOptionalParams): Promise; get(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, options?: ServerEndpointsGetOptionalParams): Promise; listBySyncGroup(resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, options?: ServerEndpointsListBySyncGroupOptionalParams): PagedAsyncIterableIterator; @@ -1206,11 +1367,14 @@ export interface ServerEndpointUpdateParameters { volumeFreeSpacePercent?: number; } +// @public +export type ServerProvisioningStatus = string; + // @public export interface StorageSyncApiError { code?: string; details?: StorageSyncErrorDetails; - innerError?: StorageSyncInnerErrorDetails; + innererror?: StorageSyncInnerErrorDetails; message?: string; target?: string; } @@ -1243,6 +1407,7 @@ export interface StorageSyncInnerErrorDetails { // @public export interface StorageSyncService extends TrackedResource { + identity?: ManagedServiceIdentity; incomingTrafficPolicy?: IncomingTrafficPolicy; readonly lastOperationName?: string; readonly lastWorkflowId?: string; @@ -1250,6 +1415,7 @@ export interface StorageSyncService extends TrackedResource { readonly provisioningState?: string; readonly storageSyncServiceStatus?: number; readonly storageSyncServiceUid?: string; + readonly useIdentity?: boolean; } // @public @@ -1258,21 +1424,19 @@ export interface StorageSyncServiceArray { } // @public -export interface StorageSyncServiceCreateParameters { +export interface StorageSyncServiceCreateParameters extends TrackedResource { + identity?: ManagedServiceIdentity; incomingTrafficPolicy?: IncomingTrafficPolicy; - location: string; - tags?: { - [propertyName: string]: string; - }; + useIdentity?: boolean; } // @public export interface StorageSyncServices { - beginCreate(resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, options?: StorageSyncServicesCreateOptionalParams): Promise, StorageSyncServicesCreateResponse>>; + beginCreate(resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, options?: StorageSyncServicesCreateOptionalParams): Promise, StorageSyncServicesCreateResponse>>; beginCreateAndWait(resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, options?: StorageSyncServicesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesDeleteOptionalParams): Promise, StorageSyncServicesDeleteResponse>>; + beginDelete(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesDeleteOptionalParams): Promise, StorageSyncServicesDeleteResponse>>; beginDeleteAndWait(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesUpdateOptionalParams): Promise, StorageSyncServicesUpdateResponse>>; + beginUpdate(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesUpdateOptionalParams): Promise, StorageSyncServicesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesUpdateOptionalParams): Promise; checkNameAvailability(locationName: string, parameters: CheckNameAvailabilityParameters, options?: StorageSyncServicesCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, storageSyncServiceName: string, options?: StorageSyncServicesGetOptionalParams): Promise; @@ -1377,10 +1541,12 @@ export type StorageSyncServicesUpdateResponse = StorageSyncServicesUpdateHeaders // @public export interface StorageSyncServiceUpdateParameters { + identity?: ManagedServiceIdentity; incomingTrafficPolicy?: IncomingTrafficPolicy; tags?: { [propertyName: string]: string; }; + useIdentity?: boolean; } // @public @@ -1466,6 +1632,16 @@ export interface SyncGroupsListByStorageSyncServiceOptionalParams extends coreCl // @public export type SyncGroupsListByStorageSyncServiceResponse = SyncGroupsListByStorageSyncServiceHeaders & SyncGroupArray; +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + // @public export interface TrackedResource extends Resource { location: string; @@ -1486,6 +1662,12 @@ export interface TriggerRolloverRequest { serverCertificate?: string; } +// @public +export interface UserAssignedIdentity { + readonly clientId?: string; + readonly principalId?: string; +} + // @public export interface Workflow extends ProxyResource { readonly commandName?: string; diff --git a/sdk/storagesync/arm-storagesync/sample.env b/sdk/storagesync/arm-storagesync/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/storagesync/arm-storagesync/sample.env +++ b/sdk/storagesync/arm-storagesync/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/storagesync/arm-storagesync/src/lroImpl.ts b/sdk/storagesync/arm-storagesync/src/lroImpl.ts index 518d5f053b4e..5f88efab981b 100644 --- a/sdk/storagesync/arm-storagesync/src/lroImpl.ts +++ b/sdk/storagesync/arm-storagesync/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike }, + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal, + }); + }, + }; } diff --git a/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts b/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts index 9627f640d3d6..349cab1465db 100644 --- a/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts +++ b/sdk/storagesync/arm-storagesync/src/microsoftStorageSync.ts @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline"; import { PipelineRequest, PipelineResponse, - SendRequest + SendRequest, } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { @@ -24,7 +24,7 @@ import { ServerEndpointsImpl, RegisteredServersImpl, WorkflowsImpl, - OperationStatusOperationsImpl + OperationStatusOperationsImpl, } from "./operations"; import { Operations, @@ -36,14 +36,14 @@ import { ServerEndpoints, RegisteredServers, Workflows, - OperationStatusOperations + OperationStatusOperations, } from "./operationsInterfaces"; import * as Parameters from "./models/parameters"; import * as Mappers from "./models/mappers"; import { MicrosoftStorageSyncOptionalParams, LocationOperationStatusOptionalParams, - LocationOperationStatusResponse + LocationOperationStatusResponse, } from "./models"; export class MicrosoftStorageSync extends coreClient.ServiceClient { @@ -54,13 +54,13 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { /** * Initializes a new instance of the MicrosoftStorageSync class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: MicrosoftStorageSyncOptionalParams + options?: MicrosoftStorageSyncOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); @@ -75,10 +75,10 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { } const defaults: MicrosoftStorageSyncOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-storagesync/9.1.1`; + const packageDetails = `azsdk-js-arm-storagesync/10.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -88,20 +88,21 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -111,7 +112,7 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ @@ -121,9 +122,9 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -131,7 +132,7 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2020-09-01"; + this.apiVersion = options.apiVersion || "2022-09-01"; this.operations = new OperationsImpl(this); this.storageSyncServices = new StorageSyncServicesImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); @@ -154,7 +155,7 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { name: "CustomApiVersionPolicy", async sendRequest( request: PipelineRequest, - next: SendRequest + next: SendRequest, ): Promise { const param = request.url.split("?"); if (param.length > 1) { @@ -168,7 +169,7 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } @@ -182,11 +183,11 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { locationOperationStatus( locationName: string, operationId: string, - options?: LocationOperationStatusOptionalParams + options?: LocationOperationStatusOptionalParams, ): Promise { return this.sendOperationRequest( { locationName, operationId, options }, - locationOperationStatusOperationSpec + locationOperationStatusOperationSpec, ); } @@ -205,25 +206,24 @@ export class MicrosoftStorageSync extends coreClient.ServiceClient { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const locationOperationStatusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/operations/{operationId}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.LocationOperationStatus, - headersMapper: Mappers.MicrosoftStorageSyncLocationOperationStatusHeaders + headersMapper: Mappers.MicrosoftStorageSyncLocationOperationStatusHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.locationName, Parameters.subscriptionId, - Parameters.operationId + Parameters.operationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/models/index.ts b/sdk/storagesync/arm-storagesync/src/models/index.ts index 7c3cc1543b4b..214fc3a748df 100644 --- a/sdk/storagesync/arm-storagesync/src/models/index.ts +++ b/sdk/storagesync/arm-storagesync/src/models/index.ts @@ -64,8 +64,12 @@ export interface OperationResourceMetricSpecification { unit?: string; /** Aggregation type for the metric. */ aggregationType?: string; + /** Supported aggregation types for the metric. */ + supportedAggregationTypes?: string[]; /** Fill gaps in the metric with zero. */ fillGapWithZero?: boolean; + /** Lock Aggregation type for the metric. */ + lockAggregationType?: string; /** Dimensions for the metric specification. */ dimensions?: OperationResourceMetricSpecificationDimension[]; } @@ -99,7 +103,7 @@ export interface StorageSyncApiError { /** Error details of the given entry. */ details?: StorageSyncErrorDetails; /** Inner error details of the given entry. */ - innerError?: StorageSyncInnerErrorDetails; + innererror?: StorageSyncInnerErrorDetails; } /** Error Details object. */ @@ -161,39 +165,44 @@ export interface CheckNameAvailabilityResult { readonly message?: string; } -/** The parameters used when creating a storage sync service. */ -export interface StorageSyncServiceCreateParameters { - /** Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. */ - location: string; - /** Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. */ - tags?: { [propertyName: string]: string }; - /** Incoming Traffic Policy */ - incomingTrafficPolicy?: IncomingTrafficPolicy; -} - -/** The Private Endpoint resource. */ -export interface PrivateEndpoint { +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { /** - * The ARM identifier for Private Endpoint + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity | null; + }; } -/** A collection of information about the state of the connection between service consumer and provider. */ -export interface PrivateLinkServiceConnectionState { - /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ - status?: PrivateEndpointServiceConnectionStatus; - /** The reason for approval/rejection of the connection. */ - description?: string; - /** A message indicating if changes on the service provider require any updates on the consumer. */ - actionsRequired?: string; +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -207,14 +216,58 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** The private endpoint resource. */ +export interface PrivateEndpoint { + /** + * The ARM identifier for private endpoint. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; } /** Parameters for updating an Storage sync service. */ export interface StorageSyncServiceUpdateParameters { /** The user-specified tags associated with the storage sync service. */ tags?: { [propertyName: string]: string }; + /** managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; /** Incoming Traffic Policy */ incomingTrafficPolicy?: IncomingTrafficPolicy; + /** Use Identity authorization when customer have finished setup RBAC permissions. */ + useIdentity?: boolean; } /** Array of StorageSyncServices */ @@ -223,15 +276,15 @@ export interface StorageSyncServiceArray { value?: StorageSyncService[]; } -/** A list of private link resources */ +/** A list of private link resources. */ export interface PrivateLinkResourceListResult { /** Array of private link resources */ value?: PrivateLinkResource[]; } -/** List of private endpoint connection associated with the specified storage account */ +/** List of private endpoint connections associated with the specified resource. */ export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ + /** Array of private endpoint connections. */ value?: PrivateEndpointConnection[]; } @@ -444,6 +497,20 @@ export interface TriggerChangeDetectionParameters { paths?: string[]; } +/** Cloud endpoint AFS file share metadata signing certificate public keys. */ +export interface CloudEndpointAfsShareMetadataCertificatePublicKeys { + /** + * The first public key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firstKey?: string; + /** + * The second public key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly secondKey?: string; +} + /** Server Endpoint sync status */ export interface ServerEndpointSyncStatus { /** @@ -691,6 +758,11 @@ export interface ServerEndpointCloudTieringStatus { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly datePolicyStatus?: CloudTieringDatePolicyStatus; + /** + * Information regarding the low disk mode state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lowDiskMode?: CloudTieringLowDiskMode; } /** Server endpoint cloud tiering status object. */ @@ -817,6 +889,20 @@ export interface CloudTieringDatePolicyStatus { readonly tieredFilesMostRecentAccessTimestamp?: Date; } +/** Information regarding the low disk mode state */ +export interface CloudTieringLowDiskMode { + /** + * Last updated timestamp + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedTimestamp?: Date; + /** + * Low disk mode state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: CloudTieringLowDiskModeState; +} + /** Server endpoint recall status object. */ export interface ServerEndpointRecallStatus { /** @@ -850,6 +936,69 @@ export interface ServerEndpointRecallError { readonly count?: number; } +/** Server endpoint provisioning status information */ +export interface ServerEndpointProvisioningStatus { + /** + * Server Endpoint provisioning status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningStatus?: ServerProvisioningStatus; + /** + * Server Endpoint provisioning type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningType?: string; + /** + * Provisioning Step status information for each step in the provisioning process + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningStepStatuses?: ServerEndpointProvisioningStepStatus[]; +} + +/** Server endpoint provisioning step status object. */ +export interface ServerEndpointProvisioningStepStatus { + /** + * Name of the provisioning step + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Status of the provisioning step + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Start time of the provisioning step + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startTime?: Date; + /** + * Estimated completion time of the provisioning step in minutes + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly minutesLeft?: number; + /** + * Estimated progress percentage + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly progressPercentage?: number; + /** + * End time of the provisioning step + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly endTime?: Date; + /** + * Error code (HResult) for the provisioning step + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorCode?: number; + /** + * Additional information for the provisioning step + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInformation?: { [propertyName: string]: string }; +} + /** Parameters for updating an Server Endpoint. */ export interface ServerEndpointUpdateParameters { /** Cloud Tiering. */ @@ -886,6 +1035,55 @@ export interface RegisteredServerArray { value?: RegisteredServer[]; } +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponse { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** Trigger Rollover Request. */ export interface TriggerRolloverRequest { /** Certificate Data */ @@ -999,9 +1197,22 @@ export interface OperationDisplayResource { description?: string; } -/** The Private Endpoint Connection resource. */ +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + +/** The private endpoint connection resource. */ export interface PrivateEndpointConnection extends Resource { - /** The resource of private end point. */ + /** + * The group ids for the private endpoint resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; + /** The private endpoint resource. */ privateEndpoint?: PrivateEndpoint; /** A collection of information about the state of the connection between service consumer and provider. */ privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; @@ -1012,15 +1223,7 @@ export interface PrivateEndpointConnection extends Resource { readonly provisioningState?: PrivateEndpointConnectionProvisioningState; } -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** A private link resource */ +/** A private link resource. */ export interface PrivateLinkResource extends Resource { /** * The private link resource group id. @@ -1032,15 +1235,27 @@ export interface PrivateLinkResource extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly requiredMembers?: string[]; - /** The private link resource Private link DNS zone name. */ + /** The private link resource private link DNS zone name. */ requiredZoneNames?: string[]; } /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} +/** The parameters used when creating a storage sync service. */ +export interface StorageSyncServiceCreateParameters extends TrackedResource { + /** managed identities for the Storage Sync to interact with other Azure services without maintaining any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; + /** Incoming Traffic Policy */ + incomingTrafficPolicy?: IncomingTrafficPolicy; + /** Use Identity authorization when customer have finished setup RBAC permissions. */ + useIdentity?: boolean; +} + /** Storage Sync Service object. */ export interface StorageSyncService extends TrackedResource { + /** managed identities for the Storage Sync service to interact with other Azure services without maintaining any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; /** Incoming Traffic Policy */ incomingTrafficPolicy?: IncomingTrafficPolicy; /** @@ -1058,6 +1273,11 @@ export interface StorageSyncService extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: string; + /** + * Use Identity authorization when customer have finished setup RBAC permissions. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly useIdentity?: boolean; /** * StorageSyncService lastWorkflowId * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1232,6 +1452,8 @@ export interface ServerEndpoint extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serverName?: string; + /** Server Endpoint provisioning status */ + serverEndpointProvisioningStatus?: ServerEndpointProvisioningStatus; } /** Registered Server resource. */ @@ -1291,6 +1513,20 @@ export interface RegisteredServer extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly serverName?: string; + /** Server Application Id */ + applicationId?: string; + /** + * Apply server with newly discovered ApplicationId if available. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly identity?: boolean; + /** Latest Server Application Id discovered from the server. It is not yet applied. */ + latestApplicationId?: string; + /** + * Server auth type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly activeAuthType?: ServerAuthType; } /** The parameters used when creating a registered server. */ @@ -1313,6 +1549,18 @@ export interface RegisteredServerCreateParameters extends ProxyResource { serverId?: string; /** Friendly Name */ friendlyName?: string; + /** Server ServicePrincipal Id */ + applicationId?: string; + /** Apply server with newly discovered ApplicationId if available. */ + identity?: boolean; +} + +/** The parameters used when updating a registered server. */ +export interface RegisteredServerUpdateParameters extends ProxyResource { + /** Apply server with newly discovered ApplicationId if available. */ + identity?: boolean; + /** Apply server with new ServicePrincipal Id */ + applicationId?: string; } /** Workflow resource. */ @@ -1572,6 +1820,14 @@ export interface CloudEndpointsTriggerChangeDetectionHeaders { xMsCorrelationRequestId?: string; } +/** Defines headers for CloudEndpoints_afsShareMetadataCertificatePublicKeys operation. */ +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders { + /** request id. */ + xMsRequestId?: string; + /** correlation request id. */ + xMsCorrelationRequestId?: string; +} + /** Defines headers for ServerEndpoints_create operation. */ export interface ServerEndpointsCreateHeaders { /** request id. */ @@ -1646,6 +1902,14 @@ export interface RegisteredServersCreateHeaders { xMsCorrelationRequestId?: string; } +/** Defines headers for RegisteredServers_update operation. */ +export interface RegisteredServersUpdateHeaders { + /** request id. */ + xMsRequestId?: string; + /** correlation request id. */ + xMsCorrelationRequestId?: string; +} + /** Defines headers for RegisteredServers_delete operation. */ export interface RegisteredServersDeleteHeaders { /** request id. */ @@ -1702,12 +1966,36 @@ export interface MicrosoftStorageSyncLocationOperationStatusHeaders { xMsCorrelationRequestId?: string; } +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** + */ +export type ManagedServiceIdentityType = string; + /** Known values of {@link IncomingTrafficPolicy} that the service accepts. */ export enum KnownIncomingTrafficPolicy { /** AllowAllTraffic */ AllowAllTraffic = "AllowAllTraffic", /** AllowVirtualNetworksOnly */ - AllowVirtualNetworksOnly = "AllowVirtualNetworksOnly" + AllowVirtualNetworksOnly = "AllowVirtualNetworksOnly", } /** @@ -1720,6 +2008,30 @@ export enum KnownIncomingTrafficPolicy { */ export type IncomingTrafficPolicy = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key", +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ export enum KnownPrivateEndpointServiceConnectionStatus { /** Pending */ @@ -1727,7 +2039,7 @@ export enum KnownPrivateEndpointServiceConnectionStatus { /** Approved */ Approved = "Approved", /** Rejected */ - Rejected = "Rejected" + Rejected = "Rejected", } /** @@ -1750,7 +2062,7 @@ export enum KnownPrivateEndpointConnectionProvisioningState { /** Deleting */ Deleting = "Deleting", /** Failed */ - Failed = "Failed" + Failed = "Failed", } /** @@ -1770,7 +2082,7 @@ export enum KnownCloudEndpointChangeEnumerationActivityState { /** InitialEnumerationInProgress */ InitialEnumerationInProgress = "InitialEnumerationInProgress", /** EnumerationInProgress */ - EnumerationInProgress = "EnumerationInProgress" + EnumerationInProgress = "EnumerationInProgress", } /** @@ -1788,7 +2100,7 @@ export enum KnownCloudEndpointChangeEnumerationTotalCountsState { /** Calculating */ Calculating = "Calculating", /** Final */ - Final = "Final" + Final = "Final", } /** @@ -1806,7 +2118,7 @@ export enum KnownChangeDetectionMode { /** Default */ Default = "Default", /** Recursive */ - Recursive = "Recursive" + Recursive = "Recursive", } /** @@ -1824,7 +2136,7 @@ export enum KnownFeatureStatus { /** On */ On = "on", /** Off */ - Off = "off" + Off = "off", } /** @@ -1844,7 +2156,7 @@ export enum KnownInitialDownloadPolicy { /** NamespaceThenModifiedFiles */ NamespaceThenModifiedFiles = "NamespaceThenModifiedFiles", /** AvoidTieredFiles */ - AvoidTieredFiles = "AvoidTieredFiles" + AvoidTieredFiles = "AvoidTieredFiles", } /** @@ -1863,7 +2175,7 @@ export enum KnownLocalCacheMode { /** DownloadNewAndModifiedFiles */ DownloadNewAndModifiedFiles = "DownloadNewAndModifiedFiles", /** UpdateLocallyCachedFiles */ - UpdateLocallyCachedFiles = "UpdateLocallyCachedFiles" + UpdateLocallyCachedFiles = "UpdateLocallyCachedFiles", } /** @@ -1881,7 +2193,7 @@ export enum KnownInitialUploadPolicy { /** ServerAuthoritative */ ServerAuthoritative = "ServerAuthoritative", /** Merge */ - Merge = "Merge" + Merge = "Merge", } /** @@ -1901,7 +2213,7 @@ export enum KnownServerEndpointHealthState { /** Healthy */ Healthy = "Healthy", /** Error */ - Error = "Error" + Error = "Error", } /** @@ -1922,7 +2234,7 @@ export enum KnownServerEndpointSyncActivityState { /** Download */ Download = "Download", /** UploadAndDownload */ - UploadAndDownload = "UploadAndDownload" + UploadAndDownload = "UploadAndDownload", } /** @@ -1947,7 +2259,7 @@ export enum KnownServerEndpointSyncMode { /** SnapshotUpload */ SnapshotUpload = "SnapshotUpload", /** InitialFullDownload */ - InitialFullDownload = "InitialFullDownload" + InitialFullDownload = "InitialFullDownload", } /** @@ -1972,7 +2284,7 @@ export enum KnownServerEndpointOfflineDataTransferState { /** NotRunning */ NotRunning = "NotRunning", /** Complete */ - Complete = "Complete" + Complete = "Complete", } /** @@ -1987,6 +2299,51 @@ export enum KnownServerEndpointOfflineDataTransferState { */ export type ServerEndpointOfflineDataTransferState = string; +/** Known values of {@link CloudTieringLowDiskModeState} that the service accepts. */ +export enum KnownCloudTieringLowDiskModeState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines values for CloudTieringLowDiskModeState. \ + * {@link KnownCloudTieringLowDiskModeState} can be used interchangeably with CloudTieringLowDiskModeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type CloudTieringLowDiskModeState = string; + +/** Known values of {@link ServerProvisioningStatus} that the service accepts. */ +export enum KnownServerProvisioningStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** InProgress */ + InProgress = "InProgress", + /** ReadySyncNotFunctional */ + ReadySyncNotFunctional = "Ready_SyncNotFunctional", + /** ReadySyncFunctional */ + ReadySyncFunctional = "Ready_SyncFunctional", + /** Error */ + Error = "Error", +} + +/** + * Defines values for ServerProvisioningStatus. \ + * {@link KnownServerProvisioningStatus} can be used interchangeably with ServerProvisioningStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **InProgress** \ + * **Ready_SyncNotFunctional** \ + * **Ready_SyncFunctional** \ + * **Error** + */ +export type ServerProvisioningStatus = string; + /** Known values of {@link RegisteredServerAgentVersionStatus} that the service accepts. */ export enum KnownRegisteredServerAgentVersionStatus { /** Ok */ @@ -1996,7 +2353,7 @@ export enum KnownRegisteredServerAgentVersionStatus { /** Expired */ Expired = "Expired", /** Blocked */ - Blocked = "Blocked" + Blocked = "Blocked", } /** @@ -2011,6 +2368,24 @@ export enum KnownRegisteredServerAgentVersionStatus { */ export type RegisteredServerAgentVersionStatus = string; +/** Known values of {@link ServerAuthType} that the service accepts. */ +export enum KnownServerAuthType { + /** Certificate */ + Certificate = "Certificate", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", +} + +/** + * Defines values for ServerAuthType. \ + * {@link KnownServerAuthType} can be used interchangeably with ServerAuthType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Certificate** \ + * **ManagedIdentity** + */ +export type ServerAuthType = string; + /** Known values of {@link WorkflowStatus} that the service accepts. */ export enum KnownWorkflowStatus { /** Active */ @@ -2022,7 +2397,7 @@ export enum KnownWorkflowStatus { /** Aborted */ Aborted = "aborted", /** Failed */ - Failed = "failed" + Failed = "failed", } /** @@ -2045,7 +2420,7 @@ export enum KnownOperationDirection { /** Undo */ Undo = "undo", /** Cancel */ - Cancel = "cancel" + Cancel = "cancel", } /** @@ -2070,7 +2445,7 @@ export enum KnownReason { /** Suspended */ Suspended = "Suspended", /** Deleted */ - Deleted = "Deleted" + Deleted = "Deleted", } /** @@ -2097,7 +2472,7 @@ export enum KnownProgressType { /** Upload */ Upload = "upload", /** Recall */ - Recall = "recall" + Recall = "recall", } /** @@ -2136,7 +2511,8 @@ export interface StorageSyncServicesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the checkNameAvailability operation. */ -export type StorageSyncServicesCheckNameAvailabilityResponse = CheckNameAvailabilityResult; +export type StorageSyncServicesCheckNameAvailabilityResponse = + CheckNameAvailabilityResult; /** Optional parameters. */ export interface StorageSyncServicesCreateOptionalParams @@ -2170,8 +2546,8 @@ export interface StorageSyncServicesUpdateOptionalParams } /** Contains response data for the update operation. */ -export type StorageSyncServicesUpdateResponse = StorageSyncServicesUpdateHeaders & - StorageSyncService; +export type StorageSyncServicesUpdateResponse = + StorageSyncServicesUpdateHeaders & StorageSyncService; /** Optional parameters. */ export interface StorageSyncServicesDeleteOptionalParams @@ -2183,30 +2559,32 @@ export interface StorageSyncServicesDeleteOptionalParams } /** Contains response data for the delete operation. */ -export type StorageSyncServicesDeleteResponse = StorageSyncServicesDeleteHeaders; +export type StorageSyncServicesDeleteResponse = + StorageSyncServicesDeleteHeaders; /** Optional parameters. */ export interface StorageSyncServicesListByResourceGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type StorageSyncServicesListByResourceGroupResponse = StorageSyncServicesListByResourceGroupHeaders & - StorageSyncServiceArray; +export type StorageSyncServicesListByResourceGroupResponse = + StorageSyncServicesListByResourceGroupHeaders & StorageSyncServiceArray; /** Optional parameters. */ export interface StorageSyncServicesListBySubscriptionOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscription operation. */ -export type StorageSyncServicesListBySubscriptionResponse = StorageSyncServicesListBySubscriptionHeaders & - StorageSyncServiceArray; +export type StorageSyncServicesListBySubscriptionResponse = + StorageSyncServicesListBySubscriptionHeaders & StorageSyncServiceArray; /** Optional parameters. */ export interface PrivateLinkResourcesListByStorageSyncServiceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByStorageSyncService operation. */ -export type PrivateLinkResourcesListByStorageSyncServiceResponse = PrivateLinkResourceListResult; +export type PrivateLinkResourcesListByStorageSyncServiceResponse = + PrivateLinkResourceListResult; /** Optional parameters. */ export interface PrivateEndpointConnectionsGetOptionalParams @@ -2225,7 +2603,8 @@ export interface PrivateEndpointConnectionsCreateOptionalParams } /** Contains response data for the create operation. */ -export type PrivateEndpointConnectionsCreateResponse = PrivateEndpointConnection; +export type PrivateEndpointConnectionsCreateResponse = + PrivateEndpointConnection; /** Optional parameters. */ export interface PrivateEndpointConnectionsDeleteOptionalParams @@ -2241,16 +2620,17 @@ export interface PrivateEndpointConnectionsListByStorageSyncServiceOptionalParam extends coreClient.OperationOptions {} /** Contains response data for the listByStorageSyncService operation. */ -export type PrivateEndpointConnectionsListByStorageSyncServiceResponse = PrivateEndpointConnectionsListByStorageSyncServiceHeaders & - PrivateEndpointConnectionListResult; +export type PrivateEndpointConnectionsListByStorageSyncServiceResponse = + PrivateEndpointConnectionsListByStorageSyncServiceHeaders & + PrivateEndpointConnectionListResult; /** Optional parameters. */ export interface SyncGroupsListByStorageSyncServiceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByStorageSyncService operation. */ -export type SyncGroupsListByStorageSyncServiceResponse = SyncGroupsListByStorageSyncServiceHeaders & - SyncGroupArray; +export type SyncGroupsListByStorageSyncServiceResponse = + SyncGroupsListByStorageSyncServiceHeaders & SyncGroupArray; /** Optional parameters. */ export interface SyncGroupsCreateOptionalParams @@ -2311,8 +2691,8 @@ export interface CloudEndpointsListBySyncGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySyncGroup operation. */ -export type CloudEndpointsListBySyncGroupResponse = CloudEndpointsListBySyncGroupHeaders & - CloudEndpointArray; +export type CloudEndpointsListBySyncGroupResponse = + CloudEndpointsListBySyncGroupHeaders & CloudEndpointArray; /** Optional parameters. */ export interface CloudEndpointsPreBackupOptionalParams @@ -2353,7 +2733,8 @@ export interface CloudEndpointsRestoreheartbeatOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the restoreheartbeat operation. */ -export type CloudEndpointsRestoreheartbeatResponse = CloudEndpointsRestoreheartbeatHeaders; +export type CloudEndpointsRestoreheartbeatResponse = + CloudEndpointsRestoreheartbeatHeaders; /** Optional parameters. */ export interface CloudEndpointsPostRestoreOptionalParams @@ -2373,6 +2754,15 @@ export interface CloudEndpointsTriggerChangeDetectionOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the afsShareMetadataCertificatePublicKeys operation. */ +export type CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse = + CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders & + CloudEndpointAfsShareMetadataCertificatePublicKeys; + /** Optional parameters. */ export interface ServerEndpointsCreateOptionalParams extends coreClient.OperationOptions { @@ -2426,8 +2816,8 @@ export interface ServerEndpointsListBySyncGroupOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySyncGroup operation. */ -export type ServerEndpointsListBySyncGroupResponse = ServerEndpointsListBySyncGroupHeaders & - ServerEndpointArray; +export type ServerEndpointsListBySyncGroupResponse = + ServerEndpointsListBySyncGroupHeaders & ServerEndpointArray; /** Optional parameters. */ export interface ServerEndpointsRecallActionOptionalParams @@ -2439,15 +2829,16 @@ export interface ServerEndpointsRecallActionOptionalParams } /** Contains response data for the recallAction operation. */ -export type ServerEndpointsRecallActionResponse = ServerEndpointsRecallActionHeaders; +export type ServerEndpointsRecallActionResponse = + ServerEndpointsRecallActionHeaders; /** Optional parameters. */ export interface RegisteredServersListByStorageSyncServiceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByStorageSyncService operation. */ -export type RegisteredServersListByStorageSyncServiceResponse = RegisteredServersListByStorageSyncServiceHeaders & - RegisteredServerArray; +export type RegisteredServersListByStorageSyncServiceResponse = + RegisteredServersListByStorageSyncServiceHeaders & RegisteredServerArray; /** Optional parameters. */ export interface RegisteredServersGetOptionalParams @@ -2470,6 +2861,19 @@ export interface RegisteredServersCreateOptionalParams export type RegisteredServersCreateResponse = RegisteredServersCreateHeaders & RegisteredServer; +/** Optional parameters. */ +export interface RegisteredServersUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type RegisteredServersUpdateResponse = RegisteredServersUpdateHeaders & + RegisteredServer; + /** Optional parameters. */ export interface RegisteredServersDeleteOptionalParams extends coreClient.OperationOptions { @@ -2492,15 +2896,16 @@ export interface RegisteredServersTriggerRolloverOptionalParams } /** Contains response data for the triggerRollover operation. */ -export type RegisteredServersTriggerRolloverResponse = RegisteredServersTriggerRolloverHeaders; +export type RegisteredServersTriggerRolloverResponse = + RegisteredServersTriggerRolloverHeaders; /** Optional parameters. */ export interface WorkflowsListByStorageSyncServiceOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByStorageSyncService operation. */ -export type WorkflowsListByStorageSyncServiceResponse = WorkflowsListByStorageSyncServiceHeaders & - WorkflowArray; +export type WorkflowsListByStorageSyncServiceResponse = + WorkflowsListByStorageSyncServiceHeaders & WorkflowArray; /** Optional parameters. */ export interface WorkflowsGetOptionalParams @@ -2529,8 +2934,8 @@ export interface LocationOperationStatusOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the locationOperationStatus operation. */ -export type LocationOperationStatusResponse = MicrosoftStorageSyncLocationOperationStatusHeaders & - LocationOperationStatus; +export type LocationOperationStatusResponse = + MicrosoftStorageSyncLocationOperationStatusHeaders & LocationOperationStatus; /** Optional parameters. */ export interface MicrosoftStorageSyncOptionalParams diff --git a/sdk/storagesync/arm-storagesync/src/models/mappers.ts b/sdk/storagesync/arm-storagesync/src/models/mappers.ts index 56e7b37c8720..997728456c33 100644 --- a/sdk/storagesync/arm-storagesync/src/models/mappers.ts +++ b/sdk/storagesync/arm-storagesync/src/models/mappers.ts @@ -16,8 +16,8 @@ export const OperationEntityListResult: coreClient.CompositeMapper = { nextLink: { serializedName: "nextLink", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -26,13 +26,13 @@ export const OperationEntityListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OperationEntity" - } - } - } - } - } - } + className: "OperationEntity", + }, + }, + }, + }, + }, + }, }; export const OperationEntity: coreClient.CompositeMapper = { @@ -43,31 +43,31 @@ export const OperationEntity: coreClient.CompositeMapper = { name: { serializedName: "name", type: { - name: "String" - } + name: "String", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplayInfo" - } + className: "OperationDisplayInfo", + }, }, origin: { serializedName: "origin", type: { - name: "String" - } + name: "String", + }, }, properties: { serializedName: "properties", type: { name: "Composite", - className: "OperationProperties" - } - } - } - } + className: "OperationProperties", + }, + }, + }, + }, }; export const OperationDisplayInfo: coreClient.CompositeMapper = { @@ -78,29 +78,29 @@ export const OperationDisplayInfo: coreClient.CompositeMapper = { description: { serializedName: "description", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationProperties: coreClient.CompositeMapper = { @@ -112,117 +112,137 @@ export const OperationProperties: coreClient.CompositeMapper = { serializedName: "serviceSpecification", type: { name: "Composite", - className: "OperationResourceServiceSpecification" - } - } - } - } -}; - -export const OperationResourceServiceSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationResourceServiceSpecification", - modelProperties: { - metricSpecifications: { - serializedName: "metricSpecifications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationResourceMetricSpecification" - } - } - } - } - } - } + className: "OperationResourceServiceSpecification", + }, + }, + }, + }, }; -export const OperationResourceMetricSpecification: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationResourceMetricSpecification", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - displayDescription: { - serializedName: "displayDescription", - type: { - name: "String" - } - }, - unit: { - serializedName: "unit", - type: { - name: "String" - } - }, - aggregationType: { - serializedName: "aggregationType", - type: { - name: "String" - } - }, - fillGapWithZero: { - serializedName: "fillGapWithZero", - type: { - name: "Boolean" - } +export const OperationResourceServiceSpecification: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "OperationResourceServiceSpecification", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationResourceMetricSpecification", + }, + }, + }, + }, }, - dimensions: { - serializedName: "dimensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationResourceMetricSpecificationDimension" - } - } - } - } - } - } -}; + }, + }; -export const OperationResourceMetricSpecificationDimension: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationResourceMetricSpecificationDimension", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } +export const OperationResourceMetricSpecification: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "OperationResourceMetricSpecification", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + displayName: { + serializedName: "displayName", + type: { + name: "String", + }, + }, + displayDescription: { + serializedName: "displayDescription", + type: { + name: "String", + }, + }, + unit: { + serializedName: "unit", + type: { + name: "String", + }, + }, + aggregationType: { + serializedName: "aggregationType", + type: { + name: "String", + }, + }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean", + }, + }, + lockAggregationType: { + serializedName: "lockAggregationType", + type: { + name: "String", + }, + }, + dimensions: { + serializedName: "dimensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationResourceMetricSpecificationDimension", + }, + }, + }, + }, }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } + }, + }; + +export const OperationResourceMetricSpecificationDimension: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "OperationResourceMetricSpecificationDimension", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + displayName: { + serializedName: "displayName", + type: { + name: "String", + }, + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean", + }, + }, }, - toBeExportedForShoebox: { - serializedName: "toBeExportedForShoebox", - type: { - name: "Boolean" - } - } - } - } -}; + }, + }; export const StorageSyncError: coreClient.CompositeMapper = { type: { @@ -233,18 +253,18 @@ export const StorageSyncError: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "StorageSyncApiError" - } + className: "StorageSyncApiError", + }, }, innererror: { serializedName: "innererror", type: { name: "Composite", - className: "StorageSyncApiError" - } - } - } - } + className: "StorageSyncApiError", + }, + }, + }, + }, }; export const StorageSyncApiError: coreClient.CompositeMapper = { @@ -255,37 +275,37 @@ export const StorageSyncApiError: coreClient.CompositeMapper = { code: { serializedName: "code", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", type: { - name: "String" - } + name: "String", + }, }, details: { serializedName: "details", type: { name: "Composite", - className: "StorageSyncErrorDetails" - } + className: "StorageSyncErrorDetails", + }, }, - innerError: { - serializedName: "innerError", + innererror: { + serializedName: "innererror", type: { name: "Composite", - className: "StorageSyncInnerErrorDetails" - } - } - } - } + className: "StorageSyncInnerErrorDetails", + }, + }, + }, + }, }; export const StorageSyncErrorDetails: coreClient.CompositeMapper = { @@ -296,53 +316,53 @@ export const StorageSyncErrorDetails: coreClient.CompositeMapper = { code: { serializedName: "code", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, target: { serializedName: "target", type: { - name: "String" - } + name: "String", + }, }, requestUri: { serializedName: "requestUri", type: { - name: "String" - } + name: "String", + }, }, exceptionType: { serializedName: "exceptionType", type: { - name: "String" - } + name: "String", + }, }, httpMethod: { serializedName: "httpMethod", type: { - name: "String" - } + name: "String", + }, }, hashedMessage: { serializedName: "hashedMessage", type: { - name: "String" - } + name: "String", + }, }, httpErrorCode: { serializedName: "httpErrorCode", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const StorageSyncInnerErrorDetails: coreClient.CompositeMapper = { @@ -353,29 +373,29 @@ export const StorageSyncInnerErrorDetails: coreClient.CompositeMapper = { callStack: { serializedName: "callStack", type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", type: { - name: "String" - } + name: "String", + }, }, innerException: { serializedName: "innerException", type: { - name: "String" - } + name: "String", + }, }, innerExceptionCallStack: { serializedName: "innerExceptionCallStack", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CheckNameAvailabilityParameters: coreClient.CompositeMapper = { @@ -387,19 +407,19 @@ export const CheckNameAvailabilityParameters: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, type: { defaultValue: "Microsoft.StorageSync/storageSyncServices", isConstant: true, serializedName: "type", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { @@ -411,128 +431,213 @@ export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { serializedName: "nameAvailable", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, reason: { serializedName: "reason", readOnly: true, type: { name: "Enum", - allowedValues: ["Invalid", "AlreadyExists"] - } + allowedValues: ["Invalid", "AlreadyExists"], + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const StorageSyncServiceCreateParameters: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSyncServiceCreateParameters", + className: "ManagedServiceIdentity", modelProperties: { - location: { - serializedName: "location", + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + type: { + serializedName: "type", required: true, type: { - name: "String" - } + name: "String", + }, }, - tags: { - serializedName: "tags", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { + type: { name: "Composite", className: "UserAssignedIdentity" }, + }, + }, }, - incomingTrafficPolicy: { - serializedName: "properties.incomingTrafficPolicy", + }, + }, +}; + +export const UserAssignedIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UserAssignedIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String" - } - } - } - } + name: "Uuid", + }, + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + }, + }, }; -export const PrivateEndpoint: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpoint", + className: "Resource", modelProperties: { id: { serializedName: "id", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, }; -export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkServiceConnectionState", + className: "SystemData", modelProperties: { - status: { - serializedName: "status", + createdBy: { + serializedName: "createdBy", type: { - name: "String" - } + name: "String", + }, }, - description: { - serializedName: "description", + createdByType: { + serializedName: "createdByType", + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", type: { - name: "String" - } + name: "DateTime", + }, }, - actionsRequired: { - serializedName: "actionsRequired", + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String", + }, + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; -export const Resource: coreClient.CompositeMapper = { +export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "PrivateEndpoint", modelProperties: { id: { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, - name: { - serializedName: "name", - readOnly: true, + }, + }, +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, - type: { - serializedName: "type", - readOnly: true, + description: { + serializedName: "description", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String", + }, + }, + }, + }, }; export const StorageSyncServiceUpdateParameters: coreClient.CompositeMapper = { @@ -544,17 +649,30 @@ export const StorageSyncServiceUpdateParameters: coreClient.CompositeMapper = { serializedName: "tags", type: { name: "Dictionary", - value: { type: { name: "String" } } - } + value: { type: { name: "String" } }, + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, }, incomingTrafficPolicy: { serializedName: "properties.incomingTrafficPolicy", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + useIdentity: { + serializedName: "properties.useIdentity", + type: { + name: "Boolean", + }, + }, + }, + }, }; export const StorageSyncServiceArray: coreClient.CompositeMapper = { @@ -569,13 +687,13 @@ export const StorageSyncServiceArray: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "StorageSyncService" - } - } - } - } - } - } + className: "StorageSyncService", + }, + }, + }, + }, + }, + }, }; export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { @@ -590,13 +708,13 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" - } - } - } - } - } - } + className: "PrivateLinkResource", + }, + }, + }, + }, + }, + }, }; export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { @@ -611,13 +729,13 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, + }, + }, + }, }; export const SyncGroupArray: coreClient.CompositeMapper = { @@ -632,230 +750,233 @@ export const SyncGroupArray: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SyncGroup" - } - } - } - } - } - } -}; - -export const CloudEndpointChangeEnumerationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudEndpointChangeEnumerationStatus", - modelProperties: { - lastUpdatedTimestamp: { - serializedName: "lastUpdatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - lastEnumerationStatus: { - serializedName: "lastEnumerationStatus", - type: { - name: "Composite", - className: "CloudEndpointLastChangeEnumerationStatus" - } + className: "SyncGroup", + }, + }, + }, }, - activity: { - serializedName: "activity", - type: { - name: "Composite", - className: "CloudEndpointChangeEnumerationActivity" - } - } - } - } + }, + }, }; -export const CloudEndpointLastChangeEnumerationStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudEndpointLastChangeEnumerationStatus", - modelProperties: { - startedTimestamp: { - serializedName: "startedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - completedTimestamp: { - serializedName: "completedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - namespaceFilesCount: { - constraints: { - InclusiveMinimum: 0 +export const CloudEndpointChangeEnumerationStatus: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationStatus", + modelProperties: { + lastUpdatedTimestamp: { + serializedName: "lastUpdatedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "namespaceFilesCount", - readOnly: true, - type: { - name: "Number" - } - }, - namespaceDirectoriesCount: { - constraints: { - InclusiveMinimum: 0 + lastEnumerationStatus: { + serializedName: "lastEnumerationStatus", + type: { + name: "Composite", + className: "CloudEndpointLastChangeEnumerationStatus", + }, }, - serializedName: "namespaceDirectoriesCount", - readOnly: true, - type: { - name: "Number" - } - }, - namespaceSizeBytes: { - constraints: { - InclusiveMinimum: 0 + activity: { + serializedName: "activity", + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationActivity", + }, }, - serializedName: "namespaceSizeBytes", - readOnly: true, - type: { - name: "Number" - } }, - nextRunTimestamp: { - serializedName: "nextRunTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; + }, + }; -export const CloudEndpointChangeEnumerationActivity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudEndpointChangeEnumerationActivity", - modelProperties: { - lastUpdatedTimestamp: { - serializedName: "lastUpdatedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - operationState: { - serializedName: "operationState", - readOnly: true, - type: { - name: "String" - } - }, - statusCode: { - serializedName: "statusCode", - readOnly: true, - type: { - name: "Number" - } - }, - startedTimestamp: { - serializedName: "startedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - processedFilesCount: { - constraints: { - InclusiveMinimum: 0 +export const CloudEndpointLastChangeEnumerationStatus: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointLastChangeEnumerationStatus", + modelProperties: { + startedTimestamp: { + serializedName: "startedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "processedFilesCount", - readOnly: true, - type: { - name: "Number" - } - }, - processedDirectoriesCount: { - constraints: { - InclusiveMinimum: 0 + completedTimestamp: { + serializedName: "completedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "processedDirectoriesCount", - readOnly: true, - type: { - name: "Number" - } - }, - totalFilesCount: { - constraints: { - InclusiveMinimum: 0 + namespaceFilesCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "namespaceFilesCount", + readOnly: true, + type: { + name: "Number", + }, }, - serializedName: "totalFilesCount", - readOnly: true, - type: { - name: "Number" - } - }, - totalDirectoriesCount: { - constraints: { - InclusiveMinimum: 0 + namespaceDirectoriesCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "namespaceDirectoriesCount", + readOnly: true, + type: { + name: "Number", + }, }, - serializedName: "totalDirectoriesCount", - readOnly: true, - type: { - name: "Number" - } - }, - totalSizeBytes: { - constraints: { - InclusiveMinimum: 0 + namespaceSizeBytes: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "namespaceSizeBytes", + readOnly: true, + type: { + name: "Number", + }, }, - serializedName: "totalSizeBytes", - readOnly: true, - type: { - name: "Number" - } - }, - progressPercent: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 + nextRunTimestamp: { + serializedName: "nextRunTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "progressPercent", - readOnly: true, - type: { - name: "Number" - } }, - minutesRemaining: { - constraints: { - InclusiveMinimum: 0 + }, + }; + +export const CloudEndpointChangeEnumerationActivity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointChangeEnumerationActivity", + modelProperties: { + lastUpdatedTimestamp: { + serializedName: "lastUpdatedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "minutesRemaining", - readOnly: true, - type: { - name: "Number" - } - }, - totalCountsState: { - serializedName: "totalCountsState", - readOnly: true, - type: { - name: "String" - } - }, - deletesProgressPercent: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 + operationState: { + serializedName: "operationState", + readOnly: true, + type: { + name: "String", + }, }, - serializedName: "deletesProgressPercent", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; + statusCode: { + serializedName: "statusCode", + readOnly: true, + type: { + name: "Number", + }, + }, + startedTimestamp: { + serializedName: "startedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + processedFilesCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "processedFilesCount", + readOnly: true, + type: { + name: "Number", + }, + }, + processedDirectoriesCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "processedDirectoriesCount", + readOnly: true, + type: { + name: "Number", + }, + }, + totalFilesCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "totalFilesCount", + readOnly: true, + type: { + name: "Number", + }, + }, + totalDirectoriesCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "totalDirectoriesCount", + readOnly: true, + type: { + name: "Number", + }, + }, + totalSizeBytes: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "totalSizeBytes", + readOnly: true, + type: { + name: "Number", + }, + }, + progressPercent: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "progressPercent", + readOnly: true, + type: { + name: "Number", + }, + }, + minutesRemaining: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "minutesRemaining", + readOnly: true, + type: { + name: "Number", + }, + }, + totalCountsState: { + serializedName: "totalCountsState", + readOnly: true, + type: { + name: "String", + }, + }, + deletesProgressPercent: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "deletesProgressPercent", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, + }; export const CloudEndpointArray: coreClient.CompositeMapper = { type: { @@ -869,13 +990,13 @@ export const CloudEndpointArray: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "CloudEndpoint" - } - } - } - } - } - } + className: "CloudEndpoint", + }, + }, + }, + }, + }, + }, }; export const BackupRequest: coreClient.CompositeMapper = { @@ -886,11 +1007,11 @@ export const BackupRequest: coreClient.CompositeMapper = { azureFileShare: { serializedName: "azureFileShare", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PostBackupResponse: coreClient.CompositeMapper = { @@ -902,11 +1023,11 @@ export const PostBackupResponse: coreClient.CompositeMapper = { serializedName: "backupMetadata.cloudEndpointName", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PreRestoreRequest: coreClient.CompositeMapper = { @@ -917,44 +1038,44 @@ export const PreRestoreRequest: coreClient.CompositeMapper = { partition: { serializedName: "partition", type: { - name: "String" - } + name: "String", + }, }, replicaGroup: { serializedName: "replicaGroup", type: { - name: "String" - } + name: "String", + }, }, requestId: { serializedName: "requestId", type: { - name: "String" - } + name: "String", + }, }, azureFileShareUri: { serializedName: "azureFileShareUri", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, sourceAzureFileShareUri: { serializedName: "sourceAzureFileShareUri", type: { - name: "String" - } + name: "String", + }, }, backupMetadataPropertyBag: { serializedName: "backupMetadataPropertyBag", type: { - name: "String" - } + name: "String", + }, }, restoreFileSpec: { serializedName: "restoreFileSpec", @@ -963,19 +1084,19 @@ export const PreRestoreRequest: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RestoreFileSpec" - } - } - } + className: "RestoreFileSpec", + }, + }, + }, }, pauseWaitForSyncDrainTimePeriodInSeconds: { serializedName: "pauseWaitForSyncDrainTimePeriodInSeconds", type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const RestoreFileSpec: coreClient.CompositeMapper = { @@ -986,17 +1107,17 @@ export const RestoreFileSpec: coreClient.CompositeMapper = { path: { serializedName: "path", type: { - name: "String" - } + name: "String", + }, }, isdir: { serializedName: "isdir", type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const PostRestoreRequest: coreClient.CompositeMapper = { @@ -1007,44 +1128,44 @@ export const PostRestoreRequest: coreClient.CompositeMapper = { partition: { serializedName: "partition", type: { - name: "String" - } + name: "String", + }, }, replicaGroup: { serializedName: "replicaGroup", type: { - name: "String" - } + name: "String", + }, }, requestId: { serializedName: "requestId", type: { - name: "String" - } + name: "String", + }, }, azureFileShareUri: { serializedName: "azureFileShareUri", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", type: { - name: "String" - } + name: "String", + }, }, sourceAzureFileShareUri: { serializedName: "sourceAzureFileShareUri", type: { - name: "String" - } + name: "String", + }, }, failedFileList: { serializedName: "failedFileList", type: { - name: "String" - } + name: "String", + }, }, restoreFileSpec: { serializedName: "restoreFileSpec", @@ -1053,13 +1174,13 @@ export const PostRestoreRequest: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RestoreFileSpec" - } - } - } - } - } - } + className: "RestoreFileSpec", + }, + }, + }, + }, + }, + }, }; export const TriggerChangeDetectionParameters: coreClient.CompositeMapper = { @@ -1070,14 +1191,14 @@ export const TriggerChangeDetectionParameters: coreClient.CompositeMapper = { directoryPath: { serializedName: "directoryPath", type: { - name: "String" - } + name: "String", + }, }, changeDetectionMode: { serializedName: "changeDetectionMode", type: { - name: "String" - } + name: "String", + }, }, paths: { serializedName: "paths", @@ -1085,15 +1206,39 @@ export const TriggerChangeDetectionParameters: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; +export const CloudEndpointAfsShareMetadataCertificatePublicKeys: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointAfsShareMetadataCertificatePublicKeys", + modelProperties: { + firstKey: { + serializedName: "firstKey", + readOnly: true, + type: { + name: "String", + }, + }, + secondKey: { + serializedName: "secondKey", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + export const ServerEndpointSyncStatus: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1103,91 +1248,91 @@ export const ServerEndpointSyncStatus: coreClient.CompositeMapper = { serializedName: "downloadHealth", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, uploadHealth: { serializedName: "uploadHealth", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, combinedHealth: { serializedName: "combinedHealth", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, syncActivity: { serializedName: "syncActivity", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, totalPersistentFilesNotSyncingCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "totalPersistentFilesNotSyncingCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, lastUpdatedTimestamp: { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, uploadStatus: { serializedName: "uploadStatus", type: { name: "Composite", - className: "ServerEndpointSyncSessionStatus" - } + className: "ServerEndpointSyncSessionStatus", + }, }, downloadStatus: { serializedName: "downloadStatus", type: { name: "Composite", - className: "ServerEndpointSyncSessionStatus" - } + className: "ServerEndpointSyncSessionStatus", + }, }, uploadActivity: { serializedName: "uploadActivity", type: { name: "Composite", - className: "ServerEndpointSyncActivityStatus" - } + className: "ServerEndpointSyncActivityStatus", + }, }, downloadActivity: { serializedName: "downloadActivity", type: { name: "Composite", - className: "ServerEndpointSyncActivityStatus" - } + className: "ServerEndpointSyncActivityStatus", + }, }, offlineDataTransferStatus: { serializedName: "offlineDataTransferStatus", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, backgroundDataDownloadActivity: { serializedName: "backgroundDataDownloadActivity", type: { name: "Composite", - className: "ServerEndpointBackgroundDataDownloadActivity" - } - } - } - } + className: "ServerEndpointBackgroundDataDownloadActivity", + }, + }, + }, + }, }; export const ServerEndpointSyncSessionStatus: coreClient.CompositeMapper = { @@ -1199,52 +1344,52 @@ export const ServerEndpointSyncSessionStatus: coreClient.CompositeMapper = { serializedName: "lastSyncResult", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, lastSyncTimestamp: { serializedName: "lastSyncTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastSyncSuccessTimestamp: { serializedName: "lastSyncSuccessTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastSyncPerItemErrorCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "lastSyncPerItemErrorCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, persistentFilesNotSyncingCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "persistentFilesNotSyncingCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, transientFilesNotSyncingCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "transientFilesNotSyncingCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, filesNotSyncingErrors: { serializedName: "filesNotSyncingErrors", @@ -1254,20 +1399,20 @@ export const ServerEndpointSyncSessionStatus: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerEndpointFilesNotSyncingError" - } - } - } + className: "ServerEndpointFilesNotSyncingError", + }, + }, + }, }, lastSyncMode: { serializedName: "lastSyncMode", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpointFilesNotSyncingError: coreClient.CompositeMapper = { @@ -1279,31 +1424,31 @@ export const ServerEndpointFilesNotSyncingError: coreClient.CompositeMapper = { serializedName: "errorCode", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, persistentCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "persistentCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, transientCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "transientCount", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const ServerEndpointSyncActivityStatus: coreClient.CompositeMapper = { @@ -1315,123 +1460,124 @@ export const ServerEndpointSyncActivityStatus: coreClient.CompositeMapper = { serializedName: "timestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, perItemErrorCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "perItemErrorCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, appliedItemCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "appliedItemCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalItemCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "totalItemCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, appliedBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "appliedBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "totalBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, syncMode: { serializedName: "syncMode", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, sessionMinutesRemaining: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "sessionMinutesRemaining", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; -export const ServerEndpointBackgroundDataDownloadActivity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerEndpointBackgroundDataDownloadActivity", - modelProperties: { - timestamp: { - serializedName: "timestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - startedTimestamp: { - serializedName: "startedTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - percentProgress: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 +export const ServerEndpointBackgroundDataDownloadActivity: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ServerEndpointBackgroundDataDownloadActivity", + modelProperties: { + timestamp: { + serializedName: "timestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "percentProgress", - readOnly: true, - type: { - name: "Number" - } - }, - downloadedBytes: { - constraints: { - InclusiveMinimum: 0 + startedTimestamp: { + serializedName: "startedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, }, - serializedName: "downloadedBytes", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; + percentProgress: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "percentProgress", + readOnly: true, + type: { + name: "Number", + }, + }, + downloadedBytes: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "downloadedBytes", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, + }; export const ServerEndpointCloudTieringStatus: coreClient.CompositeMapper = { type: { @@ -1442,74 +1588,81 @@ export const ServerEndpointCloudTieringStatus: coreClient.CompositeMapper = { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, health: { serializedName: "health", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, healthLastUpdatedTimestamp: { serializedName: "healthLastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, lastCloudTieringResult: { serializedName: "lastCloudTieringResult", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, lastSuccessTimestamp: { serializedName: "lastSuccessTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, spaceSavings: { serializedName: "spaceSavings", type: { name: "Composite", - className: "CloudTieringSpaceSavings" - } + className: "CloudTieringSpaceSavings", + }, }, cachePerformance: { serializedName: "cachePerformance", type: { name: "Composite", - className: "CloudTieringCachePerformance" - } + className: "CloudTieringCachePerformance", + }, }, filesNotTiering: { serializedName: "filesNotTiering", type: { name: "Composite", - className: "CloudTieringFilesNotTiering" - } + className: "CloudTieringFilesNotTiering", + }, }, volumeFreeSpacePolicyStatus: { serializedName: "volumeFreeSpacePolicyStatus", type: { name: "Composite", - className: "CloudTieringVolumeFreeSpacePolicyStatus" - } + className: "CloudTieringVolumeFreeSpacePolicyStatus", + }, }, datePolicyStatus: { serializedName: "datePolicyStatus", type: { name: "Composite", - className: "CloudTieringDatePolicyStatus" - } - } - } - } + className: "CloudTieringDatePolicyStatus", + }, + }, + lowDiskMode: { + serializedName: "lowDiskMode", + type: { + name: "Composite", + className: "CloudTieringLowDiskMode", + }, + }, + }, + }, }; export const CloudTieringSpaceSavings: coreClient.CompositeMapper = { @@ -1521,62 +1674,62 @@ export const CloudTieringSpaceSavings: coreClient.CompositeMapper = { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, volumeSizeBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "volumeSizeBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalSizeCloudBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "totalSizeCloudBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, cachedSizeBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "cachedSizeBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, spaceSavingsPercent: { constraints: { InclusiveMaximum: 100, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "spaceSavingsPercent", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, spaceSavingsBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "spaceSavingsBytes", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const CloudTieringCachePerformance: coreClient.CompositeMapper = { @@ -1588,42 +1741,42 @@ export const CloudTieringCachePerformance: coreClient.CompositeMapper = { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, cacheHitBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "cacheHitBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, cacheMissBytes: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "cacheMissBytes", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, cacheHitBytesPercent: { constraints: { InclusiveMaximum: 100, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "cacheHitBytesPercent", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const CloudTieringFilesNotTiering: coreClient.CompositeMapper = { @@ -1635,18 +1788,18 @@ export const CloudTieringFilesNotTiering: coreClient.CompositeMapper = { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, totalFileCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "totalFileCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, errors: { serializedName: "errors", @@ -1656,13 +1809,13 @@ export const CloudTieringFilesNotTiering: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "FilesNotTieringError" - } - } - } - } - } - } + className: "FilesNotTieringError", + }, + }, + }, + }, + }, + }, }; export const FilesNotTieringError: coreClient.CompositeMapper = { @@ -1674,82 +1827,106 @@ export const FilesNotTieringError: coreClient.CompositeMapper = { serializedName: "errorCode", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, fileCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "fileCount", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; -export const CloudTieringVolumeFreeSpacePolicyStatus: coreClient.CompositeMapper = { +export const CloudTieringVolumeFreeSpacePolicyStatus: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudTieringVolumeFreeSpacePolicyStatus", + modelProperties: { + lastUpdatedTimestamp: { + serializedName: "lastUpdatedTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + effectiveVolumeFreeSpacePolicy: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "effectiveVolumeFreeSpacePolicy", + readOnly: true, + type: { + name: "Number", + }, + }, + currentVolumeFreeSpacePercent: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "currentVolumeFreeSpacePercent", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const CloudTieringDatePolicyStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudTieringVolumeFreeSpacePolicyStatus", + className: "CloudTieringDatePolicyStatus", modelProperties: { lastUpdatedTimestamp: { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } - }, - effectiveVolumeFreeSpacePolicy: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 + name: "DateTime", }, - serializedName: "effectiveVolumeFreeSpacePolicy", - readOnly: true, - type: { - name: "Number" - } }, - currentVolumeFreeSpacePercent: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0 - }, - serializedName: "currentVolumeFreeSpacePercent", + tieredFilesMostRecentAccessTimestamp: { + serializedName: "tieredFilesMostRecentAccessTimestamp", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; -export const CloudTieringDatePolicyStatus: coreClient.CompositeMapper = { +export const CloudTieringLowDiskMode: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CloudTieringDatePolicyStatus", + className: "CloudTieringLowDiskMode", modelProperties: { lastUpdatedTimestamp: { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, - tieredFilesMostRecentAccessTimestamp: { - serializedName: "tieredFilesMostRecentAccessTimestamp", + state: { + serializedName: "state", readOnly: true, type: { - name: "DateTime" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpointRecallStatus: coreClient.CompositeMapper = { @@ -1761,18 +1938,18 @@ export const ServerEndpointRecallStatus: coreClient.CompositeMapper = { serializedName: "lastUpdatedTimestamp", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, totalRecallErrorsCount: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "totalRecallErrorsCount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, recallErrors: { serializedName: "recallErrors", @@ -1782,13 +1959,13 @@ export const ServerEndpointRecallStatus: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerEndpointRecallError" - } - } - } - } - } - } + className: "ServerEndpointRecallError", + }, + }, + }, + }, + }, + }, }; export const ServerEndpointRecallError: coreClient.CompositeMapper = { @@ -1800,23 +1977,126 @@ export const ServerEndpointRecallError: coreClient.CompositeMapper = { serializedName: "errorCode", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, count: { constraints: { - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "count", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, +}; + +export const ServerEndpointProvisioningStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerEndpointProvisioningStatus", + modelProperties: { + provisioningStatus: { + serializedName: "provisioningStatus", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningType: { + serializedName: "provisioningType", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningStepStatuses: { + serializedName: "provisioningStepStatuses", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerEndpointProvisioningStepStatus", + }, + }, + }, + }, + }, + }, }; +export const ServerEndpointProvisioningStepStatus: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ServerEndpointProvisioningStepStatus", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String", + }, + }, + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + minutesLeft: { + serializedName: "minutesLeft", + readOnly: true, + type: { + name: "Number", + }, + }, + progressPercentage: { + serializedName: "progressPercentage", + readOnly: true, + type: { + name: "Number", + }, + }, + endTime: { + serializedName: "endTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + errorCode: { + serializedName: "errorCode", + readOnly: true, + type: { + name: "Number", + }, + }, + additionalInformation: { + serializedName: "additionalInformation", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, + }; + export const ServerEndpointUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1825,49 +2105,50 @@ export const ServerEndpointUpdateParameters: coreClient.CompositeMapper = { cloudTiering: { serializedName: "properties.cloudTiering", type: { - name: "String" - } + name: "String", + }, }, volumeFreeSpacePercent: { constraints: { InclusiveMaximum: 100, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "properties.volumeFreeSpacePercent", type: { - name: "Number" - } + name: "Number", + }, }, tierFilesOlderThanDays: { constraints: { InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "properties.tierFilesOlderThanDays", type: { - name: "Number" - } + name: "Number", + }, }, offlineDataTransfer: { serializedName: "properties.offlineDataTransfer", type: { - name: "String" - } + name: "String", + }, }, offlineDataTransferShareName: { serializedName: "properties.offlineDataTransferShareName", type: { - name: "String" - } + name: "String", + }, }, localCacheMode: { + defaultValue: "UpdateLocallyCachedFiles", serializedName: "properties.localCacheMode", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpointArray: coreClient.CompositeMapper = { @@ -1882,13 +2163,13 @@ export const ServerEndpointArray: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerEndpoint" - } - } - } - } - } - } + className: "ServerEndpoint", + }, + }, + }, + }, + }, + }, }; export const RecallActionParameters: coreClient.CompositeMapper = { @@ -1899,17 +2180,17 @@ export const RecallActionParameters: coreClient.CompositeMapper = { pattern: { serializedName: "pattern", type: { - name: "String" - } + name: "String", + }, }, recallPath: { serializedName: "recallPath", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const RegisteredServerArray: coreClient.CompositeMapper = { @@ -1924,13 +2205,109 @@ export const RegisteredServerArray: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RegisteredServer" - } - } - } - } - } - } + className: "RegisteredServer", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, + }, + }, + }, + }, +}; + +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const TriggerRolloverRequest: coreClient.CompositeMapper = { @@ -1941,11 +2318,11 @@ export const TriggerRolloverRequest: coreClient.CompositeMapper = { serverCertificate: { serializedName: "serverCertificate", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WorkflowArray: coreClient.CompositeMapper = { @@ -1960,13 +2337,13 @@ export const WorkflowArray: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Workflow" - } - } - } - } - } - } + className: "Workflow", + }, + }, + }, + }, + }, + }, }; export const OperationStatus: coreClient.CompositeMapper = { @@ -1978,39 +2355,39 @@ export const OperationStatus: coreClient.CompositeMapper = { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, startTime: { serializedName: "startTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, endTime: { serializedName: "endTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, error: { serializedName: "error", type: { name: "Composite", - className: "StorageSyncApiError" - } - } - } - } + className: "StorageSyncApiError", + }, + }, + }, + }, }; export const LocationOperationStatus: coreClient.CompositeMapper = { @@ -2022,53 +2399,53 @@ export const LocationOperationStatus: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "status", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, startTime: { serializedName: "startTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, endTime: { serializedName: "endTime", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, error: { serializedName: "error", type: { name: "Composite", - className: "StorageSyncApiError" - } + className: "StorageSyncApiError", + }, }, percentComplete: { serializedName: "percentComplete", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const SubscriptionState: coreClient.CompositeMapper = { @@ -2079,25 +2456,25 @@ export const SubscriptionState: coreClient.CompositeMapper = { state: { serializedName: "state", type: { - name: "String" - } + name: "String", + }, }, istransitioning: { serializedName: "istransitioning", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, properties: { serializedName: "properties", type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const ResourcesMoveInfo: coreClient.CompositeMapper = { @@ -2108,8 +2485,8 @@ export const ResourcesMoveInfo: coreClient.CompositeMapper = { targetResourceGroup: { serializedName: "targetResourceGroup", type: { - name: "String" - } + name: "String", + }, }, resources: { serializedName: "resources", @@ -2117,13 +2494,13 @@ export const ResourcesMoveInfo: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const OperationDisplayResource: coreClient.CompositeMapper = { @@ -2134,29 +2511,53 @@ export const OperationDisplayResource: coreClient.CompositeMapper = { provider: { serializedName: "provider", type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + }, + }, }; export const PrivateEndpointConnection: coreClient.CompositeMapper = { @@ -2165,53 +2566,41 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { className: "PrivateEndpointConnection", modelProperties: { ...Resource.type.modelProperties, + groupIds: { + serializedName: "properties.groupIds", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, privateEndpoint: { serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "PrivateEndpoint" - } + className: "PrivateEndpoint", + }, }, privateLinkServiceConnectionState: { serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "PrivateLinkServiceConnectionState" - } + className: "PrivateLinkServiceConnectionState", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } - } - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } + name: "String", + }, }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } - } - } + }, + }, }; export const PrivateLinkResource: coreClient.CompositeMapper = { @@ -2224,8 +2613,8 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { serializedName: "properties.groupId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, requiredMembers: { serializedName: "properties.requiredMembers", @@ -2234,34 +2623,63 @@ export const PrivateLinkResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, requiredZoneNames: { serializedName: "properties.requiredZoneNames", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties, + }, + }, +}; + +export const StorageSyncServiceCreateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageSyncServiceCreateParameters", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + incomingTrafficPolicy: { + serializedName: "properties.incomingTrafficPolicy", + type: { + name: "String", + }, + }, + useIdentity: { + serializedName: "properties.useIdentity", + type: { + name: "Boolean", + }, + }, + }, + }, }; export const StorageSyncService: coreClient.CompositeMapper = { @@ -2270,46 +2688,60 @@ export const StorageSyncService: coreClient.CompositeMapper = { className: "StorageSyncService", modelProperties: { ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, incomingTrafficPolicy: { serializedName: "properties.incomingTrafficPolicy", type: { - name: "String" - } + name: "String", + }, }, storageSyncServiceStatus: { serializedName: "properties.storageSyncServiceStatus", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, storageSyncServiceUid: { serializedName: "properties.storageSyncServiceUid", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, + }, + useIdentity: { + serializedName: "properties.useIdentity", + readOnly: true, + type: { + name: "Boolean", + }, }, lastWorkflowId: { serializedName: "properties.lastWorkflowId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lastOperationName: { serializedName: "properties.lastOperationName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, privateEndpointConnections: { serializedName: "properties.privateEndpointConnections", @@ -2319,13 +2751,13 @@ export const StorageSyncService: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateEndpointConnection" - } - } - } - } - } - } + className: "PrivateEndpointConnection", + }, + }, + }, + }, + }, + }, }; export const SyncGroup: coreClient.CompositeMapper = { @@ -2338,18 +2770,18 @@ export const SyncGroup: coreClient.CompositeMapper = { serializedName: "properties.uniqueId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, syncGroupStatus: { serializedName: "properties.syncGroupStatus", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SyncGroupCreateParameters: coreClient.CompositeMapper = { @@ -2362,11 +2794,11 @@ export const SyncGroupCreateParameters: coreClient.CompositeMapper = { serializedName: "properties", type: { name: "Dictionary", - value: { type: { name: "any" } } - } - } - } - } + value: { type: { name: "any" } }, + }, + }, + }, + }, }; export const CloudEndpointCreateParameters: coreClient.CompositeMapper = { @@ -2378,29 +2810,29 @@ export const CloudEndpointCreateParameters: coreClient.CompositeMapper = { storageAccountResourceId: { serializedName: "properties.storageAccountResourceId", type: { - name: "String" - } + name: "String", + }, }, azureFileShareName: { serializedName: "properties.azureFileShareName", type: { - name: "String" - } + name: "String", + }, }, storageAccountTenantId: { serializedName: "properties.storageAccountTenantId", type: { - name: "String" - } + name: "String", + }, }, friendlyName: { serializedName: "properties.friendlyName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CloudEndpoint: coreClient.CompositeMapper = { @@ -2412,67 +2844,67 @@ export const CloudEndpoint: coreClient.CompositeMapper = { storageAccountResourceId: { serializedName: "properties.storageAccountResourceId", type: { - name: "String" - } + name: "String", + }, }, azureFileShareName: { serializedName: "properties.azureFileShareName", type: { - name: "String" - } + name: "String", + }, }, storageAccountTenantId: { serializedName: "properties.storageAccountTenantId", type: { - name: "String" - } + name: "String", + }, }, partnershipId: { serializedName: "properties.partnershipId", type: { - name: "String" - } + name: "String", + }, }, friendlyName: { serializedName: "properties.friendlyName", type: { - name: "String" - } + name: "String", + }, }, backupEnabled: { serializedName: "properties.backupEnabled", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "String" - } + name: "String", + }, }, lastWorkflowId: { serializedName: "properties.lastWorkflowId", type: { - name: "String" - } + name: "String", + }, }, lastOperationName: { serializedName: "properties.lastOperationName", type: { - name: "String" - } + name: "String", + }, }, changeEnumerationStatus: { serializedName: "properties.changeEnumerationStatus", type: { name: "Composite", - className: "CloudEndpointChangeEnumerationStatus" - } - } - } - } + className: "CloudEndpointChangeEnumerationStatus", + }, + }, + }, + }, }; export const ServerEndpointCreateParameters: coreClient.CompositeMapper = { @@ -2484,80 +2916,84 @@ export const ServerEndpointCreateParameters: coreClient.CompositeMapper = { serverLocalPath: { serializedName: "properties.serverLocalPath", type: { - name: "String" - } + name: "String", + }, }, cloudTiering: { serializedName: "properties.cloudTiering", type: { - name: "String" - } + name: "String", + }, }, volumeFreeSpacePercent: { defaultValue: 20, constraints: { InclusiveMaximum: 100, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "properties.volumeFreeSpacePercent", type: { - name: "Number" - } + name: "Number", + }, }, tierFilesOlderThanDays: { + defaultValue: 0, constraints: { InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "properties.tierFilesOlderThanDays", type: { - name: "Number" - } + name: "Number", + }, }, friendlyName: { serializedName: "properties.friendlyName", type: { - name: "String" - } + name: "String", + }, }, serverResourceId: { serializedName: "properties.serverResourceId", type: { - name: "String" - } + name: "String", + }, }, offlineDataTransfer: { serializedName: "properties.offlineDataTransfer", type: { - name: "String" - } + name: "String", + }, }, offlineDataTransferShareName: { serializedName: "properties.offlineDataTransferShareName", type: { - name: "String" - } + name: "String", + }, }, initialDownloadPolicy: { + defaultValue: "NamespaceThenModifiedFiles", serializedName: "properties.initialDownloadPolicy", type: { - name: "String" - } + name: "String", + }, }, localCacheMode: { + defaultValue: "UpdateLocallyCachedFiles", serializedName: "properties.localCacheMode", type: { - name: "String" - } + name: "String", + }, }, initialUploadPolicy: { + defaultValue: "Merge", serializedName: "properties.initialUploadPolicy", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpoint: coreClient.CompositeMapper = { @@ -2569,143 +3005,153 @@ export const ServerEndpoint: coreClient.CompositeMapper = { serverLocalPath: { serializedName: "properties.serverLocalPath", type: { - name: "String" - } + name: "String", + }, }, cloudTiering: { serializedName: "properties.cloudTiering", type: { - name: "String" - } + name: "String", + }, }, volumeFreeSpacePercent: { constraints: { InclusiveMaximum: 100, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "properties.volumeFreeSpacePercent", type: { - name: "Number" - } + name: "Number", + }, }, tierFilesOlderThanDays: { constraints: { InclusiveMaximum: 2147483647, - InclusiveMinimum: 0 + InclusiveMinimum: 0, }, serializedName: "properties.tierFilesOlderThanDays", type: { - name: "Number" - } + name: "Number", + }, }, friendlyName: { serializedName: "properties.friendlyName", type: { - name: "String" - } + name: "String", + }, }, serverResourceId: { serializedName: "properties.serverResourceId", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lastWorkflowId: { serializedName: "properties.lastWorkflowId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lastOperationName: { serializedName: "properties.lastOperationName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, syncStatus: { serializedName: "properties.syncStatus", type: { name: "Composite", - className: "ServerEndpointSyncStatus" - } + className: "ServerEndpointSyncStatus", + }, }, offlineDataTransfer: { serializedName: "properties.offlineDataTransfer", type: { - name: "String" - } + name: "String", + }, }, offlineDataTransferStorageAccountResourceId: { serializedName: "properties.offlineDataTransferStorageAccountResourceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, offlineDataTransferStorageAccountTenantId: { serializedName: "properties.offlineDataTransferStorageAccountTenantId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, offlineDataTransferShareName: { serializedName: "properties.offlineDataTransferShareName", type: { - name: "String" - } + name: "String", + }, }, cloudTieringStatus: { serializedName: "properties.cloudTieringStatus", type: { name: "Composite", - className: "ServerEndpointCloudTieringStatus" - } + className: "ServerEndpointCloudTieringStatus", + }, }, recallStatus: { serializedName: "properties.recallStatus", type: { name: "Composite", - className: "ServerEndpointRecallStatus" - } + className: "ServerEndpointRecallStatus", + }, }, initialDownloadPolicy: { + defaultValue: "NamespaceThenModifiedFiles", serializedName: "properties.initialDownloadPolicy", type: { - name: "String" - } + name: "String", + }, }, localCacheMode: { + defaultValue: "UpdateLocallyCachedFiles", serializedName: "properties.localCacheMode", type: { - name: "String" - } + name: "String", + }, }, initialUploadPolicy: { + defaultValue: "Merge", serializedName: "properties.initialUploadPolicy", type: { - name: "String" - } + name: "String", + }, }, serverName: { serializedName: "properties.serverName", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + serverEndpointProvisioningStatus: { + serializedName: "properties.serverEndpointProvisioningStatus", + type: { + name: "Composite", + className: "ServerEndpointProvisioningStatus", + }, + }, + }, + }, }; export const RegisteredServer: coreClient.CompositeMapper = { @@ -2717,146 +3163,172 @@ export const RegisteredServer: coreClient.CompositeMapper = { serverCertificate: { serializedName: "properties.serverCertificate", type: { - name: "String" - } + name: "String", + }, }, agentVersion: { serializedName: "properties.agentVersion", type: { - name: "String" - } + name: "String", + }, }, agentVersionStatus: { serializedName: "properties.agentVersionStatus", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, agentVersionExpirationDate: { serializedName: "properties.agentVersionExpirationDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, serverOSVersion: { serializedName: "properties.serverOSVersion", type: { - name: "String" - } + name: "String", + }, }, serverManagementErrorCode: { serializedName: "properties.serverManagementErrorCode", type: { - name: "Number" - } + name: "Number", + }, }, lastHeartBeat: { serializedName: "properties.lastHeartBeat", type: { - name: "String" - } + name: "String", + }, }, provisioningState: { serializedName: "properties.provisioningState", type: { - name: "String" - } + name: "String", + }, }, serverRole: { serializedName: "properties.serverRole", type: { - name: "String" - } + name: "String", + }, }, clusterId: { serializedName: "properties.clusterId", type: { - name: "String" - } + name: "String", + }, }, clusterName: { serializedName: "properties.clusterName", type: { - name: "String" - } + name: "String", + }, }, serverId: { serializedName: "properties.serverId", type: { - name: "String" - } + name: "String", + }, }, storageSyncServiceUid: { serializedName: "properties.storageSyncServiceUid", type: { - name: "String" - } + name: "String", + }, }, lastWorkflowId: { serializedName: "properties.lastWorkflowId", type: { - name: "String" - } + name: "String", + }, }, lastOperationName: { serializedName: "properties.lastOperationName", type: { - name: "String" - } + name: "String", + }, }, discoveryEndpointUri: { serializedName: "properties.discoveryEndpointUri", type: { - name: "String" - } + name: "String", + }, }, resourceLocation: { serializedName: "properties.resourceLocation", type: { - name: "String" - } + name: "String", + }, }, serviceLocation: { serializedName: "properties.serviceLocation", type: { - name: "String" - } + name: "String", + }, }, friendlyName: { serializedName: "properties.friendlyName", type: { - name: "String" - } + name: "String", + }, }, managementEndpointUri: { serializedName: "properties.managementEndpointUri", type: { - name: "String" - } + name: "String", + }, }, monitoringEndpointUri: { serializedName: "properties.monitoringEndpointUri", type: { - name: "String" - } + name: "String", + }, }, monitoringConfiguration: { serializedName: "properties.monitoringConfiguration", type: { - name: "String" - } + name: "String", + }, }, serverName: { serializedName: "properties.serverName", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + applicationId: { + serializedName: "properties.applicationId", + type: { + name: "String", + }, + }, + identity: { + serializedName: "properties.identity", + readOnly: true, + type: { + name: "Boolean", + }, + }, + latestApplicationId: { + serializedName: "properties.latestApplicationId", + type: { + name: "String", + }, + }, + activeAuthType: { + serializedName: "properties.activeAuthType", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, }; export const RegisteredServerCreateParameters: coreClient.CompositeMapper = { @@ -2868,59 +3340,93 @@ export const RegisteredServerCreateParameters: coreClient.CompositeMapper = { serverCertificate: { serializedName: "properties.serverCertificate", type: { - name: "String" - } + name: "String", + }, }, agentVersion: { serializedName: "properties.agentVersion", type: { - name: "String" - } + name: "String", + }, }, serverOSVersion: { serializedName: "properties.serverOSVersion", type: { - name: "String" - } + name: "String", + }, }, lastHeartBeat: { serializedName: "properties.lastHeartBeat", type: { - name: "String" - } + name: "String", + }, }, serverRole: { serializedName: "properties.serverRole", type: { - name: "String" - } + name: "String", + }, }, clusterId: { serializedName: "properties.clusterId", type: { - name: "String" - } + name: "String", + }, }, clusterName: { serializedName: "properties.clusterName", type: { - name: "String" - } + name: "String", + }, }, serverId: { serializedName: "properties.serverId", type: { - name: "String" - } + name: "String", + }, }, friendlyName: { serializedName: "properties.friendlyName", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + applicationId: { + serializedName: "properties.applicationId", + type: { + name: "String", + }, + }, + identity: { + serializedName: "properties.identity", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const RegisteredServerUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegisteredServerUpdateParameters", + modelProperties: { + ...ProxyResource.type.modelProperties, + identity: { + serializedName: "properties.identity", + type: { + name: "Boolean", + }, + }, + applicationId: { + serializedName: "properties.applicationId", + type: { + name: "String", + }, + }, + }, + }, }; export const Workflow: coreClient.CompositeMapper = { @@ -2932,364 +3438,370 @@ export const Workflow: coreClient.CompositeMapper = { lastStepName: { serializedName: "properties.lastStepName", type: { - name: "String" - } + name: "String", + }, }, status: { serializedName: "properties.status", type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "properties.operation", type: { - name: "String" - } + name: "String", + }, }, steps: { serializedName: "properties.steps", type: { - name: "String" - } + name: "String", + }, }, lastOperationId: { serializedName: "properties.lastOperationId", type: { - name: "String" - } + name: "String", + }, }, commandName: { serializedName: "properties.commandName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, createdTimestamp: { serializedName: "properties.createdTimestamp", readOnly: true, type: { - name: "DateTime" - } - }, - lastStatusTimestamp: { - serializedName: "properties.lastStatusTimestamp", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const OperationsListHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationsListHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const OperationsListNextHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationsListNextHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const StorageSyncServicesCreateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageSyncServicesCreateHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "String" - } - }, - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const StorageSyncServicesGetHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageSyncServicesGetHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const StorageSyncServicesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageSyncServicesUpdateHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } - }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; - -export const StorageSyncServicesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageSyncServicesDeleteHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } + name: "DateTime", + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", + lastStatusTimestamp: { + serializedName: "properties.lastStatusTimestamp", + readOnly: true, type: { - name: "String" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; -export const StorageSyncServicesListByResourceGroupHeaders: coreClient.CompositeMapper = { +export const OperationsListHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSyncServicesListByResourceGroupHeaders", + className: "OperationsListHeaders", modelProperties: { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const StorageSyncServicesListBySubscriptionHeaders: coreClient.CompositeMapper = { +export const OperationsListNextHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageSyncServicesListBySubscriptionHeaders", + className: "OperationsListNextHeaders", modelProperties: { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const PrivateEndpointConnectionsCreateHeaders: coreClient.CompositeMapper = { +export const StorageSyncServicesCreateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionsCreateHeaders", + className: "StorageSyncServicesCreateHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", type: { - name: "String" - } + name: "String", + }, }, location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, retryAfter: { serializedName: "retry-after", type: { - name: "String" - } + name: "String", + }, }, xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { +export const StorageSyncServicesGetHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionsDeleteHeaders", + className: "StorageSyncServicesGetHeaders", modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String" - } - }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - retryAfter: { - serializedName: "retry-after", - type: { - name: "String" - } - }, xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const PrivateEndpointConnectionsListByStorageSyncServiceHeaders: coreClient.CompositeMapper = { +export const StorageSyncServicesUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionsListByStorageSyncServiceHeaders", + className: "StorageSyncServicesUpdateHeaders", modelProperties: { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const SyncGroupsListByStorageSyncServiceHeaders: coreClient.CompositeMapper = { +export const StorageSyncServicesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupsListByStorageSyncServiceHeaders", + className: "StorageSyncServicesDeleteHeaders", modelProperties: { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; +export const StorageSyncServicesListByResourceGroupHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "StorageSyncServicesListByResourceGroupHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const StorageSyncServicesListBySubscriptionHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "StorageSyncServicesListBySubscriptionHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const PrivateEndpointConnectionsCreateHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String", + }, + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String", + }, + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const PrivateEndpointConnectionsListByStorageSyncServiceHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsListByStorageSyncServiceHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SyncGroupsListByStorageSyncServiceHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SyncGroupsListByStorageSyncServiceHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; + export const SyncGroupsCreateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3298,17 +3810,17 @@ export const SyncGroupsCreateHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SyncGroupsGetHeaders: coreClient.CompositeMapper = { @@ -3319,17 +3831,17 @@ export const SyncGroupsGetHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const SyncGroupsDeleteHeaders: coreClient.CompositeMapper = { @@ -3340,17 +3852,17 @@ export const SyncGroupsDeleteHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CloudEndpointsCreateHeaders: coreClient.CompositeMapper = { @@ -3361,17 +3873,17 @@ export const CloudEndpointsCreateHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CloudEndpointsGetHeaders: coreClient.CompositeMapper = { @@ -3382,17 +3894,17 @@ export const CloudEndpointsGetHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CloudEndpointsDeleteHeaders: coreClient.CompositeMapper = { @@ -3403,39 +3915,40 @@ export const CloudEndpointsDeleteHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const CloudEndpointsListBySyncGroupHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudEndpointsListBySyncGroupHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } +export const CloudEndpointsListBySyncGroupHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointsListBySyncGroupHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const CloudEndpointsPreBackupHeaders: coreClient.CompositeMapper = { type: { @@ -3445,23 +3958,23 @@ export const CloudEndpointsPreBackupHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CloudEndpointsPostBackupHeaders: coreClient.CompositeMapper = { @@ -3472,23 +3985,23 @@ export const CloudEndpointsPostBackupHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CloudEndpointsPreRestoreHeaders: coreClient.CompositeMapper = { @@ -3499,45 +4012,46 @@ export const CloudEndpointsPreRestoreHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const CloudEndpointsRestoreheartbeatHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudEndpointsRestoreheartbeatHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } +export const CloudEndpointsRestoreheartbeatHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointsRestoreheartbeatHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const CloudEndpointsPostRestoreHeaders: coreClient.CompositeMapper = { type: { @@ -3547,51 +4061,74 @@ export const CloudEndpointsPostRestoreHeaders: coreClient.CompositeMapper = { location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const CloudEndpointsTriggerChangeDetectionHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CloudEndpointsTriggerChangeDetectionHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } +export const CloudEndpointsTriggerChangeDetectionHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointsTriggerChangeDetectionHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } + }, + }; + +export const CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const ServerEndpointsCreateHeaders: coreClient.CompositeMapper = { type: { @@ -3601,17 +4138,17 @@ export const ServerEndpointsCreateHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpointsUpdateHeaders: coreClient.CompositeMapper = { @@ -3622,17 +4159,17 @@ export const ServerEndpointsUpdateHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpointsGetHeaders: coreClient.CompositeMapper = { @@ -3643,17 +4180,17 @@ export const ServerEndpointsGetHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ServerEndpointsDeleteHeaders: coreClient.CompositeMapper = { @@ -3664,45 +4201,46 @@ export const ServerEndpointsDeleteHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const ServerEndpointsListBySyncGroupHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerEndpointsListBySyncGroupHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - }, - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } +export const ServerEndpointsListBySyncGroupHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ServerEndpointsListBySyncGroupHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const ServerEndpointsRecallActionHeaders: coreClient.CompositeMapper = { type: { @@ -3712,39 +4250,40 @@ export const ServerEndpointsRecallActionHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const RegisteredServersListByStorageSyncServiceHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RegisteredServersListByStorageSyncServiceHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } +export const RegisteredServersListByStorageSyncServiceHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RegisteredServersListByStorageSyncServiceHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; export const RegisteredServersGetHeaders: coreClient.CompositeMapper = { type: { @@ -3754,17 +4293,17 @@ export const RegisteredServersGetHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const RegisteredServersCreateHeaders: coreClient.CompositeMapper = { @@ -3775,81 +4314,104 @@ export const RegisteredServersCreateHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const RegisteredServersDeleteHeaders: coreClient.CompositeMapper = { +export const RegisteredServersUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegisteredServersDeleteHeaders", + className: "RegisteredServersUpdateHeaders", modelProperties: { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const RegisteredServersTriggerRolloverHeaders: coreClient.CompositeMapper = { +export const RegisteredServersDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegisteredServersTriggerRolloverHeaders", + className: "RegisteredServersDeleteHeaders", modelProperties: { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const WorkflowsListByStorageSyncServiceHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkflowsListByStorageSyncServiceHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } +export const RegisteredServersTriggerRolloverHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RegisteredServersTriggerRolloverHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; + +export const WorkflowsListByStorageSyncServiceHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "WorkflowsListByStorageSyncServiceHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, + }, + }, + }; export const WorkflowsGetHeaders: coreClient.CompositeMapper = { type: { @@ -3859,17 +4421,17 @@ export const WorkflowsGetHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const WorkflowsAbortHeaders: coreClient.CompositeMapper = { @@ -3880,17 +4442,17 @@ export const WorkflowsAbortHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const OperationStatusGetHeaders: coreClient.CompositeMapper = { @@ -3901,36 +4463,37 @@ export const OperationStatusGetHeaders: coreClient.CompositeMapper = { xMsRequestId: { serializedName: "x-ms-request-id", type: { - name: "String" - } + name: "String", + }, }, xMsCorrelationRequestId: { serializedName: "x-ms-correlation-request-id", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const MicrosoftStorageSyncLocationOperationStatusHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MicrosoftStorageSyncLocationOperationStatusHeaders", - modelProperties: { - xMsRequestId: { - serializedName: "x-ms-request-id", - type: { - name: "String" - } +export const MicrosoftStorageSyncLocationOperationStatusHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MicrosoftStorageSyncLocationOperationStatusHeaders", + modelProperties: { + xMsRequestId: { + serializedName: "x-ms-request-id", + type: { + name: "String", + }, + }, + xMsCorrelationRequestId: { + serializedName: "x-ms-correlation-request-id", + type: { + name: "String", + }, + }, }, - xMsCorrelationRequestId: { - serializedName: "x-ms-correlation-request-id", - type: { - name: "String" - } - } - } - } -}; + }, + }; diff --git a/sdk/storagesync/arm-storagesync/src/models/parameters.ts b/sdk/storagesync/arm-storagesync/src/models/parameters.ts index 1a6b7e7c886b..70af80a0b176 100644 --- a/sdk/storagesync/arm-storagesync/src/models/parameters.ts +++ b/sdk/storagesync/arm-storagesync/src/models/parameters.ts @@ -9,7 +9,7 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper, @@ -26,7 +26,8 @@ import { ServerEndpointUpdateParameters as ServerEndpointUpdateParametersMapper, RecallActionParameters as RecallActionParametersMapper, RegisteredServerCreateParameters as RegisteredServerCreateParametersMapper, - TriggerRolloverRequest as TriggerRolloverRequestMapper + RegisteredServerUpdateParameters as RegisteredServerUpdateParametersMapper, + TriggerRolloverRequest as TriggerRolloverRequestMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -36,9 +37,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -47,22 +48,22 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2020-09-01", + defaultValue: "2022-09-01", isConstant: true, serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -71,10 +72,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const contentType: OperationParameter = { @@ -84,14 +85,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: CheckNameAvailabilityParametersMapper + mapper: CheckNameAvailabilityParametersMapper, }; export const locationName: OperationURLParameter = { @@ -100,28 +101,25 @@ export const locationName: OperationURLParameter = { serializedName: "locationName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { - constraints: { - MinLength: 1 - }, serializedName: "subscriptionId", required: true, type: { - name: "String" - } - } + name: "Uuid", + }, + }, }; export const parameters1: OperationParameter = { parameterPath: "parameters", - mapper: StorageSyncServiceCreateParametersMapper + mapper: StorageSyncServiceCreateParametersMapper, }; export const resourceGroupName: OperationURLParameter = { @@ -129,14 +127,14 @@ export const resourceGroupName: OperationURLParameter = { mapper: { constraints: { MaxLength: 90, - MinLength: 1 + MinLength: 1, }, serializedName: "resourceGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const storageSyncServiceName: OperationURLParameter = { @@ -145,14 +143,14 @@ export const storageSyncServiceName: OperationURLParameter = { serializedName: "storageSyncServiceName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters2: OperationParameter = { parameterPath: ["options", "parameters"], - mapper: StorageSyncServiceUpdateParametersMapper + mapper: StorageSyncServiceUpdateParametersMapper, }; export const privateEndpointConnectionName: OperationURLParameter = { @@ -161,19 +159,19 @@ export const privateEndpointConnectionName: OperationURLParameter = { serializedName: "privateEndpointConnectionName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const properties: OperationParameter = { parameterPath: "properties", - mapper: PrivateEndpointConnectionMapper + mapper: PrivateEndpointConnectionMapper, }; export const parameters3: OperationParameter = { parameterPath: "parameters", - mapper: SyncGroupCreateParametersMapper + mapper: SyncGroupCreateParametersMapper, }; export const syncGroupName: OperationURLParameter = { @@ -182,14 +180,14 @@ export const syncGroupName: OperationURLParameter = { serializedName: "syncGroupName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters4: OperationParameter = { parameterPath: "parameters", - mapper: CloudEndpointCreateParametersMapper + mapper: CloudEndpointCreateParametersMapper, }; export const cloudEndpointName: OperationURLParameter = { @@ -198,34 +196,34 @@ export const cloudEndpointName: OperationURLParameter = { serializedName: "cloudEndpointName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters5: OperationParameter = { parameterPath: "parameters", - mapper: BackupRequestMapper + mapper: BackupRequestMapper, }; export const parameters6: OperationParameter = { parameterPath: "parameters", - mapper: PreRestoreRequestMapper + mapper: PreRestoreRequestMapper, }; export const parameters7: OperationParameter = { parameterPath: "parameters", - mapper: PostRestoreRequestMapper + mapper: PostRestoreRequestMapper, }; export const parameters8: OperationParameter = { parameterPath: "parameters", - mapper: TriggerChangeDetectionParametersMapper + mapper: TriggerChangeDetectionParametersMapper, }; export const parameters9: OperationParameter = { parameterPath: "parameters", - mapper: ServerEndpointCreateParametersMapper + mapper: ServerEndpointCreateParametersMapper, }; export const serverEndpointName: OperationURLParameter = { @@ -234,19 +232,19 @@ export const serverEndpointName: OperationURLParameter = { serializedName: "serverEndpointName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters10: OperationParameter = { parameterPath: ["options", "parameters"], - mapper: ServerEndpointUpdateParametersMapper + mapper: ServerEndpointUpdateParametersMapper, }; export const parameters11: OperationParameter = { parameterPath: "parameters", - mapper: RecallActionParametersMapper + mapper: RecallActionParametersMapper, }; export const serverId: OperationURLParameter = { @@ -255,19 +253,24 @@ export const serverId: OperationURLParameter = { serializedName: "serverId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters12: OperationParameter = { parameterPath: "parameters", - mapper: RegisteredServerCreateParametersMapper + mapper: RegisteredServerCreateParametersMapper, }; export const parameters13: OperationParameter = { parameterPath: "parameters", - mapper: TriggerRolloverRequestMapper + mapper: RegisteredServerUpdateParametersMapper, +}; + +export const parameters14: OperationParameter = { + parameterPath: "parameters", + mapper: TriggerRolloverRequestMapper, }; export const workflowId: OperationURLParameter = { @@ -276,9 +279,9 @@ export const workflowId: OperationURLParameter = { serializedName: "workflowId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const operationId: OperationURLParameter = { @@ -287,7 +290,7 @@ export const operationId: OperationURLParameter = { serializedName: "operationId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts index 795f134796a8..976116c3c882 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/cloudEndpoints.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { CloudEndpoint, CloudEndpointsListBySyncGroupOptionalParams, @@ -37,7 +41,9 @@ import { PostRestoreRequest, CloudEndpointsPostRestoreOptionalParams, TriggerChangeDetectionParameters, - CloudEndpointsTriggerChangeDetectionOptionalParams + CloudEndpointsTriggerChangeDetectionOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse, } from "../models"; /// @@ -64,13 +70,13 @@ export class CloudEndpointsImpl implements CloudEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: CloudEndpointsListBySyncGroupOptionalParams + options?: CloudEndpointsListBySyncGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySyncGroupPagingAll( resourceGroupName, storageSyncServiceName, syncGroupName, - options + options, ); return { next() { @@ -88,9 +94,9 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName, syncGroupName, options, - settings + settings, ); - } + }, }; } @@ -99,14 +105,14 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, options?: CloudEndpointsListBySyncGroupOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: CloudEndpointsListBySyncGroupResponse; result = await this._listBySyncGroup( resourceGroupName, storageSyncServiceName, syncGroupName, - options + options, ); yield result.value || []; } @@ -115,13 +121,13 @@ export class CloudEndpointsImpl implements CloudEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: CloudEndpointsListBySyncGroupOptionalParams + options?: CloudEndpointsListBySyncGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySyncGroupPagingPage( resourceGroupName, storageSyncServiceName, syncGroupName, - options + options, )) { yield* page; } @@ -142,30 +148,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, - options?: CloudEndpointsCreateOptionalParams + options?: CloudEndpointsCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -174,8 +179,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -183,26 +188,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, - options + options, }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + CloudEndpointsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -223,7 +231,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, - options?: CloudEndpointsCreateOptionalParams + options?: CloudEndpointsCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, @@ -231,7 +239,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName, cloudEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -249,7 +257,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsGetOptionalParams + options?: CloudEndpointsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -257,9 +265,9 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName, syncGroupName, cloudEndpointName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -276,30 +284,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsDeleteOptionalParams + options?: CloudEndpointsDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsDeleteResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -308,8 +315,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -317,25 +324,28 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, - options + options, }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + CloudEndpointsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -354,14 +364,14 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsDeleteOptionalParams + options?: CloudEndpointsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, - options + options, ); return poller.pollUntilDone(); } @@ -377,11 +387,11 @@ export class CloudEndpointsImpl implements CloudEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: CloudEndpointsListBySyncGroupOptionalParams + options?: CloudEndpointsListBySyncGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, syncGroupName, options }, - listBySyncGroupOperationSpec + listBySyncGroupOperationSpec, ); } @@ -400,30 +410,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPreBackupOptionalParams + options?: CloudEndpointsPreBackupOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsPreBackupResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -432,8 +441,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -441,26 +450,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, - options + options, }, - preBackupOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: preBackupOperationSpec, + }); + const poller = await createHttpPoller< + CloudEndpointsPreBackupResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -481,7 +493,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPreBackupOptionalParams + options?: CloudEndpointsPreBackupOptionalParams, ): Promise { const poller = await this.beginPreBackup( resourceGroupName, @@ -489,7 +501,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName, cloudEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -509,30 +521,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPostBackupOptionalParams + options?: CloudEndpointsPostBackupOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsPostBackupResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -541,8 +552,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -550,26 +561,29 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, - options + options, }, - postBackupOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: postBackupOperationSpec, + }); + const poller = await createHttpPoller< + CloudEndpointsPostBackupResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -590,7 +604,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPostBackupOptionalParams + options?: CloudEndpointsPostBackupOptionalParams, ): Promise { const poller = await this.beginPostBackup( resourceGroupName, @@ -598,7 +612,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName, cloudEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -618,25 +632,24 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, - options?: CloudEndpointsPreRestoreOptionalParams - ): Promise, void>> { + options?: CloudEndpointsPreRestoreOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -645,8 +658,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -654,26 +667,26 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, - options + options, }, - preRestoreOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: preRestoreOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -694,7 +707,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, - options?: CloudEndpointsPreRestoreOptionalParams + options?: CloudEndpointsPreRestoreOptionalParams, ): Promise { const poller = await this.beginPreRestore( resourceGroupName, @@ -702,7 +715,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName, cloudEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -720,7 +733,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsRestoreheartbeatOptionalParams + options?: CloudEndpointsRestoreheartbeatOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -728,9 +741,9 @@ export class CloudEndpointsImpl implements CloudEndpoints { storageSyncServiceName, syncGroupName, cloudEndpointName, - options + options, }, - restoreheartbeatOperationSpec + restoreheartbeatOperationSpec, ); } @@ -749,25 +762,24 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, - options?: CloudEndpointsPostRestoreOptionalParams - ): Promise, void>> { + options?: CloudEndpointsPostRestoreOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -776,8 +788,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -785,26 +797,26 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, - options + options, }, - postRestoreOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: postRestoreOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -825,7 +837,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, - options?: CloudEndpointsPostRestoreOptionalParams + options?: CloudEndpointsPostRestoreOptionalParams, ): Promise { const poller = await this.beginPostRestore( resourceGroupName, @@ -833,7 +845,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName, cloudEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -854,25 +866,24 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, - options?: CloudEndpointsTriggerChangeDetectionOptionalParams - ): Promise, void>> { + options?: CloudEndpointsTriggerChangeDetectionOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -881,8 +892,8 @@ export class CloudEndpointsImpl implements CloudEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -890,26 +901,26 @@ export class CloudEndpointsImpl implements CloudEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, - options + options, }, - triggerChangeDetectionOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: triggerChangeDetectionOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -931,7 +942,7 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, - options?: CloudEndpointsTriggerChangeDetectionOptionalParams + options?: CloudEndpointsTriggerChangeDetectionOptionalParams, ): Promise { const poller = await this.beginTriggerChangeDetection( resourceGroupName, @@ -939,38 +950,64 @@ export class CloudEndpointsImpl implements CloudEndpoints { syncGroupName, cloudEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } + + /** + * Get the AFS file share metadata signing certificate public keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param cloudEndpointName Name of Cloud Endpoint object. + * @param options The options parameters. + */ + afsShareMetadataCertificatePublicKeys( + resourceGroupName: string, + storageSyncServiceName: string, + syncGroupName: string, + cloudEndpointName: string, + options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + storageSyncServiceName, + syncGroupName, + cloudEndpointName, + options, + }, + afsShareMetadataCertificatePublicKeysOperationSpec, + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.CloudEndpoint, - headersMapper: Mappers.CloudEndpointsCreateHeaders + headersMapper: Mappers.CloudEndpointsCreateHeaders, }, 201: { bodyMapper: Mappers.CloudEndpoint, - headersMapper: Mappers.CloudEndpointsCreateHeaders + headersMapper: Mappers.CloudEndpointsCreateHeaders, }, 202: { bodyMapper: Mappers.CloudEndpoint, - headersMapper: Mappers.CloudEndpointsCreateHeaders + headersMapper: Mappers.CloudEndpointsCreateHeaders, }, 204: { bodyMapper: Mappers.CloudEndpoint, - headersMapper: Mappers.CloudEndpointsCreateHeaders + headersMapper: Mappers.CloudEndpointsCreateHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters4, queryParameters: [Parameters.apiVersion], @@ -980,24 +1017,23 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudEndpoint, - headersMapper: Mappers.CloudEndpointsGetHeaders + headersMapper: Mappers.CloudEndpointsGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1006,31 +1042,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}", httpMethod: "DELETE", responses: { 200: { - headersMapper: Mappers.CloudEndpointsDeleteHeaders + headersMapper: Mappers.CloudEndpointsDeleteHeaders, }, 201: { - headersMapper: Mappers.CloudEndpointsDeleteHeaders + headersMapper: Mappers.CloudEndpointsDeleteHeaders, }, 202: { - headersMapper: Mappers.CloudEndpointsDeleteHeaders + headersMapper: Mappers.CloudEndpointsDeleteHeaders, }, 204: { - headersMapper: Mappers.CloudEndpointsDeleteHeaders + headersMapper: Mappers.CloudEndpointsDeleteHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1039,23 +1074,22 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listBySyncGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.CloudEndpointArray, - headersMapper: Mappers.CloudEndpointsListBySyncGroupHeaders + headersMapper: Mappers.CloudEndpointsListBySyncGroupHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1063,31 +1097,30 @@ const listBySyncGroupOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.syncGroupName + Parameters.syncGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const preBackupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.CloudEndpointsPreBackupHeaders + headersMapper: Mappers.CloudEndpointsPreBackupHeaders, }, 201: { - headersMapper: Mappers.CloudEndpointsPreBackupHeaders + headersMapper: Mappers.CloudEndpointsPreBackupHeaders, }, 202: { - headersMapper: Mappers.CloudEndpointsPreBackupHeaders + headersMapper: Mappers.CloudEndpointsPreBackupHeaders, }, 204: { - headersMapper: Mappers.CloudEndpointsPreBackupHeaders + headersMapper: Mappers.CloudEndpointsPreBackupHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], @@ -1097,36 +1130,35 @@ const preBackupOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const postBackupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup", httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.PostBackupResponse, - headersMapper: Mappers.CloudEndpointsPostBackupHeaders + headersMapper: Mappers.CloudEndpointsPostBackupHeaders, }, 201: { bodyMapper: Mappers.PostBackupResponse, - headersMapper: Mappers.CloudEndpointsPostBackupHeaders + headersMapper: Mappers.CloudEndpointsPostBackupHeaders, }, 202: { bodyMapper: Mappers.PostBackupResponse, - headersMapper: Mappers.CloudEndpointsPostBackupHeaders + headersMapper: Mappers.CloudEndpointsPostBackupHeaders, }, 204: { bodyMapper: Mappers.PostBackupResponse, - headersMapper: Mappers.CloudEndpointsPostBackupHeaders + headersMapper: Mappers.CloudEndpointsPostBackupHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], @@ -1136,15 +1168,14 @@ const postBackupOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const preRestoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore", httpMethod: "POST", responses: { 200: {}, @@ -1152,8 +1183,8 @@ const preRestoreOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], @@ -1163,23 +1194,22 @@ const preRestoreOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const restoreheartbeatOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/restoreheartbeat", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/restoreheartbeat", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.CloudEndpointsRestoreheartbeatHeaders + headersMapper: Mappers.CloudEndpointsRestoreheartbeatHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -1188,14 +1218,13 @@ const restoreheartbeatOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const postRestoreOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore", httpMethod: "POST", responses: { 200: {}, @@ -1203,8 +1232,8 @@ const postRestoreOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion], @@ -1214,15 +1243,14 @@ const postRestoreOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const triggerChangeDetectionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/triggerChangeDetection", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/triggerChangeDetection", httpMethod: "POST", responses: { 200: {}, @@ -1230,8 +1258,8 @@ const triggerChangeDetectionOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters8, queryParameters: [Parameters.apiVersion], @@ -1241,9 +1269,35 @@ const triggerChangeDetectionOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.cloudEndpointName + Parameters.cloudEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; +const afsShareMetadataCertificatePublicKeysOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/afsShareMetadataCertificatePublicKeys", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CloudEndpointAfsShareMetadataCertificatePublicKeys, + headersMapper: + Mappers.CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders, + }, + default: { + bodyMapper: Mappers.StorageSyncError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.syncGroupName, + Parameters.cloudEndpointName, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts b/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts index caa62a2e93ab..ab52454469ba 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/operationStatusOperations.ts @@ -13,12 +13,13 @@ import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; import { OperationStatusGetOptionalParams, - OperationStatusGetResponse + OperationStatusGetResponse, } from "../models"; /** Class containing OperationStatusOperations operations. */ export class OperationStatusOperationsImpl - implements OperationStatusOperations { + implements OperationStatusOperations +{ private readonly client: MicrosoftStorageSync; /** @@ -42,11 +43,11 @@ export class OperationStatusOperationsImpl locationName: string, workflowId: string, operationId: string, - options?: OperationStatusGetOptionalParams + options?: OperationStatusGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, locationName, workflowId, operationId, options }, - getOperationSpec + getOperationSpec, ); } } @@ -54,17 +55,16 @@ export class OperationStatusOperationsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/locations/{locationName}/workflows/{workflowId}/operations/{operationId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/locations/{locationName}/workflows/{workflowId}/operations/{operationId}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.OperationStatus, - headersMapper: Mappers.OperationStatusGetHeaders + headersMapper: Mappers.OperationStatusGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -73,8 +73,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.workflowId, - Parameters.operationId + Parameters.operationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/operations.ts b/sdk/storagesync/arm-storagesync/src/operations/operations.ts index b917d2e45161..b0461bc43bda 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/operations.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ public list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -54,13 +54,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +81,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -93,7 +93,7 @@ export class OperationsImpl implements Operations { * @param options The options parameters. */ private _list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,11 +105,11 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } } @@ -122,16 +122,16 @@ const listOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.OperationEntityListResult, - headersMapper: Mappers.OperationsListHeaders + headersMapper: Mappers.OperationsListHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", @@ -139,13 +139,13 @@ const listNextOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.OperationEntityListResult, - headersMapper: Mappers.OperationsListNextHeaders + headersMapper: Mappers.OperationsListNextHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts b/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts index b7ef05f5b84d..024b2c25a8e0 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/privateEndpointConnections.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, @@ -22,13 +26,14 @@ import { PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsCreateOptionalParams, PrivateEndpointConnectionsCreateResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, } from "../models"; /// /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl - implements PrivateEndpointConnections { + implements PrivateEndpointConnections +{ private readonly client: MicrosoftStorageSync; /** @@ -48,12 +53,12 @@ export class PrivateEndpointConnectionsImpl public listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams + options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByStorageSyncServicePagingAll( resourceGroupName, storageSyncServiceName, - options + options, ); return { next() { @@ -70,9 +75,9 @@ export class PrivateEndpointConnectionsImpl resourceGroupName, storageSyncServiceName, options, - settings + settings, ); - } + }, }; } @@ -80,13 +85,13 @@ export class PrivateEndpointConnectionsImpl resourceGroupName: string, storageSyncServiceName: string, options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: PrivateEndpointConnectionsListByStorageSyncServiceResponse; result = await this._listByStorageSyncService( resourceGroupName, storageSyncServiceName, - options + options, ); yield result.value || []; } @@ -94,12 +99,12 @@ export class PrivateEndpointConnectionsImpl private async *listByStorageSyncServicePagingAll( resourceGroupName: string, storageSyncServiceName: string, - options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams + options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByStorageSyncServicePagingPage( resourceGroupName, storageSyncServiceName, - options + options, )) { yield* page; } @@ -111,23 +116,23 @@ export class PrivateEndpointConnectionsImpl * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param options The options parameters. */ get( resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -137,7 +142,7 @@ export class PrivateEndpointConnectionsImpl * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param properties The private endpoint connection properties. * @param options The options parameters. */ @@ -146,30 +151,29 @@ export class PrivateEndpointConnectionsImpl storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOptionalParams + options?: PrivateEndpointConnectionsCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -178,8 +182,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -187,25 +191,28 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, properties, - options + options, }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -217,7 +224,7 @@ export class PrivateEndpointConnectionsImpl * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param properties The private endpoint connection properties. * @param options The options parameters. */ @@ -226,14 +233,14 @@ export class PrivateEndpointConnectionsImpl storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOptionalParams + options?: PrivateEndpointConnectionsCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, properties, - options + options, ); return poller.pollUntilDone(); } @@ -244,32 +251,31 @@ export class PrivateEndpointConnectionsImpl * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param options The options parameters. */ async beginDelete( resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + options?: PrivateEndpointConnectionsDeleteOptionalParams, + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -278,8 +284,8 @@ export class PrivateEndpointConnectionsImpl ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -287,24 +293,24 @@ export class PrivateEndpointConnectionsImpl rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, - options + options, }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -316,20 +322,20 @@ export class PrivateEndpointConnectionsImpl * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param options The options parameters. */ async beginDeleteAndWait( resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, - options + options, ); return poller.pollUntilDone(); } @@ -343,11 +349,11 @@ export class PrivateEndpointConnectionsImpl private _listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams + options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, options }, - listByStorageSyncServiceOperationSpec + listByStorageSyncServiceOperationSpec, ); } } @@ -355,16 +361,15 @@ export class PrivateEndpointConnectionsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -372,31 +377,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 201: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 202: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, 204: { - bodyMapper: Mappers.PrivateEndpointConnection + bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.properties, queryParameters: [Parameters.apiVersion], @@ -405,15 +409,14 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, @@ -421,8 +424,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -430,32 +433,31 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.privateEndpointConnectionName + Parameters.privateEndpointConnectionName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByStorageSyncServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.PrivateEndpointConnectionListResult, headersMapper: - Mappers.PrivateEndpointConnectionsListByStorageSyncServiceHeaders + Mappers.PrivateEndpointConnectionsListByStorageSyncServiceHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts b/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts index 26892559b3ef..51908febc166 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/privateLinkResources.ts @@ -13,7 +13,7 @@ import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; import { PrivateLinkResourcesListByStorageSyncServiceOptionalParams, - PrivateLinkResourcesListByStorageSyncServiceResponse + PrivateLinkResourcesListByStorageSyncServiceResponse, } from "../models"; /** Class containing PrivateLinkResources operations. */ @@ -38,11 +38,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: PrivateLinkResourcesListByStorageSyncServiceOptionalParams + options?: PrivateLinkResourcesListByStorageSyncServiceOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, options }, - listByStorageSyncServiceOperationSpec + listByStorageSyncServiceOperationSpec, ); } } @@ -50,21 +50,23 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByStorageSyncServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateLinkResources", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateLinkResources", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PrivateLinkResourceListResult - } + bodyMapper: Mappers.PrivateLinkResourceListResult, + }, + default: { + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts b/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts index 9d5a00575511..d9fc59c1a769 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/registeredServers.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { RegisteredServer, RegisteredServersListByStorageSyncServiceOptionalParams, @@ -23,11 +27,14 @@ import { RegisteredServerCreateParameters, RegisteredServersCreateOptionalParams, RegisteredServersCreateResponse, + RegisteredServerUpdateParameters, + RegisteredServersUpdateOptionalParams, + RegisteredServersUpdateResponse, RegisteredServersDeleteOptionalParams, RegisteredServersDeleteResponse, TriggerRolloverRequest, RegisteredServersTriggerRolloverOptionalParams, - RegisteredServersTriggerRolloverResponse + RegisteredServersTriggerRolloverResponse, } from "../models"; /// @@ -52,12 +59,12 @@ export class RegisteredServersImpl implements RegisteredServers { public listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: RegisteredServersListByStorageSyncServiceOptionalParams + options?: RegisteredServersListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByStorageSyncServicePagingAll( resourceGroupName, storageSyncServiceName, - options + options, ); return { next() { @@ -74,9 +81,9 @@ export class RegisteredServersImpl implements RegisteredServers { resourceGroupName, storageSyncServiceName, options, - settings + settings, ); - } + }, }; } @@ -84,13 +91,13 @@ export class RegisteredServersImpl implements RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, options?: RegisteredServersListByStorageSyncServiceOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: RegisteredServersListByStorageSyncServiceResponse; result = await this._listByStorageSyncService( resourceGroupName, storageSyncServiceName, - options + options, ); yield result.value || []; } @@ -98,12 +105,12 @@ export class RegisteredServersImpl implements RegisteredServers { private async *listByStorageSyncServicePagingAll( resourceGroupName: string, storageSyncServiceName: string, - options?: RegisteredServersListByStorageSyncServiceOptionalParams + options?: RegisteredServersListByStorageSyncServiceOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByStorageSyncServicePagingPage( resourceGroupName, storageSyncServiceName, - options + options, )) { yield* page; } @@ -118,11 +125,11 @@ export class RegisteredServersImpl implements RegisteredServers { private _listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: RegisteredServersListByStorageSyncServiceOptionalParams + options?: RegisteredServersListByStorageSyncServiceOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, options }, - listByStorageSyncServiceOperationSpec + listByStorageSyncServiceOperationSpec, ); } @@ -137,11 +144,11 @@ export class RegisteredServersImpl implements RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, serverId: string, - options?: RegisteredServersGetOptionalParams + options?: RegisteredServersGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, serverId, options }, - getOperationSpec + getOperationSpec, ); } @@ -158,30 +165,29 @@ export class RegisteredServersImpl implements RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, - options?: RegisteredServersCreateOptionalParams + options?: RegisteredServersCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RegisteredServersCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -190,8 +196,8 @@ export class RegisteredServersImpl implements RegisteredServers { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -199,25 +205,28 @@ export class RegisteredServersImpl implements RegisteredServers { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, serverId, parameters, - options + options, }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + RegisteredServersCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -236,14 +245,119 @@ export class RegisteredServersImpl implements RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, - options?: RegisteredServersCreateOptionalParams + options?: RegisteredServersCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, storageSyncServiceName, serverId, parameters, - options + options, + ); + return poller.pollUntilDone(); + } + + /** + * Update registered server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId GUID identifying the on-premises server. + * @param parameters Body of Registered Server object. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + storageSyncServiceName: string, + serverId: string, + parameters: RegisteredServerUpdateParameters, + options?: RegisteredServersUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RegisteredServersUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + storageSyncServiceName, + serverId, + parameters, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + RegisteredServersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Update registered server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId GUID identifying the on-premises server. + * @param parameters Body of Registered Server object. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + storageSyncServiceName: string, + serverId: string, + parameters: RegisteredServerUpdateParameters, + options?: RegisteredServersUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + storageSyncServiceName, + serverId, + parameters, + options, ); return poller.pollUntilDone(); } @@ -259,30 +373,29 @@ export class RegisteredServersImpl implements RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, serverId: string, - options?: RegisteredServersDeleteOptionalParams + options?: RegisteredServersDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RegisteredServersDeleteResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -291,8 +404,8 @@ export class RegisteredServersImpl implements RegisteredServers { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -300,19 +413,22 @@ export class RegisteredServersImpl implements RegisteredServers { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, storageSyncServiceName, serverId, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, serverId, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + RegisteredServersDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -329,13 +445,13 @@ export class RegisteredServersImpl implements RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, serverId: string, - options?: RegisteredServersDeleteOptionalParams + options?: RegisteredServersDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, storageSyncServiceName, serverId, - options + options, ); return poller.pollUntilDone(); } @@ -353,30 +469,29 @@ export class RegisteredServersImpl implements RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, - options?: RegisteredServersTriggerRolloverOptionalParams + options?: RegisteredServersTriggerRolloverOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RegisteredServersTriggerRolloverResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -385,8 +500,8 @@ export class RegisteredServersImpl implements RegisteredServers { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -394,25 +509,28 @@ export class RegisteredServersImpl implements RegisteredServers { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, serverId, parameters, - options + options, }, - triggerRolloverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: triggerRolloverOperationSpec, + }); + const poller = await createHttpPoller< + RegisteredServersTriggerRolloverResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -431,14 +549,14 @@ export class RegisteredServersImpl implements RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, - options?: RegisteredServersTriggerRolloverOptionalParams + options?: RegisteredServersTriggerRolloverOptionalParams, ): Promise { const poller = await this.beginTriggerRollover( resourceGroupName, storageSyncServiceName, serverId, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -447,40 +565,38 @@ export class RegisteredServersImpl implements RegisteredServers { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByStorageSyncServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RegisteredServerArray, - headersMapper: Mappers.RegisteredServersListByStorageSyncServiceHeaders + headersMapper: Mappers.RegisteredServersListByStorageSyncServiceHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RegisteredServer, - headersMapper: Mappers.RegisteredServersGetHeaders + headersMapper: Mappers.RegisteredServersGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -488,35 +604,34 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.serverId + Parameters.serverId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.RegisteredServer, - headersMapper: Mappers.RegisteredServersCreateHeaders + headersMapper: Mappers.RegisteredServersCreateHeaders, }, 201: { bodyMapper: Mappers.RegisteredServer, - headersMapper: Mappers.RegisteredServersCreateHeaders + headersMapper: Mappers.RegisteredServersCreateHeaders, }, 202: { bodyMapper: Mappers.RegisteredServer, - headersMapper: Mappers.RegisteredServersCreateHeaders + headersMapper: Mappers.RegisteredServersCreateHeaders, }, 204: { bodyMapper: Mappers.RegisteredServer, - headersMapper: Mappers.RegisteredServersCreateHeaders + headersMapper: Mappers.RegisteredServersCreateHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters12, queryParameters: [Parameters.apiVersion], @@ -525,32 +640,68 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.serverId + Parameters.serverId, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.RegisteredServer, + headersMapper: Mappers.RegisteredServersUpdateHeaders, + }, + 201: { + bodyMapper: Mappers.RegisteredServer, + headersMapper: Mappers.RegisteredServersUpdateHeaders, + }, + 202: { + bodyMapper: Mappers.RegisteredServer, + headersMapper: Mappers.RegisteredServersUpdateHeaders, + }, + 204: { + bodyMapper: Mappers.RegisteredServer, + headersMapper: Mappers.RegisteredServersUpdateHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.storageSyncServiceName, + Parameters.serverId, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}", httpMethod: "DELETE", responses: { 200: { - headersMapper: Mappers.RegisteredServersDeleteHeaders + headersMapper: Mappers.RegisteredServersDeleteHeaders, }, 201: { - headersMapper: Mappers.RegisteredServersDeleteHeaders + headersMapper: Mappers.RegisteredServersDeleteHeaders, }, 202: { - headersMapper: Mappers.RegisteredServersDeleteHeaders + headersMapper: Mappers.RegisteredServersDeleteHeaders, }, 204: { - headersMapper: Mappers.RegisteredServersDeleteHeaders + headersMapper: Mappers.RegisteredServersDeleteHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -558,42 +709,41 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.serverId + Parameters.serverId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const triggerRolloverOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders + headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders, }, 201: { - headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders + headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders, }, 202: { - headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders + headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders, }, 204: { - headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders + headersMapper: Mappers.RegisteredServersTriggerRolloverHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, - requestBody: Parameters.parameters13, + requestBody: Parameters.parameters14, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.serverId + Parameters.serverId, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts index 480a254a6d71..483b8bbc493e 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/serverEndpoints.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ServerEndpoint, ServerEndpointsListBySyncGroupOptionalParams, @@ -29,7 +33,7 @@ import { ServerEndpointsDeleteResponse, RecallActionParameters, ServerEndpointsRecallActionOptionalParams, - ServerEndpointsRecallActionResponse + ServerEndpointsRecallActionResponse, } from "../models"; /// @@ -56,13 +60,13 @@ export class ServerEndpointsImpl implements ServerEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: ServerEndpointsListBySyncGroupOptionalParams + options?: ServerEndpointsListBySyncGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySyncGroupPagingAll( resourceGroupName, storageSyncServiceName, syncGroupName, - options + options, ); return { next() { @@ -80,9 +84,9 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName, syncGroupName, options, - settings + settings, ); - } + }, }; } @@ -91,14 +95,14 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, options?: ServerEndpointsListBySyncGroupOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: ServerEndpointsListBySyncGroupResponse; result = await this._listBySyncGroup( resourceGroupName, storageSyncServiceName, syncGroupName, - options + options, ); yield result.value || []; } @@ -107,13 +111,13 @@ export class ServerEndpointsImpl implements ServerEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: ServerEndpointsListBySyncGroupOptionalParams + options?: ServerEndpointsListBySyncGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySyncGroupPagingPage( resourceGroupName, storageSyncServiceName, syncGroupName, - options + options, )) { yield* page; } @@ -134,30 +138,29 @@ export class ServerEndpointsImpl implements ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, - options?: ServerEndpointsCreateOptionalParams + options?: ServerEndpointsCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -166,8 +169,8 @@ export class ServerEndpointsImpl implements ServerEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -175,26 +178,29 @@ export class ServerEndpointsImpl implements ServerEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, - options + options, }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + ServerEndpointsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -215,7 +221,7 @@ export class ServerEndpointsImpl implements ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, - options?: ServerEndpointsCreateOptionalParams + options?: ServerEndpointsCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, @@ -223,7 +229,7 @@ export class ServerEndpointsImpl implements ServerEndpoints { syncGroupName, serverEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -241,30 +247,29 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsUpdateOptionalParams + options?: ServerEndpointsUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -273,8 +278,8 @@ export class ServerEndpointsImpl implements ServerEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -282,25 +287,28 @@ export class ServerEndpointsImpl implements ServerEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, - options + options, }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ServerEndpointsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -319,14 +327,14 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsUpdateOptionalParams + options?: ServerEndpointsUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, - options + options, ); return poller.pollUntilDone(); } @@ -344,7 +352,7 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsGetOptionalParams + options?: ServerEndpointsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -352,9 +360,9 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName, syncGroupName, serverEndpointName, - options + options, }, - getOperationSpec + getOperationSpec, ); } @@ -371,30 +379,29 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsDeleteOptionalParams + options?: ServerEndpointsDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsDeleteResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -403,8 +410,8 @@ export class ServerEndpointsImpl implements ServerEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -412,25 +419,28 @@ export class ServerEndpointsImpl implements ServerEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, - options + options, }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ServerEndpointsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -449,14 +459,14 @@ export class ServerEndpointsImpl implements ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsDeleteOptionalParams + options?: ServerEndpointsDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, - options + options, ); return poller.pollUntilDone(); } @@ -472,11 +482,11 @@ export class ServerEndpointsImpl implements ServerEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: ServerEndpointsListBySyncGroupOptionalParams + options?: ServerEndpointsListBySyncGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, syncGroupName, options }, - listBySyncGroupOperationSpec + listBySyncGroupOperationSpec, ); } @@ -495,30 +505,29 @@ export class ServerEndpointsImpl implements ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, - options?: ServerEndpointsRecallActionOptionalParams + options?: ServerEndpointsRecallActionOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsRecallActionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -527,8 +536,8 @@ export class ServerEndpointsImpl implements ServerEndpoints { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -536,26 +545,29 @@ export class ServerEndpointsImpl implements ServerEndpoints { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, - options + options, }, - recallActionOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + spec: recallActionOperationSpec, + }); + const poller = await createHttpPoller< + ServerEndpointsRecallActionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -576,7 +588,7 @@ export class ServerEndpointsImpl implements ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, - options?: ServerEndpointsRecallActionOptionalParams + options?: ServerEndpointsRecallActionOptionalParams, ): Promise { const poller = await this.beginRecallAction( resourceGroupName, @@ -584,7 +596,7 @@ export class ServerEndpointsImpl implements ServerEndpoints { syncGroupName, serverEndpointName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -593,29 +605,28 @@ export class ServerEndpointsImpl implements ServerEndpoints { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsCreateHeaders + headersMapper: Mappers.ServerEndpointsCreateHeaders, }, 201: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsCreateHeaders + headersMapper: Mappers.ServerEndpointsCreateHeaders, }, 202: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsCreateHeaders + headersMapper: Mappers.ServerEndpointsCreateHeaders, }, 204: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsCreateHeaders + headersMapper: Mappers.ServerEndpointsCreateHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters9, queryParameters: [Parameters.apiVersion], @@ -625,36 +636,35 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.serverEndpointName + Parameters.serverEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsUpdateHeaders + headersMapper: Mappers.ServerEndpointsUpdateHeaders, }, 201: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsUpdateHeaders + headersMapper: Mappers.ServerEndpointsUpdateHeaders, }, 202: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsUpdateHeaders + headersMapper: Mappers.ServerEndpointsUpdateHeaders, }, 204: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsUpdateHeaders + headersMapper: Mappers.ServerEndpointsUpdateHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters10, queryParameters: [Parameters.apiVersion], @@ -664,24 +674,23 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.serverEndpointName + Parameters.serverEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ServerEndpoint, - headersMapper: Mappers.ServerEndpointsGetHeaders + headersMapper: Mappers.ServerEndpointsGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -690,31 +699,30 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.serverEndpointName + Parameters.serverEndpointName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}", httpMethod: "DELETE", responses: { 200: { - headersMapper: Mappers.ServerEndpointsDeleteHeaders + headersMapper: Mappers.ServerEndpointsDeleteHeaders, }, 201: { - headersMapper: Mappers.ServerEndpointsDeleteHeaders + headersMapper: Mappers.ServerEndpointsDeleteHeaders, }, 202: { - headersMapper: Mappers.ServerEndpointsDeleteHeaders + headersMapper: Mappers.ServerEndpointsDeleteHeaders, }, 204: { - headersMapper: Mappers.ServerEndpointsDeleteHeaders + headersMapper: Mappers.ServerEndpointsDeleteHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -723,23 +731,22 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.serverEndpointName + Parameters.serverEndpointName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listBySyncGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ServerEndpointArray, - headersMapper: Mappers.ServerEndpointsListBySyncGroupHeaders + headersMapper: Mappers.ServerEndpointsListBySyncGroupHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -747,31 +754,30 @@ const listBySyncGroupOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.syncGroupName + Parameters.syncGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const recallActionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}/recallAction", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}/recallAction", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.ServerEndpointsRecallActionHeaders + headersMapper: Mappers.ServerEndpointsRecallActionHeaders, }, 201: { - headersMapper: Mappers.ServerEndpointsRecallActionHeaders + headersMapper: Mappers.ServerEndpointsRecallActionHeaders, }, 202: { - headersMapper: Mappers.ServerEndpointsRecallActionHeaders + headersMapper: Mappers.ServerEndpointsRecallActionHeaders, }, 204: { - headersMapper: Mappers.ServerEndpointsRecallActionHeaders + headersMapper: Mappers.ServerEndpointsRecallActionHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters11, queryParameters: [Parameters.apiVersion], @@ -781,9 +787,9 @@ const recallActionOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.storageSyncServiceName, Parameters.syncGroupName, - Parameters.serverEndpointName + Parameters.serverEndpointName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts b/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts index 0b86969e18a9..901ed2bfb78a 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/storageSyncServices.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { MicrosoftStorageSync } from "../microsoftStorageSync"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { StorageSyncService, StorageSyncServicesListByResourceGroupOptionalParams, @@ -31,7 +35,7 @@ import { StorageSyncServicesUpdateOptionalParams, StorageSyncServicesUpdateResponse, StorageSyncServicesDeleteOptionalParams, - StorageSyncServicesDeleteResponse + StorageSyncServicesDeleteResponse, } from "../models"; /// @@ -54,7 +58,7 @@ export class StorageSyncServicesImpl implements StorageSyncServices { */ public listByResourceGroup( resourceGroupName: string, - options?: StorageSyncServicesListByResourceGroupOptionalParams + options?: StorageSyncServicesListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { @@ -71,16 +75,16 @@ export class StorageSyncServicesImpl implements StorageSyncServices { return this.listByResourceGroupPagingPage( resourceGroupName, options, - settings + settings, ); - } + }, }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, options?: StorageSyncServicesListByResourceGroupOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: StorageSyncServicesListByResourceGroupResponse; result = await this._listByResourceGroup(resourceGroupName, options); @@ -89,11 +93,11 @@ export class StorageSyncServicesImpl implements StorageSyncServices { private async *listByResourceGroupPagingAll( resourceGroupName: string, - options?: StorageSyncServicesListByResourceGroupOptionalParams + options?: StorageSyncServicesListByResourceGroupOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByResourceGroupPagingPage( resourceGroupName, - options + options, )) { yield* page; } @@ -104,7 +108,7 @@ export class StorageSyncServicesImpl implements StorageSyncServices { * @param options The options parameters. */ public listBySubscription( - options?: StorageSyncServicesListBySubscriptionOptionalParams + options?: StorageSyncServicesListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listBySubscriptionPagingAll(options); return { @@ -119,13 +123,13 @@ export class StorageSyncServicesImpl implements StorageSyncServices { throw new Error("maxPageSize is not supported by this operation."); } return this.listBySubscriptionPagingPage(options, settings); - } + }, }; } private async *listBySubscriptionPagingPage( options?: StorageSyncServicesListBySubscriptionOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: StorageSyncServicesListBySubscriptionResponse; result = await this._listBySubscription(options); @@ -133,7 +137,7 @@ export class StorageSyncServicesImpl implements StorageSyncServices { } private async *listBySubscriptionPagingAll( - options?: StorageSyncServicesListBySubscriptionOptionalParams + options?: StorageSyncServicesListBySubscriptionOptionalParams, ): AsyncIterableIterator { for await (const page of this.listBySubscriptionPagingPage(options)) { yield* page; @@ -149,11 +153,11 @@ export class StorageSyncServicesImpl implements StorageSyncServices { checkNameAvailability( locationName: string, parameters: CheckNameAvailabilityParameters, - options?: StorageSyncServicesCheckNameAvailabilityOptionalParams + options?: StorageSyncServicesCheckNameAvailabilityOptionalParams, ): Promise { return this.client.sendOperationRequest( { locationName, parameters, options }, - checkNameAvailabilityOperationSpec + checkNameAvailabilityOperationSpec, ); } @@ -168,30 +172,29 @@ export class StorageSyncServicesImpl implements StorageSyncServices { resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, - options?: StorageSyncServicesCreateOptionalParams + options?: StorageSyncServicesCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageSyncServicesCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -200,8 +203,8 @@ export class StorageSyncServicesImpl implements StorageSyncServices { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -209,19 +212,22 @@ export class StorageSyncServicesImpl implements StorageSyncServices { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, storageSyncServiceName, parameters, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, parameters, options }, + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + StorageSyncServicesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -238,13 +244,13 @@ export class StorageSyncServicesImpl implements StorageSyncServices { resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, - options?: StorageSyncServicesCreateOptionalParams + options?: StorageSyncServicesCreateOptionalParams, ): Promise { const poller = await this.beginCreate( resourceGroupName, storageSyncServiceName, parameters, - options + options, ); return poller.pollUntilDone(); } @@ -258,11 +264,11 @@ export class StorageSyncServicesImpl implements StorageSyncServices { get( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesGetOptionalParams + options?: StorageSyncServicesGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, options }, - getOperationSpec + getOperationSpec, ); } @@ -275,30 +281,29 @@ export class StorageSyncServicesImpl implements StorageSyncServices { async beginUpdate( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesUpdateOptionalParams + options?: StorageSyncServicesUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageSyncServicesUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -307,8 +312,8 @@ export class StorageSyncServicesImpl implements StorageSyncServices { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -316,19 +321,22 @@ export class StorageSyncServicesImpl implements StorageSyncServices { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, storageSyncServiceName, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + StorageSyncServicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -343,12 +351,12 @@ export class StorageSyncServicesImpl implements StorageSyncServices { async beginUpdateAndWait( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesUpdateOptionalParams + options?: StorageSyncServicesUpdateOptionalParams, ): Promise { const poller = await this.beginUpdate( resourceGroupName, storageSyncServiceName, - options + options, ); return poller.pollUntilDone(); } @@ -362,30 +370,29 @@ export class StorageSyncServicesImpl implements StorageSyncServices { async beginDelete( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesDeleteOptionalParams + options?: StorageSyncServicesDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageSyncServicesDeleteResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, - spec: coreClient.OperationSpec + spec: coreClient.OperationSpec, ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; const providedCallback = args.options?.onResponse; const callback: coreClient.RawResponseCallback = ( rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown + flatResponse: unknown, ) => { currentRawResponse = rawResponse; providedCallback?.(rawResponse, flatResponse); @@ -394,8 +401,8 @@ export class StorageSyncServicesImpl implements StorageSyncServices { ...args, options: { ...args.options, - onResponse: callback - } + onResponse: callback, + }, }; const flatResponse = await directSendOperation(updatedArgs, spec); return { @@ -403,19 +410,22 @@ export class StorageSyncServicesImpl implements StorageSyncServices { rawResponse: { statusCode: currentRawResponse!.status, body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } + headers: currentRawResponse!.headers.toJSON(), + }, }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, storageSyncServiceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, storageSyncServiceName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + StorageSyncServicesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, }); await poller.poll(); return poller; @@ -430,12 +440,12 @@ export class StorageSyncServicesImpl implements StorageSyncServices { async beginDeleteAndWait( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesDeleteOptionalParams + options?: StorageSyncServicesDeleteOptionalParams, ): Promise { const poller = await this.beginDelete( resourceGroupName, storageSyncServiceName, - options + options, ); return poller.pollUntilDone(); } @@ -447,11 +457,11 @@ export class StorageSyncServicesImpl implements StorageSyncServices { */ private _listByResourceGroup( resourceGroupName: string, - options?: StorageSyncServicesListByResourceGroupOptionalParams + options?: StorageSyncServicesListByResourceGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, - listByResourceGroupOperationSpec + listByResourceGroupOperationSpec, ); } @@ -460,11 +470,11 @@ export class StorageSyncServicesImpl implements StorageSyncServices { * @param options The options parameters. */ private _listBySubscription( - options?: StorageSyncServicesListBySubscriptionOptionalParams + options?: StorageSyncServicesListBySubscriptionOptionalParams, ): Promise { return this.client.sendOperationRequest( { options }, - listBySubscriptionOperationSpec + listBySubscriptionOperationSpec, ); } } @@ -472,45 +482,46 @@ export class StorageSyncServicesImpl implements StorageSyncServices { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResult - } + bodyMapper: Mappers.CheckNameAvailabilityResult, + }, + default: { + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.locationName, - Parameters.subscriptionId + Parameters.subscriptionId, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.StorageSyncService + bodyMapper: Mappers.StorageSyncService, }, 201: { - bodyMapper: Mappers.StorageSyncService + bodyMapper: Mappers.StorageSyncService, }, 202: { - bodyMapper: Mappers.StorageSyncService + bodyMapper: Mappers.StorageSyncService, }, 204: { - bodyMapper: Mappers.StorageSyncService + bodyMapper: Mappers.StorageSyncService, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters1, queryParameters: [Parameters.apiVersion], @@ -518,59 +529,57 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesGetHeaders + headersMapper: Mappers.StorageSyncServicesGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesUpdateHeaders + headersMapper: Mappers.StorageSyncServicesUpdateHeaders, }, 201: { bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesUpdateHeaders + headersMapper: Mappers.StorageSyncServicesUpdateHeaders, }, 202: { bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesUpdateHeaders + headersMapper: Mappers.StorageSyncServicesUpdateHeaders, }, 204: { bodyMapper: Mappers.StorageSyncService, - headersMapper: Mappers.StorageSyncServicesUpdateHeaders + headersMapper: Mappers.StorageSyncServicesUpdateHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], @@ -578,80 +587,77 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}", httpMethod: "DELETE", responses: { 200: { - headersMapper: Mappers.StorageSyncServicesDeleteHeaders + headersMapper: Mappers.StorageSyncServicesDeleteHeaders, }, 201: { - headersMapper: Mappers.StorageSyncServicesDeleteHeaders + headersMapper: Mappers.StorageSyncServicesDeleteHeaders, }, 202: { - headersMapper: Mappers.StorageSyncServicesDeleteHeaders + headersMapper: Mappers.StorageSyncServicesDeleteHeaders, }, 204: { - headersMapper: Mappers.StorageSyncServicesDeleteHeaders + headersMapper: Mappers.StorageSyncServicesDeleteHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageSyncServiceArray, - headersMapper: Mappers.StorageSyncServicesListByResourceGroupHeaders + headersMapper: Mappers.StorageSyncServicesListByResourceGroupHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/storageSyncServices", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/storageSyncServices", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.StorageSyncServiceArray, - headersMapper: Mappers.StorageSyncServicesListBySubscriptionHeaders + headersMapper: Mappers.StorageSyncServicesListBySubscriptionHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts b/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts index 1a5453c92071..27cf3fe62a4d 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/syncGroups.ts @@ -22,7 +22,7 @@ import { SyncGroupsGetOptionalParams, SyncGroupsGetResponse, SyncGroupsDeleteOptionalParams, - SyncGroupsDeleteResponse + SyncGroupsDeleteResponse, } from "../models"; /// @@ -47,12 +47,12 @@ export class SyncGroupsImpl implements SyncGroups { public listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: SyncGroupsListByStorageSyncServiceOptionalParams + options?: SyncGroupsListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByStorageSyncServicePagingAll( resourceGroupName, storageSyncServiceName, - options + options, ); return { next() { @@ -69,9 +69,9 @@ export class SyncGroupsImpl implements SyncGroups { resourceGroupName, storageSyncServiceName, options, - settings + settings, ); - } + }, }; } @@ -79,13 +79,13 @@ export class SyncGroupsImpl implements SyncGroups { resourceGroupName: string, storageSyncServiceName: string, options?: SyncGroupsListByStorageSyncServiceOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: SyncGroupsListByStorageSyncServiceResponse; result = await this._listByStorageSyncService( resourceGroupName, storageSyncServiceName, - options + options, ); yield result.value || []; } @@ -93,12 +93,12 @@ export class SyncGroupsImpl implements SyncGroups { private async *listByStorageSyncServicePagingAll( resourceGroupName: string, storageSyncServiceName: string, - options?: SyncGroupsListByStorageSyncServiceOptionalParams + options?: SyncGroupsListByStorageSyncServiceOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByStorageSyncServicePagingPage( resourceGroupName, storageSyncServiceName, - options + options, )) { yield* page; } @@ -113,11 +113,11 @@ export class SyncGroupsImpl implements SyncGroups { private _listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: SyncGroupsListByStorageSyncServiceOptionalParams + options?: SyncGroupsListByStorageSyncServiceOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, options }, - listByStorageSyncServiceOperationSpec + listByStorageSyncServiceOperationSpec, ); } @@ -134,7 +134,7 @@ export class SyncGroupsImpl implements SyncGroups { storageSyncServiceName: string, syncGroupName: string, parameters: SyncGroupCreateParameters, - options?: SyncGroupsCreateOptionalParams + options?: SyncGroupsCreateOptionalParams, ): Promise { return this.client.sendOperationRequest( { @@ -142,9 +142,9 @@ export class SyncGroupsImpl implements SyncGroups { storageSyncServiceName, syncGroupName, parameters, - options + options, }, - createOperationSpec + createOperationSpec, ); } @@ -159,11 +159,11 @@ export class SyncGroupsImpl implements SyncGroups { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: SyncGroupsGetOptionalParams + options?: SyncGroupsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, syncGroupName, options }, - getOperationSpec + getOperationSpec, ); } @@ -178,11 +178,11 @@ export class SyncGroupsImpl implements SyncGroups { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: SyncGroupsDeleteOptionalParams + options?: SyncGroupsDeleteOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, syncGroupName, options }, - deleteOperationSpec + deleteOperationSpec, ); } } @@ -190,40 +190,38 @@ export class SyncGroupsImpl implements SyncGroups { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByStorageSyncServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SyncGroupArray, - headersMapper: Mappers.SyncGroupsListByStorageSyncServiceHeaders + headersMapper: Mappers.SyncGroupsListByStorageSyncServiceHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.SyncGroup, - headersMapper: Mappers.SyncGroupsCreateHeaders + headersMapper: Mappers.SyncGroupsCreateHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, requestBody: Parameters.parameters3, queryParameters: [Parameters.apiVersion], @@ -232,24 +230,23 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.syncGroupName + Parameters.syncGroupName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.SyncGroup, - headersMapper: Mappers.SyncGroupsGetHeaders + headersMapper: Mappers.SyncGroupsGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -257,23 +254,22 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.syncGroupName + Parameters.syncGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}", httpMethod: "DELETE", responses: { 200: { - headersMapper: Mappers.SyncGroupsDeleteHeaders + headersMapper: Mappers.SyncGroupsDeleteHeaders, }, 204: {}, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -281,8 +277,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.syncGroupName + Parameters.syncGroupName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operations/workflows.ts b/sdk/storagesync/arm-storagesync/src/operations/workflows.ts index 3483b0c0bc9c..997010c6ced7 100644 --- a/sdk/storagesync/arm-storagesync/src/operations/workflows.ts +++ b/sdk/storagesync/arm-storagesync/src/operations/workflows.ts @@ -19,7 +19,7 @@ import { WorkflowsGetOptionalParams, WorkflowsGetResponse, WorkflowsAbortOptionalParams, - WorkflowsAbortResponse + WorkflowsAbortResponse, } from "../models"; /// @@ -44,12 +44,12 @@ export class WorkflowsImpl implements Workflows { public listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: WorkflowsListByStorageSyncServiceOptionalParams + options?: WorkflowsListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByStorageSyncServicePagingAll( resourceGroupName, storageSyncServiceName, - options + options, ); return { next() { @@ -66,9 +66,9 @@ export class WorkflowsImpl implements Workflows { resourceGroupName, storageSyncServiceName, options, - settings + settings, ); - } + }, }; } @@ -76,13 +76,13 @@ export class WorkflowsImpl implements Workflows { resourceGroupName: string, storageSyncServiceName: string, options?: WorkflowsListByStorageSyncServiceOptionalParams, - _settings?: PageSettings + _settings?: PageSettings, ): AsyncIterableIterator { let result: WorkflowsListByStorageSyncServiceResponse; result = await this._listByStorageSyncService( resourceGroupName, storageSyncServiceName, - options + options, ); yield result.value || []; } @@ -90,12 +90,12 @@ export class WorkflowsImpl implements Workflows { private async *listByStorageSyncServicePagingAll( resourceGroupName: string, storageSyncServiceName: string, - options?: WorkflowsListByStorageSyncServiceOptionalParams + options?: WorkflowsListByStorageSyncServiceOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByStorageSyncServicePagingPage( resourceGroupName, storageSyncServiceName, - options + options, )) { yield* page; } @@ -110,11 +110,11 @@ export class WorkflowsImpl implements Workflows { private _listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: WorkflowsListByStorageSyncServiceOptionalParams + options?: WorkflowsListByStorageSyncServiceOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, options }, - listByStorageSyncServiceOperationSpec + listByStorageSyncServiceOperationSpec, ); } @@ -129,11 +129,11 @@ export class WorkflowsImpl implements Workflows { resourceGroupName: string, storageSyncServiceName: string, workflowId: string, - options?: WorkflowsGetOptionalParams + options?: WorkflowsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, workflowId, options }, - getOperationSpec + getOperationSpec, ); } @@ -148,11 +148,11 @@ export class WorkflowsImpl implements Workflows { resourceGroupName: string, storageSyncServiceName: string, workflowId: string, - options?: WorkflowsAbortOptionalParams + options?: WorkflowsAbortOptionalParams, ): Promise { return this.client.sendOperationRequest( { resourceGroupName, storageSyncServiceName, workflowId, options }, - abortOperationSpec + abortOperationSpec, ); } } @@ -160,40 +160,38 @@ export class WorkflowsImpl implements Workflows { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByStorageSyncServiceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.WorkflowArray, - headersMapper: Mappers.WorkflowsListByStorageSyncServiceHeaders + headersMapper: Mappers.WorkflowsListByStorageSyncServiceHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.storageSyncServiceName + Parameters.storageSyncServiceName, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows/{workflowId}", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows/{workflowId}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.Workflow, - headersMapper: Mappers.WorkflowsGetHeaders + headersMapper: Mappers.WorkflowsGetHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -201,22 +199,21 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.workflowId + Parameters.workflowId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const abortOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows/{workflowId}/abort", + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/workflows/{workflowId}/abort", httpMethod: "POST", responses: { 200: { - headersMapper: Mappers.WorkflowsAbortHeaders + headersMapper: Mappers.WorkflowsAbortHeaders, }, default: { - bodyMapper: Mappers.StorageSyncError - } + bodyMapper: Mappers.StorageSyncError, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [ @@ -224,8 +221,8 @@ const abortOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.storageSyncServiceName, - Parameters.workflowId + Parameters.workflowId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts index aee04df08ce5..f61e2b1b59e0 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/cloudEndpoints.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { CloudEndpoint, CloudEndpointsListBySyncGroupOptionalParams, @@ -30,7 +30,9 @@ import { PostRestoreRequest, CloudEndpointsPostRestoreOptionalParams, TriggerChangeDetectionParameters, - CloudEndpointsTriggerChangeDetectionOptionalParams + CloudEndpointsTriggerChangeDetectionOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, + CloudEndpointsAfsShareMetadataCertificatePublicKeysResponse, } from "../models"; /// @@ -47,7 +49,7 @@ export interface CloudEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: CloudEndpointsListBySyncGroupOptionalParams + options?: CloudEndpointsListBySyncGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Create a new CloudEndpoint. @@ -64,10 +66,10 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, - options?: CloudEndpointsCreateOptionalParams + options?: CloudEndpointsCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsCreateResponse > >; @@ -86,7 +88,7 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, - options?: CloudEndpointsCreateOptionalParams + options?: CloudEndpointsCreateOptionalParams, ): Promise; /** * Get a given CloudEndpoint. @@ -101,7 +103,7 @@ export interface CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsGetOptionalParams + options?: CloudEndpointsGetOptionalParams, ): Promise; /** * Delete a given CloudEndpoint. @@ -116,10 +118,10 @@ export interface CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsDeleteOptionalParams + options?: CloudEndpointsDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsDeleteResponse > >; @@ -136,7 +138,7 @@ export interface CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsDeleteOptionalParams + options?: CloudEndpointsDeleteOptionalParams, ): Promise; /** * Pre Backup a given CloudEndpoint. @@ -153,10 +155,10 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPreBackupOptionalParams + options?: CloudEndpointsPreBackupOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsPreBackupResponse > >; @@ -175,7 +177,7 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPreBackupOptionalParams + options?: CloudEndpointsPreBackupOptionalParams, ): Promise; /** * Post Backup a given CloudEndpoint. @@ -192,10 +194,10 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPostBackupOptionalParams + options?: CloudEndpointsPostBackupOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, CloudEndpointsPostBackupResponse > >; @@ -214,7 +216,7 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: BackupRequest, - options?: CloudEndpointsPostBackupOptionalParams + options?: CloudEndpointsPostBackupOptionalParams, ): Promise; /** * Pre Restore a given CloudEndpoint. @@ -231,8 +233,8 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, - options?: CloudEndpointsPreRestoreOptionalParams - ): Promise, void>>; + options?: CloudEndpointsPreRestoreOptionalParams, + ): Promise, void>>; /** * Pre Restore a given CloudEndpoint. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -248,7 +250,7 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PreRestoreRequest, - options?: CloudEndpointsPreRestoreOptionalParams + options?: CloudEndpointsPreRestoreOptionalParams, ): Promise; /** * Restore Heartbeat a given CloudEndpoint. @@ -263,7 +265,7 @@ export interface CloudEndpoints { storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, - options?: CloudEndpointsRestoreheartbeatOptionalParams + options?: CloudEndpointsRestoreheartbeatOptionalParams, ): Promise; /** * Post Restore a given CloudEndpoint. @@ -280,8 +282,8 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, - options?: CloudEndpointsPostRestoreOptionalParams - ): Promise, void>>; + options?: CloudEndpointsPostRestoreOptionalParams, + ): Promise, void>>; /** * Post Restore a given CloudEndpoint. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -297,7 +299,7 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: PostRestoreRequest, - options?: CloudEndpointsPostRestoreOptionalParams + options?: CloudEndpointsPostRestoreOptionalParams, ): Promise; /** * Triggers detection of changes performed on Azure File share connected to the specified Azure File @@ -315,8 +317,8 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, - options?: CloudEndpointsTriggerChangeDetectionOptionalParams - ): Promise, void>>; + options?: CloudEndpointsTriggerChangeDetectionOptionalParams, + ): Promise, void>>; /** * Triggers detection of changes performed on Azure File share connected to the specified Azure File * Sync Cloud Endpoint. @@ -333,6 +335,21 @@ export interface CloudEndpoints { syncGroupName: string, cloudEndpointName: string, parameters: TriggerChangeDetectionParameters, - options?: CloudEndpointsTriggerChangeDetectionOptionalParams + options?: CloudEndpointsTriggerChangeDetectionOptionalParams, ): Promise; + /** + * Get the AFS file share metadata signing certificate public keys. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param syncGroupName Name of Sync Group resource. + * @param cloudEndpointName Name of Cloud Endpoint object. + * @param options The options parameters. + */ + afsShareMetadataCertificatePublicKeys( + resourceGroupName: string, + storageSyncServiceName: string, + syncGroupName: string, + cloudEndpointName: string, + options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, + ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operationStatusOperations.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operationStatusOperations.ts index 8dafd3536529..806c20ebc366 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operationStatusOperations.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operationStatusOperations.ts @@ -8,7 +8,7 @@ import { OperationStatusGetOptionalParams, - OperationStatusGetResponse + OperationStatusGetResponse, } from "../models"; /** Interface representing a OperationStatusOperations. */ @@ -26,6 +26,6 @@ export interface OperationStatusOperations { locationName: string, workflowId: string, operationId: string, - options?: OperationStatusGetOptionalParams + options?: OperationStatusGetOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operations.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operations.ts index 144c7342d245..20860242371a 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operations.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/operations.ts @@ -17,6 +17,6 @@ export interface Operations { * @param options The options parameters. */ list( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateEndpointConnections.ts index d2e446e0aa5a..2c4c33826fde 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateEndpointConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnection, PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, @@ -15,7 +15,7 @@ import { PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsCreateOptionalParams, PrivateEndpointConnectionsCreateResponse, - PrivateEndpointConnectionsDeleteOptionalParams + PrivateEndpointConnectionsDeleteOptionalParams, } from "../models"; /// @@ -30,7 +30,7 @@ export interface PrivateEndpointConnections { listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams + options?: PrivateEndpointConnectionsListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator; /** * Gets the specified private endpoint connection associated with the storage sync service. @@ -38,14 +38,14 @@ export interface PrivateEndpointConnections { * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param options The options parameters. */ get( resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsGetOptionalParams + options?: PrivateEndpointConnectionsGetOptionalParams, ): Promise; /** * Update the state of specified private endpoint connection associated with the storage sync service. @@ -53,7 +53,7 @@ export interface PrivateEndpointConnections { * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param properties The private endpoint connection properties. * @param options The options parameters. */ @@ -62,10 +62,10 @@ export interface PrivateEndpointConnections { storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOptionalParams + options?: PrivateEndpointConnectionsCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateResponse > >; @@ -75,7 +75,7 @@ export interface PrivateEndpointConnections { * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param properties The private endpoint connection properties. * @param options The options parameters. */ @@ -84,7 +84,7 @@ export interface PrivateEndpointConnections { storageSyncServiceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, - options?: PrivateEndpointConnectionsCreateOptionalParams + options?: PrivateEndpointConnectionsCreateOptionalParams, ): Promise; /** * Deletes the specified private endpoint connection associated with the storage sync service. @@ -92,28 +92,28 @@ export interface PrivateEndpointConnections { * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param options The options parameters. */ beginDelete( resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + options?: PrivateEndpointConnectionsDeleteOptionalParams, + ): Promise, void>>; /** * Deletes the specified private endpoint connection associated with the storage sync service. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param storageSyncServiceName The name of the storage sync service name within the specified * resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the - * Azure resource + * Azure resource. * @param options The options parameters. */ beginDeleteAndWait( resourceGroupName: string, storageSyncServiceName: string, privateEndpointConnectionName: string, - options?: PrivateEndpointConnectionsDeleteOptionalParams + options?: PrivateEndpointConnectionsDeleteOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateLinkResources.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateLinkResources.ts index 00dc1b04bfb1..3b75e7c367b7 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/privateLinkResources.ts @@ -8,7 +8,7 @@ import { PrivateLinkResourcesListByStorageSyncServiceOptionalParams, - PrivateLinkResourcesListByStorageSyncServiceResponse + PrivateLinkResourcesListByStorageSyncServiceResponse, } from "../models"; /** Interface representing a PrivateLinkResources. */ @@ -23,6 +23,6 @@ export interface PrivateLinkResources { listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: PrivateLinkResourcesListByStorageSyncServiceOptionalParams + options?: PrivateLinkResourcesListByStorageSyncServiceOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/registeredServers.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/registeredServers.ts index f3d622f64b65..2efac60ea925 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/registeredServers.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/registeredServers.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { RegisteredServer, RegisteredServersListByStorageSyncServiceOptionalParams, @@ -16,11 +16,14 @@ import { RegisteredServerCreateParameters, RegisteredServersCreateOptionalParams, RegisteredServersCreateResponse, + RegisteredServerUpdateParameters, + RegisteredServersUpdateOptionalParams, + RegisteredServersUpdateResponse, RegisteredServersDeleteOptionalParams, RegisteredServersDeleteResponse, TriggerRolloverRequest, RegisteredServersTriggerRolloverOptionalParams, - RegisteredServersTriggerRolloverResponse + RegisteredServersTriggerRolloverResponse, } from "../models"; /// @@ -35,7 +38,7 @@ export interface RegisteredServers { listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: RegisteredServersListByStorageSyncServiceOptionalParams + options?: RegisteredServersListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator; /** * Get a given registered server. @@ -48,7 +51,7 @@ export interface RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, serverId: string, - options?: RegisteredServersGetOptionalParams + options?: RegisteredServersGetOptionalParams, ): Promise; /** * Add a new registered server. @@ -63,10 +66,10 @@ export interface RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, - options?: RegisteredServersCreateOptionalParams + options?: RegisteredServersCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RegisteredServersCreateResponse > >; @@ -83,8 +86,43 @@ export interface RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: RegisteredServerCreateParameters, - options?: RegisteredServersCreateOptionalParams + options?: RegisteredServersCreateOptionalParams, ): Promise; + /** + * Update registered server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId GUID identifying the on-premises server. + * @param parameters Body of Registered Server object. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + storageSyncServiceName: string, + serverId: string, + parameters: RegisteredServerUpdateParameters, + options?: RegisteredServersUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + RegisteredServersUpdateResponse + > + >; + /** + * Update registered server. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param storageSyncServiceName Name of Storage Sync Service resource. + * @param serverId GUID identifying the on-premises server. + * @param parameters Body of Registered Server object. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + storageSyncServiceName: string, + serverId: string, + parameters: RegisteredServerUpdateParameters, + options?: RegisteredServersUpdateOptionalParams, + ): Promise; /** * Delete the given registered server. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -96,10 +134,10 @@ export interface RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, serverId: string, - options?: RegisteredServersDeleteOptionalParams + options?: RegisteredServersDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RegisteredServersDeleteResponse > >; @@ -114,7 +152,7 @@ export interface RegisteredServers { resourceGroupName: string, storageSyncServiceName: string, serverId: string, - options?: RegisteredServersDeleteOptionalParams + options?: RegisteredServersDeleteOptionalParams, ): Promise; /** * Triggers Server certificate rollover. @@ -129,10 +167,10 @@ export interface RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, - options?: RegisteredServersTriggerRolloverOptionalParams + options?: RegisteredServersTriggerRolloverOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, RegisteredServersTriggerRolloverResponse > >; @@ -149,6 +187,6 @@ export interface RegisteredServers { storageSyncServiceName: string, serverId: string, parameters: TriggerRolloverRequest, - options?: RegisteredServersTriggerRolloverOptionalParams + options?: RegisteredServersTriggerRolloverOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/serverEndpoints.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/serverEndpoints.ts index 10ce98ffc813..efb3c4c1ad31 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/serverEndpoints.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/serverEndpoints.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ServerEndpoint, ServerEndpointsListBySyncGroupOptionalParams, @@ -22,7 +22,7 @@ import { ServerEndpointsDeleteResponse, RecallActionParameters, ServerEndpointsRecallActionOptionalParams, - ServerEndpointsRecallActionResponse + ServerEndpointsRecallActionResponse, } from "../models"; /// @@ -39,7 +39,7 @@ export interface ServerEndpoints { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: ServerEndpointsListBySyncGroupOptionalParams + options?: ServerEndpointsListBySyncGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Create a new ServerEndpoint. @@ -56,10 +56,10 @@ export interface ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, - options?: ServerEndpointsCreateOptionalParams + options?: ServerEndpointsCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsCreateResponse > >; @@ -78,7 +78,7 @@ export interface ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: ServerEndpointCreateParameters, - options?: ServerEndpointsCreateOptionalParams + options?: ServerEndpointsCreateOptionalParams, ): Promise; /** * Patch a given ServerEndpoint. @@ -93,10 +93,10 @@ export interface ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsUpdateOptionalParams + options?: ServerEndpointsUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsUpdateResponse > >; @@ -113,7 +113,7 @@ export interface ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsUpdateOptionalParams + options?: ServerEndpointsUpdateOptionalParams, ): Promise; /** * Get a ServerEndpoint. @@ -128,7 +128,7 @@ export interface ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsGetOptionalParams + options?: ServerEndpointsGetOptionalParams, ): Promise; /** * Delete a given ServerEndpoint. @@ -143,10 +143,10 @@ export interface ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsDeleteOptionalParams + options?: ServerEndpointsDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsDeleteResponse > >; @@ -163,7 +163,7 @@ export interface ServerEndpoints { storageSyncServiceName: string, syncGroupName: string, serverEndpointName: string, - options?: ServerEndpointsDeleteOptionalParams + options?: ServerEndpointsDeleteOptionalParams, ): Promise; /** * Recall a server endpoint. @@ -180,10 +180,10 @@ export interface ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, - options?: ServerEndpointsRecallActionOptionalParams + options?: ServerEndpointsRecallActionOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServerEndpointsRecallActionResponse > >; @@ -202,6 +202,6 @@ export interface ServerEndpoints { syncGroupName: string, serverEndpointName: string, parameters: RecallActionParameters, - options?: ServerEndpointsRecallActionOptionalParams + options?: ServerEndpointsRecallActionOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/storageSyncServices.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/storageSyncServices.ts index 5c34dd282e78..48d4a82e968e 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/storageSyncServices.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/storageSyncServices.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { StorageSyncService, StorageSyncServicesListByResourceGroupOptionalParams, @@ -23,7 +23,7 @@ import { StorageSyncServicesUpdateOptionalParams, StorageSyncServicesUpdateResponse, StorageSyncServicesDeleteOptionalParams, - StorageSyncServicesDeleteResponse + StorageSyncServicesDeleteResponse, } from "../models"; /// @@ -36,14 +36,14 @@ export interface StorageSyncServices { */ listByResourceGroup( resourceGroupName: string, - options?: StorageSyncServicesListByResourceGroupOptionalParams + options?: StorageSyncServicesListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; /** * Get a StorageSyncService list by subscription. * @param options The options parameters. */ listBySubscription( - options?: StorageSyncServicesListBySubscriptionOptionalParams + options?: StorageSyncServicesListBySubscriptionOptionalParams, ): PagedAsyncIterableIterator; /** * Check the give namespace name availability. @@ -54,7 +54,7 @@ export interface StorageSyncServices { checkNameAvailability( locationName: string, parameters: CheckNameAvailabilityParameters, - options?: StorageSyncServicesCheckNameAvailabilityOptionalParams + options?: StorageSyncServicesCheckNameAvailabilityOptionalParams, ): Promise; /** * Create a new StorageSyncService. @@ -67,10 +67,10 @@ export interface StorageSyncServices { resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, - options?: StorageSyncServicesCreateOptionalParams + options?: StorageSyncServicesCreateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageSyncServicesCreateResponse > >; @@ -85,7 +85,7 @@ export interface StorageSyncServices { resourceGroupName: string, storageSyncServiceName: string, parameters: StorageSyncServiceCreateParameters, - options?: StorageSyncServicesCreateOptionalParams + options?: StorageSyncServicesCreateOptionalParams, ): Promise; /** * Get a given StorageSyncService. @@ -96,7 +96,7 @@ export interface StorageSyncServices { get( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesGetOptionalParams + options?: StorageSyncServicesGetOptionalParams, ): Promise; /** * Patch a given StorageSyncService. @@ -107,10 +107,10 @@ export interface StorageSyncServices { beginUpdate( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesUpdateOptionalParams + options?: StorageSyncServicesUpdateOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageSyncServicesUpdateResponse > >; @@ -123,7 +123,7 @@ export interface StorageSyncServices { beginUpdateAndWait( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesUpdateOptionalParams + options?: StorageSyncServicesUpdateOptionalParams, ): Promise; /** * Delete a given StorageSyncService. @@ -134,10 +134,10 @@ export interface StorageSyncServices { beginDelete( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesDeleteOptionalParams + options?: StorageSyncServicesDeleteOptionalParams, ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, StorageSyncServicesDeleteResponse > >; @@ -150,6 +150,6 @@ export interface StorageSyncServices { beginDeleteAndWait( resourceGroupName: string, storageSyncServiceName: string, - options?: StorageSyncServicesDeleteOptionalParams + options?: StorageSyncServicesDeleteOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/syncGroups.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/syncGroups.ts index b4af1f412728..853ea55dd17e 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/syncGroups.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/syncGroups.ts @@ -16,7 +16,7 @@ import { SyncGroupsGetOptionalParams, SyncGroupsGetResponse, SyncGroupsDeleteOptionalParams, - SyncGroupsDeleteResponse + SyncGroupsDeleteResponse, } from "../models"; /// @@ -31,7 +31,7 @@ export interface SyncGroups { listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: SyncGroupsListByStorageSyncServiceOptionalParams + options?: SyncGroupsListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator; /** * Create a new SyncGroup. @@ -46,7 +46,7 @@ export interface SyncGroups { storageSyncServiceName: string, syncGroupName: string, parameters: SyncGroupCreateParameters, - options?: SyncGroupsCreateOptionalParams + options?: SyncGroupsCreateOptionalParams, ): Promise; /** * Get a given SyncGroup. @@ -59,7 +59,7 @@ export interface SyncGroups { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: SyncGroupsGetOptionalParams + options?: SyncGroupsGetOptionalParams, ): Promise; /** * Delete a given SyncGroup. @@ -72,6 +72,6 @@ export interface SyncGroups { resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, - options?: SyncGroupsDeleteOptionalParams + options?: SyncGroupsDeleteOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/workflows.ts b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/workflows.ts index b9e2b7d0fe88..8165cf96f6a5 100644 --- a/sdk/storagesync/arm-storagesync/src/operationsInterfaces/workflows.ts +++ b/sdk/storagesync/arm-storagesync/src/operationsInterfaces/workflows.ts @@ -13,7 +13,7 @@ import { WorkflowsGetOptionalParams, WorkflowsGetResponse, WorkflowsAbortOptionalParams, - WorkflowsAbortResponse + WorkflowsAbortResponse, } from "../models"; /// @@ -28,7 +28,7 @@ export interface Workflows { listByStorageSyncService( resourceGroupName: string, storageSyncServiceName: string, - options?: WorkflowsListByStorageSyncServiceOptionalParams + options?: WorkflowsListByStorageSyncServiceOptionalParams, ): PagedAsyncIterableIterator; /** * Get Workflows resource @@ -41,7 +41,7 @@ export interface Workflows { resourceGroupName: string, storageSyncServiceName: string, workflowId: string, - options?: WorkflowsGetOptionalParams + options?: WorkflowsGetOptionalParams, ): Promise; /** * Abort the given workflow. @@ -54,6 +54,6 @@ export interface Workflows { resourceGroupName: string, storageSyncServiceName: string, workflowId: string, - options?: WorkflowsAbortOptionalParams + options?: WorkflowsAbortOptionalParams, ): Promise; } diff --git a/sdk/storagesync/arm-storagesync/src/pagingHelper.ts b/sdk/storagesync/arm-storagesync/src/pagingHelper.ts index 269a2b9814b5..205cccc26592 100644 --- a/sdk/storagesync/arm-storagesync/src/pagingHelper.ts +++ b/sdk/storagesync/arm-storagesync/src/pagingHelper.ts @@ -28,7 +28,7 @@ export function getContinuationToken(page: unknown): string | undefined { export function setContinuationToken( page: unknown, - continuationToken: string | undefined + continuationToken: string | undefined, ): void { if (typeof page !== "object" || page === null || !continuationToken) { return; diff --git a/sdk/storagesync/arm-storagesync/test/sampleTest.ts b/sdk/storagesync/arm-storagesync/test/sampleTest.ts index 8ff7deb0acbe..d64be981b694 100644 --- a/sdk/storagesync/arm-storagesync/test/sampleTest.ts +++ b/sdk/storagesync/arm-storagesync/test/sampleTest.ts @@ -9,7 +9,7 @@ import { Recorder, RecorderStartOptions, - env + env, } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { Context } from "mocha"; @@ -18,15 +18,11 @@ const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderOptions: RecorderStartOptions = { envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], }; describe("My test", () => { diff --git a/sdk/storagesync/arm-storagesync/tsconfig.json b/sdk/storagesync/arm-storagesync/tsconfig.json index 7b624a8f1409..b35d05ad6e9d 100644 --- a/sdk/storagesync/arm-storagesync/tsconfig.json +++ b/sdk/storagesync/arm-storagesync/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-storagesync": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ - "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules"