From 26e839da0359976f561b10f1bdabfd193e23bdf5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 11 Feb 2025 18:09:35 +0000 Subject: [PATCH] CodeGen from PR 32548 in Azure/azure-rest-api-specs Merge 8c72a2bb32bcf75ece92aa0ffab4f1dab2cfdb16 into dc6126aca1852126259a71852672555a6e69dbc2 --- common/config/rush/pnpm-lock.yaml | 34 +- .../eventgrid-systemevents/CHANGELOG.md | 48 - sdk/eventgrid/eventgrid-systemevents/LICENSE | 8 +- .../eventgrid-systemevents/README.md | 56 +- .../eventgrid-systemevents/eslint.config.mjs | 16 + .../eventgrid-systemevents/package.json | 153 +- .../review/eventgrid-systemevents.api.md | 2691 ---------- .../eventgrid-systemevents/sample.env | 1 + .../src/{cadl-generated => }/api/index.ts | 2 +- .../rest/responses.ts => api/options.ts} | 2 - .../src/api/systemEventsContext.ts | 37 + .../cadl-generated/api/systemEventsContext.ts | 26 - .../helpers/serializerHelpers.ts | 36 - .../src/cadl-generated/models/index.ts | 326 -- .../src/cadl-generated/models/options.ts | 4 - .../cadl-generated/rest/clientDefinitions.ts | 10 - .../src/cadl-generated/rest/index.ts | 11 - .../src/cadl-generated/rest/parameters.ts | 4 - .../cadl-generated/rest/systemEventsClient.ts | 45 - .../eventgrid-systemevents/src/index.ts | 41 +- .../src/{cadl-generated => }/logger.ts | 0 .../eventgrid-systemevents/src/models.ts | 262 - .../src/{cadl-generated => models}/index.ts | 4 +- .../src/{cadl-generated => }/models/models.ts | 4548 ++++++++++++++--- .../eventgrid-systemevents/src/predicates.ts | 618 --- ...mEventsClient.ts => systemEventsClient.ts} | 12 +- .../test/public/events.spec.ts | 21 - .../test/snippets.spec.ts | 11 - .../eventgrid-systemevents/tests.yml | 7 - .../eventgrid-systemevents/tsdoc.json | 4 - .../eventgrid-systemevents/tsp-location.yaml | 4 + .../vitest.browser.config.ts | 5 +- .../eventgrid-systemevents/vitest.config.ts | 1 + .../vitest.esm.config.ts | 6 +- 34 files changed, 4152 insertions(+), 4902 deletions(-) delete mode 100644 sdk/eventgrid/eventgrid-systemevents/CHANGELOG.md create mode 100644 sdk/eventgrid/eventgrid-systemevents/eslint.config.mjs delete mode 100644 sdk/eventgrid/eventgrid-systemevents/review/eventgrid-systemevents.api.md create mode 100644 sdk/eventgrid/eventgrid-systemevents/sample.env rename sdk/eventgrid/eventgrid-systemevents/src/{cadl-generated => }/api/index.ts (100%) rename sdk/eventgrid/eventgrid-systemevents/src/{cadl-generated/rest/responses.ts => api/options.ts} (55%) create mode 100644 sdk/eventgrid/eventgrid-systemevents/src/api/systemEventsContext.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/systemEventsContext.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/helpers/serializerHelpers.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/index.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/options.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/clientDefinitions.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/index.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/parameters.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/systemEventsClient.ts rename sdk/eventgrid/eventgrid-systemevents/src/{cadl-generated => }/logger.ts (100%) delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/models.ts rename sdk/eventgrid/eventgrid-systemevents/src/{cadl-generated => models}/index.ts (99%) rename sdk/eventgrid/eventgrid-systemevents/src/{cadl-generated => }/models/models.ts (54%) delete mode 100644 sdk/eventgrid/eventgrid-systemevents/src/predicates.ts rename sdk/eventgrid/eventgrid-systemevents/src/{cadl-generated/SystemEventsClient.ts => systemEventsClient.ts} (81%) delete mode 100644 sdk/eventgrid/eventgrid-systemevents/test/public/events.spec.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/test/snippets.spec.ts delete mode 100644 sdk/eventgrid/eventgrid-systemevents/tests.yml delete mode 100644 sdk/eventgrid/eventgrid-systemevents/tsdoc.json create mode 100644 sdk/eventgrid/eventgrid-systemevents/tsp-location.yaml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0bddaa1762c6..cb61f8fdbdbd 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -951,7 +951,7 @@ importers: version: file:projects/eventgrid-namespaces.tgz(@types/debug@4.1.12)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.2)(vite@6.1.0(@types/node@22.7.9)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0) '@rush-temp/eventgrid-systemevents': specifier: file:./projects/eventgrid-systemevents.tgz - version: file:projects/eventgrid-systemevents.tgz(@types/debug@4.1.12)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.2)(vite@6.1.0(@types/node@22.7.9)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0) + version: file:projects/eventgrid-systemevents.tgz '@rush-temp/eventhubs-checkpointstore-blob': specifier: file:./projects/eventhubs-checkpointstore-blob.tgz version: file:projects/eventhubs-checkpointstore-blob.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(rollup@4.34.6)(tsx@4.19.2)(vite@6.1.0(@types/node@22.7.9)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0) @@ -3741,7 +3741,7 @@ packages: version: 0.0.0 '@rush-temp/eventgrid-systemevents@file:projects/eventgrid-systemevents.tgz': - resolution: {integrity: sha512-Sq6LAm8xHa7qG+q8Hqt0CdTdeKgVhxRLOIrwSoQ2hHsJHmxat929PBUhBc9LW3JM9iXtVu9tycqfRW74egYIxQ==, tarball: file:projects/eventgrid-systemevents.tgz} + resolution: {integrity: sha512-XL6I29eXCIH0iMt0/OcREtZDrToAPsppW6bm2edqeCnzhGEquMwyzIel1DkMxPxVTMOgCUZeVjwhOM18HaV6cg==, tarball: file:projects/eventgrid-systemevents.tgz} version: 0.0.0 '@rush-temp/eventgrid@file:projects/eventgrid.tgz': @@ -19033,39 +19033,17 @@ snapshots: - webdriverio - yaml - '@rush-temp/eventgrid-systemevents@file:projects/eventgrid-systemevents.tgz(@types/debug@4.1.12)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.2)(vite@6.1.0(@types/node@22.7.9)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)': + '@rush-temp/eventgrid-systemevents@file:projects/eventgrid-systemevents.tgz': dependencies: + '@microsoft/api-extractor': 7.49.2(@types/node@18.19.75) '@types/node': 18.19.75 - '@vitest/browser': 3.0.5(@types/node@18.19.75)(playwright@1.50.1)(typescript@5.7.3)(vite@6.1.0(@types/node@22.7.9)(tsx@4.19.2)(yaml@2.7.0))(vitest@3.0.5) - '@vitest/coverage-istanbul': 3.0.5(vitest@3.0.5) + dotenv: 16.4.7 eslint: 9.20.0 - playwright: 1.50.1 tslib: 2.8.1 - typescript: 5.7.3 - vitest: 3.0.5(@types/debug@4.1.12)(@types/node@18.19.75)(@vitest/browser@3.0.5)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.2)(yaml@2.7.0) + typescript: 5.6.3 transitivePeerDependencies: - - '@edge-runtime/vm' - - '@types/debug' - - '@vitest/ui' - - bufferutil - - happy-dom - jiti - - jsdom - - less - - lightningcss - - msw - - safaridriver - - sass - - sass-embedded - - stylus - - sugarss - supports-color - - terser - - tsx - - utf-8-validate - - vite - - webdriverio - - yaml '@rush-temp/eventgrid@file:projects/eventgrid.tgz(@types/debug@4.1.12)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(tsx@4.19.2)(vite@6.1.0(@types/node@22.7.9)(tsx@4.19.2)(yaml@2.7.0))(yaml@2.7.0)': dependencies: diff --git a/sdk/eventgrid/eventgrid-systemevents/CHANGELOG.md b/sdk/eventgrid/eventgrid-systemevents/CHANGELOG.md deleted file mode 100644 index 8e4310a59edb..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/CHANGELOG.md +++ /dev/null @@ -1,48 +0,0 @@ -# Release History - -## 1.0.0-beta.6 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -- Rename package to `@azure/eventgrid-systemevents` - -## 1.0.0-beta.5 (2025-01-21) - -### Other Changes - -- Added `internetMessageId` property to `AcsEmailDeliveryReportReceivedEventData`. -- Added `recipientMailServerHostName` property to `AcsEmailDeliveryReportStatusDetails`. -- For `AcsSmsReceivedEventData`: - - Added `segmentCount` property -- Regenerated SDK with latest commit. - -## 1.0.0-beta.4 (2024-09-23) - -### Other Changes - -- A new property `tierToColdSummary` is added to the `StorageLifecyclePolicyCompletedEventData` interface. - -## 1.0.0-beta.3 (2024-08-20) - -### Other Changes - -- A new field `accessTier` is added to the `StorageBlobCreatedEventData` object. -- Two new fields `accessTier` & `previousTier` are added to the StorageBlobTierChangedEventData object. - -## 1.0.0-beta.2 (2024-07-16) - -### Other Changes - -- Regenerated SDK with latest commit. Refer [#30399](https://github.com/Azure/azure-sdk-for-js/pull/30399) for further details. - -## 1.0.0-beta.1 (2024-06-11) - -### Features Added - -- Released System Events related to Eventgrid service. diff --git a/sdk/eventgrid/eventgrid-systemevents/LICENSE b/sdk/eventgrid/eventgrid-systemevents/LICENSE index b2f52a2bad4e..2ad4de7b17f0 100644 --- a/sdk/eventgrid/eventgrid-systemevents/LICENSE +++ b/sdk/eventgrid/eventgrid-systemevents/LICENSE @@ -1,6 +1,6 @@ -Copyright (c) Microsoft Corporation. +The MIT License (MIT) -MIT License +Copyright (c) 2025 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 @@ -12,10 +12,10 @@ furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/eventgrid/eventgrid-systemevents/README.md b/sdk/eventgrid/eventgrid-systemevents/README.md index af02ea68fe68..db4d427cfbab 100644 --- a/sdk/eventgrid/eventgrid-systemevents/README.md +++ b/sdk/eventgrid/eventgrid-systemevents/README.md @@ -1,53 +1,46 @@ -# Azure Event Grid System Events client library for JavaScript +# Azure SystemEvents client library for JavaScript -Azure Event Grid system events are published by Azure services to system topics. The models in this package map to events sent by various Azure services. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure SystemEvents client. + +Azure Messaging EventGrid SystemEvents Key links: -- [Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/eventgrid-systemevents/) +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid-systemevents) - [Package (NPM)](https://www.npmjs.com/package/@azure/eventgrid-systemevents) - -- [Product documentation](https://learn.microsoft.com/azure/event-grid/) +- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/eventgrid-systemevents?view=azure-node-preview) ## Getting started ### Currently supported environments - [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. ### Prerequisites - An [Azure subscription][azure_sub]. -- An existing [Event Grid][event_grid] Topic or Domain. If you need to create the resource, you can use the [Azure Portal][azure_portal] or [Azure CLI][azure_cli]. - -If you use the Azure CLI, replace `` and `` with your own unique names: -#### Create an Event Grid Topic - -```bash -az eventgrid topic create --location --resource-group --name -``` +### Install the `@azure/eventgrid-systemevents` package -#### Create an Event Grid Domain +Install the Azure SystemEvents client library for JavaScript with `npm`: ```bash -az eventgrid domain create --location --resource-group --name +npm install @azure/eventgrid-systemevents ``` -### Install the `@azure/eventgrid-systemevents` package -Install the Azure Event Grid System Events client library for JavaScript with `npm`: -```bash -npm install @azure/eventgrid-systemevents -``` +### JavaScript Bundle +To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts -This package provides a list of System Events that could be used to publish events to EventGrid. +### SystemEventsClient + +`SystemEventsClient` is the primary interface for developers using the Azure SystemEvents client library. Explore the methods on this client object to understand the different features of the Azure SystemEvents service that you can access. ## Troubleshooting @@ -55,13 +48,13 @@ This package provides a list of System Events that could be used to publish even Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: -```ts snippet:SetLogLevel -import { setLogLevel } from "@azure/logger"; - +```javascript +const { setLogLevel } = require("@azure/logger"); setLogLevel("info"); ``` -For more detailed instructions on how to enable the logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). +For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + ## Contributing @@ -69,14 +62,9 @@ If you'd like to contribute to this library, please read the [contributing guide ## Related projects -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - +- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) -[azure_cli]: https://learn.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ -[event_grid]: https://learn.microsoft.com/azure/event-grid [azure_portal]: https://portal.azure.com -[azure-core-tracing-github]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-tracing -[cloud-events-distributed-tracing-spec]: https://github.com/cloudevents/spec/blob/v1.0.1/extensions/distributed-tracing.md -[eventgrid-on-kubernetes-using-azure-arc]: https://learn.microsoft.com/azure/event-grid/kubernetes/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity +[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/eventgrid/eventgrid-systemevents/eslint.config.mjs b/sdk/eventgrid/eventgrid-systemevents/eslint.config.mjs new file mode 100644 index 000000000000..a9fcfbef11ff --- /dev/null +++ b/sdk/eventgrid/eventgrid-systemevents/eslint.config.mjs @@ -0,0 +1,16 @@ +import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; + +export default azsdkEslint.config([ + { + rules: { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", + "tsdoc/syntax": "warn", + }, + }, +]); diff --git a/sdk/eventgrid/eventgrid-systemevents/package.json b/sdk/eventgrid/eventgrid-systemevents/package.json index 047b2f00b1c1..15cbba2a453c 100644 --- a/sdk/eventgrid/eventgrid-systemevents/package.json +++ b/sdk/eventgrid/eventgrid-systemevents/package.json @@ -1,65 +1,63 @@ { "name": "@azure/eventgrid-systemevents", - "sdk-type": "client", - "author": "Microsoft Corporation", - "description": "An isomorphic client library for the Azure Event Grid service.", "version": "1.0.0-beta.6", + "description": "A generated SDK for SystemEventsClient.", + "engines": { + "node": ">=18.0.0" + }, + "sideEffects": false, + "autoPublish": false, + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false + }, + "type": "module", "keywords": [ "node", "azure", + "cloud", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid-systemevents/README.md", - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "engines": { - "node": ">=18.0.0" - }, "files": [ "dist/", "README.md", "LICENSE" ], - "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:browser": "dev-tool run build-package && dev-tool run bundle", - "build:node": "dev-tool run build-package && dev-tool run bundle", - "build:samples": "echo Obsolete", - "build:test": "dev-tool run build-package && dev-tool run bundle", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm dist-test temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run build-package && dev-tool run extract-api", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser --no-test-proxy", - "integration-test:node": "dev-tool run test:vitest --no-test-proxy --esm", - "lint": "eslint package.json api-extractor.json README.md src test", - "lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]", - "pack": "npm pack 2>&1", - "test": "npm run clean && npm run build:test && npm run unit-test", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", - "test:node": "npm run clean && npm run build:test && npm run unit-test:node", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser --no-test-proxy", - "unit-test:node": "dev-tool run test:vitest --no-test-proxy", - "update-snippets": "dev-tool run update-snippets" + "sdk-type": "client", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid-systemevents/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/api/systemEventsContext.ts", + "prefix": "userAgentInfo" + } + ] }, - "sideEffects": false, - "autoPublish": false, "dependencies": { "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-rest-pipeline": "^1.18.2", + "@azure/core-rest-pipeline": "^1.19.0", "@azure/core-util": "^1.11.0", "@azure/logger": "^1.1.4", "tslib": "^2.8.1" @@ -68,52 +66,39 @@ "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "@vitest/browser": "^3.0.3", - "@vitest/coverage-istanbul": "^3.0.3", + "@vitest/browser": "^3.0.5", + "@vitest/coverage-istanbul": "^3.0.5", + "dotenv": "^16.0.0", "eslint": "^9.9.0", "playwright": "^1.50.1", - "typescript": "~5.7.2", - "vitest": "^3.0.3" + "typescript": "~5.6.2", + "vitest": "^3.0.5" }, - "type": "module", - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false + "scripts": { + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "build:samples": "echo skipped", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "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 vendored rimraf review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "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", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", + "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "echo skipped" }, "browser": "./dist/browser/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, "react-native": "./dist/react-native/index.js" } diff --git a/sdk/eventgrid/eventgrid-systemevents/review/eventgrid-systemevents.api.md b/sdk/eventgrid/eventgrid-systemevents/review/eventgrid-systemevents.api.md deleted file mode 100644 index 842ae0c84d72..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/review/eventgrid-systemevents.api.md +++ /dev/null @@ -1,2691 +0,0 @@ -## API Report File for "@azure/eventgrid-systemevents" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -// @public -export interface AcsChatEventBase { - recipientCommunicationIdentifier: CommunicationIdentifierModel; - threadId?: string; - transactionId?: string; -} - -// @public -export interface AcsChatEventInThreadBase { - threadId?: string; - transactionId?: string; -} - -// @public -export interface AcsChatMessageDeletedEventData extends AcsChatMessageEventBase { - deleteTime: Date; -} - -// @public -export interface AcsChatMessageDeletedInThreadEventData extends AcsChatMessageEventInThreadBase { - deleteTime: Date; -} - -// @public -export interface AcsChatMessageEditedEventData extends AcsChatMessageEventBase { - editTime: Date; - messageBody?: string; - metadata: Record; -} - -// @public -export interface AcsChatMessageEditedInThreadEventData extends AcsChatMessageEventInThreadBase { - editTime: Date; - messageBody?: string; - metadata: Record; -} - -// @public -export interface AcsChatMessageEventBase extends AcsChatEventBase { - composeTime: Date; - messageId?: string; - senderCommunicationIdentifier: CommunicationIdentifierModel; - senderDisplayName?: string; - type?: string; - version?: number; -} - -// @public -export interface AcsChatMessageEventInThreadBase extends AcsChatEventInThreadBase { - composeTime: Date; - messageId?: string; - senderCommunicationIdentifier: CommunicationIdentifierModel; - senderDisplayName?: string; - type?: string; - version?: number; -} - -// @public -export interface AcsChatMessageReceivedEventData extends AcsChatMessageEventBase { - messageBody?: string; - metadata: Record; -} - -// @public -export interface AcsChatMessageReceivedInThreadEventData extends AcsChatMessageEventInThreadBase { - messageBody?: string; - metadata: Record; -} - -// @public -export interface AcsChatParticipantAddedToThreadEventData extends AcsChatEventInThreadBase { - addedByCommunicationIdentifier: CommunicationIdentifierModel; - participantAdded: AcsChatThreadParticipant; - time: Date; - version?: number; -} - -// @public -export interface AcsChatParticipantAddedToThreadWithUserEventData extends AcsChatThreadEventBase { - addedByCommunicationIdentifier: CommunicationIdentifierModel; - participantAdded: AcsChatThreadParticipant; - time: Date; -} - -// @public -export interface AcsChatParticipantRemovedFromThreadEventData extends AcsChatEventInThreadBase { - participantRemoved: AcsChatThreadParticipant; - removedByCommunicationIdentifier: CommunicationIdentifierModel; - time: Date; - version?: number; -} - -// @public -export interface AcsChatParticipantRemovedFromThreadWithUserEventData extends AcsChatThreadEventBase { - participantRemoved: AcsChatThreadParticipant; - removedByCommunicationIdentifier: CommunicationIdentifierModel; - time: Date; -} - -// @public -export interface AcsChatThreadCreatedEventData extends AcsChatThreadEventInThreadBase { - createdByCommunicationIdentifier: CommunicationIdentifierModel; - metadata: Record; - participants: AcsChatThreadParticipant[]; - properties: Record; -} - -// @public -export interface AcsChatThreadCreatedWithUserEventData extends AcsChatThreadEventBase { - createdByCommunicationIdentifier: CommunicationIdentifierModel; - metadata: Record; - participants: AcsChatThreadParticipant[]; - properties: Record; -} - -// @public -export interface AcsChatThreadDeletedEventData extends AcsChatThreadEventInThreadBase { - deletedByCommunicationIdentifier: CommunicationIdentifierModel; - deleteTime: Date; -} - -// @public -export interface AcsChatThreadEventBase extends AcsChatEventBase { - createTime: Date; - version?: number; -} - -// @public -export interface AcsChatThreadEventInThreadBase extends AcsChatEventInThreadBase { - createTime: Date; - version?: number; -} - -// @public -export interface AcsChatThreadParticipant { - displayName?: string; - metadata: Record; - participantCommunicationIdentifier: CommunicationIdentifierModel; -} - -// @public -export interface AcsChatThreadPropertiesUpdatedEventData extends AcsChatThreadEventInThreadBase { - editedByCommunicationIdentifier: CommunicationIdentifierModel; - editTime: Date; - metadata: Record; - properties: Record; -} - -// @public -export interface AcsChatThreadPropertiesUpdatedPerUserEventData extends AcsChatThreadEventBase { - editedByCommunicationIdentifier: CommunicationIdentifierModel; - editTime: Date; - metadata: Record; - properties: Record; -} - -// @public -export interface AcsChatThreadWithUserDeletedEventData extends AcsChatThreadEventBase { - deletedByCommunicationIdentifier: CommunicationIdentifierModel; - deleteTime: Date; -} - -// @public -export interface AcsEmailDeliveryReportReceivedEventData { - deliveryAttemptTimestamp: Date; - deliveryStatusDetails: AcsEmailDeliveryReportStatusDetails; - internetMessageId: string; - messageId?: string; - recipient: string; - sender: string; - status: AcsEmailDeliveryReportStatus; -} - -// @public -export type AcsEmailDeliveryReportStatus = string; - -// @public -export interface AcsEmailDeliveryReportStatusDetails { - recipientMailServerHostName?: string; - statusMessage?: string; -} - -// @public -export interface AcsEmailEngagementTrackingReportReceivedEventData { - engagement: AcsUserEngagement; - engagementContext?: string; - messageId?: string; - recipient?: string; - sender?: string; - userActionTimestamp: Date; - userAgent?: string; -} - -// @public -export interface AcsIncomingCallCustomContext { - sipHeaders: Record; - voipHeaders: Record; -} - -// @public -export interface AcsIncomingCallEventData { - callerDisplayName?: string; - correlationId?: string; - customContext: AcsIncomingCallCustomContext; - fromCommunicationIdentifier: CommunicationIdentifierModel; - incomingCallContext?: string; - onBehalfOfCallee?: CommunicationIdentifierModel; - serverCallId?: string; - toCommunicationIdentifier: CommunicationIdentifierModel; -} - -// @public -export type AcsInteractiveReplyKind = string; - -// @public -export interface AcsMessageButtonContent { - payload?: string; - text?: string; -} - -// @public -export interface AcsMessageChannelEventError { - channelCode?: string; - channelMessage?: string; -} - -// @public -export type AcsMessageChannelKind = string; - -// @public -export interface AcsMessageContext { - from?: string; - messageId?: string; -} - -// @public -export type AcsMessageDeliveryStatus = string; - -// @public -export interface AcsMessageDeliveryStatusUpdatedEventData extends AcsMessageEventData { - channelKind: AcsMessageChannelKind; - messageId?: string; - status: AcsMessageDeliveryStatus; -} - -// @public -export interface AcsMessageEventData { - error: AcsMessageChannelEventError; - from?: string; - receivedTimeStamp: Date; - to?: string; -} - -// @public -export interface AcsMessageInteractiveButtonReplyContent { - buttonId?: string; - title?: string; -} - -// @public -export interface AcsMessageInteractiveContent { - buttonReply: AcsMessageInteractiveButtonReplyContent; - listReply: AcsMessageInteractiveListReplyContent; - replyKind: AcsInteractiveReplyKind; -} - -// @public -export interface AcsMessageInteractiveListReplyContent { - description?: string; - listItemId?: string; - title?: string; -} - -// @public -export interface AcsMessageMediaContent { - caption?: string; - fileName?: string; - mediaId?: string; - mimeType?: string; -} - -// @public -export interface AcsMessageReceivedEventData extends AcsMessageEventData { - button: AcsMessageButtonContent; - channelKind: AcsMessageChannelKind; - content?: string; - context: AcsMessageContext; - interactiveContent: AcsMessageInteractiveContent; - mediaContent: AcsMessageMediaContent; -} - -// @public -export interface AcsRecordingChunkInfo { - contentLocation?: string; - deleteLocation?: string; - documentId?: string; - endReason?: string; - index?: number; - metadataLocation?: string; -} - -// @public -export interface AcsRecordingFileStatusUpdatedEventData { - recordingChannelType: RecordingChannelType; - recordingContentType: RecordingContentType; - recordingDurationMs?: number; - recordingFormatType: RecordingFormatType; - recordingStartTime: Date; - recordingStorageInfo: AcsRecordingStorageInfo; - sessionEndReason?: string; -} - -// @public -export interface AcsRecordingStorageInfo { - recordingChunks: AcsRecordingChunkInfo[]; -} - -// @public -export interface AcsRouterChannelConfiguration { - capacityCostPerJob?: number; - channelId?: string; - maxNumberOfJobs?: number; -} - -// @public -export interface AcsRouterCommunicationError { - code?: string; - details: AcsRouterCommunicationError[]; - innererror: AcsRouterCommunicationError; - message?: string; - target?: string; -} - -// @public -export interface AcsRouterEventData { - channelId?: string; - channelReference?: string; - jobId?: string; -} - -// @public -export interface AcsRouterJobCancelledEventData extends AcsRouterJobEventData { - dispositionCode?: string; - note?: string; -} - -// @public -export interface AcsRouterJobClassificationFailedEventData extends AcsRouterJobEventData { - classificationPolicyId?: string; - errors: AcsRouterCommunicationError[]; -} - -// @public -export interface AcsRouterJobClassifiedEventData extends AcsRouterJobEventData { - attachedWorkerSelectors: AcsRouterWorkerSelector[]; - classificationPolicyId?: string; - priority?: number; - queueDetails: AcsRouterQueueDetails; -} - -// @public -export interface AcsRouterJobClosedEventData extends AcsRouterJobEventData { - assignmentId?: string; - dispositionCode?: string; - workerId?: string; -} - -// @public -export interface AcsRouterJobCompletedEventData extends AcsRouterJobEventData { - assignmentId?: string; - workerId?: string; -} - -// @public -export interface AcsRouterJobDeletedEventData extends AcsRouterJobEventData { -} - -// @public -export interface AcsRouterJobEventData extends AcsRouterEventData { - labels: Record; - queueId?: string; - tags: Record; -} - -// @public -export interface AcsRouterJobExceptionTriggeredEventData extends AcsRouterJobEventData { - exceptionRuleId?: string; - ruleKey?: string; -} - -// @public -export interface AcsRouterJobQueuedEventData extends AcsRouterJobEventData { - attachedWorkerSelectors: AcsRouterWorkerSelector[]; - priority?: number; - requestedWorkerSelectors: AcsRouterWorkerSelector[]; -} - -// @public -export interface AcsRouterJobReceivedEventData extends AcsRouterJobEventData { - classificationPolicyId?: string; - jobStatus: AcsRouterJobStatus; - priority?: number; - requestedWorkerSelectors: AcsRouterWorkerSelector[]; - scheduledOn: Date; - unavailableForMatching: boolean; -} - -// @public -export interface AcsRouterJobSchedulingFailedEventData extends AcsRouterJobEventData { - expiredAttachedWorkerSelectors: AcsRouterWorkerSelector[]; - expiredRequestedWorkerSelectors: AcsRouterWorkerSelector[]; - failureReason?: string; - priority?: number; - scheduledOn: Date; -} - -// @public -export type AcsRouterJobStatus = string; - -// @public -export interface AcsRouterJobUnassignedEventData extends AcsRouterJobEventData { - assignmentId?: string; - workerId?: string; -} - -// @public -export interface AcsRouterJobWaitingForActivationEventData extends AcsRouterJobEventData { - expiredAttachedWorkerSelectors: AcsRouterWorkerSelector[]; - expiredRequestedWorkerSelectors: AcsRouterWorkerSelector[]; - priority?: number; - scheduledOn: Date; - unavailableForMatching: boolean; -} - -// @public -export interface AcsRouterJobWorkerSelectorsExpiredEventData extends AcsRouterJobEventData { - expiredAttachedWorkerSelectors: AcsRouterWorkerSelector[]; - expiredRequestedWorkerSelectors: AcsRouterWorkerSelector[]; -} - -// @public -export type AcsRouterLabelOperator = string; - -// @public -export interface AcsRouterQueueDetails { - id?: string; - labels: Record; - name?: string; -} - -// @public -export type AcsRouterUpdatedWorkerProperty = string; - -// @public -export interface AcsRouterWorkerDeletedEventData extends AcsRouterWorkerEventData { -} - -// @public -export interface AcsRouterWorkerDeregisteredEventData { - workerId?: string; -} - -// @public -export interface AcsRouterWorkerEventData extends AcsRouterEventData { - workerId?: string; -} - -// @public -export interface AcsRouterWorkerOfferAcceptedEventData extends AcsRouterWorkerEventData { - assignmentId?: string; - jobLabels: Record; - jobPriority?: number; - jobTags: Record; - offerId?: string; - queueId?: string; - workerLabels: Record; - workerTags: Record; -} - -// @public -export interface AcsRouterWorkerOfferDeclinedEventData extends AcsRouterWorkerEventData { - offerId?: string; - queueId?: string; -} - -// @public -export interface AcsRouterWorkerOfferExpiredEventData extends AcsRouterWorkerEventData { - offerId?: string; - queueId?: string; -} - -// @public -export interface AcsRouterWorkerOfferIssuedEventData extends AcsRouterWorkerEventData { - expiresOn: Date; - jobLabels: Record; - jobPriority?: number; - jobTags: Record; - offeredOn: Date; - offerId?: string; - queueId?: string; - workerLabels: Record; - workerTags: Record; -} - -// @public -export interface AcsRouterWorkerOfferRevokedEventData extends AcsRouterWorkerEventData { - offerId?: string; - queueId?: string; -} - -// @public -export interface AcsRouterWorkerRegisteredEventData { - channelConfigurations: AcsRouterChannelConfiguration[]; - labels: Record; - queueAssignments: AcsRouterQueueDetails[]; - tags: Record; - totalCapacity?: number; - workerId?: string; -} - -// @public -export interface AcsRouterWorkerSelector { - expirationTime: Date; - key?: string; - labelOperator: AcsRouterLabelOperator; - labelValue: any; - state: AcsRouterWorkerSelectorState; - ttlSeconds: number; -} - -// @public -export type AcsRouterWorkerSelectorState = string; - -// @public -export interface AcsRouterWorkerUpdatedEventData { - channelConfigurations: AcsRouterChannelConfiguration[]; - labels: Record; - queueAssignments: AcsRouterQueueDetails[]; - tags: Record; - totalCapacity?: number; - updatedWorkerProperties: AcsRouterUpdatedWorkerProperty[]; - workerId?: string; -} - -// @public -export interface AcsSmsDeliveryAttempt { - segmentsFailed?: number; - segmentsSucceeded?: number; - timestamp: Date; -} - -// @public -export interface AcsSmsDeliveryReportReceivedEventData extends AcsSmsEventBase { - deliveryAttempts: AcsSmsDeliveryAttempt[]; - deliveryStatus?: string; - deliveryStatusDetails?: string; - receivedTimestamp: Date; - tag?: string; -} - -// @public -export interface AcsSmsEventBase { - from?: string; - messageId?: string; - to?: string; -} - -// @public -export interface AcsSmsReceivedEventData extends AcsSmsEventBase { - message?: string; - receivedTimestamp: Date; - segmentCount: number; -} - -// @public -export interface AcsUserDisconnectedEventData { - userCommunicationIdentifier: CommunicationIdentifierModel; -} - -// @public -export type AcsUserEngagement = string; - -// @public -export interface ApiCenterApiDefinitionAddedEventData { - description?: string; - specification?: ApiCenterApiSpecification; - title: string; -} - -// @public -export interface ApiCenterApiDefinitionUpdatedEventData { - description?: string; - specification?: ApiCenterApiSpecification; - title: string; -} - -// @public -export interface ApiCenterApiSpecification { - name: string; - version?: string; -} - -// @public -export interface ApiManagementApiCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementApiDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementApiReleaseCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementApiReleaseDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementApiReleaseUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementApiUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayApiAddedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayApiRemovedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayCertificateAuthorityCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayCertificateAuthorityDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayCertificateAuthorityUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayHostnameConfigurationCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayHostnameConfigurationDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayHostnameConfigurationUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementGatewayUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementProductCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementProductDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementProductUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementSubscriptionCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementSubscriptionDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementSubscriptionUpdatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementUserCreatedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementUserDeletedEventData { - resourceUri?: string; -} - -// @public -export interface ApiManagementUserUpdatedEventData { - resourceUri?: string; -} - -// @public -export type AppAction = string; - -// @public -export interface AppConfigurationKeyValueDeletedEventData { - etag?: string; - key?: string; - label?: string; - syncToken?: string; -} - -// @public -export interface AppConfigurationKeyValueModifiedEventData { - etag?: string; - key?: string; - label?: string; - syncToken?: string; -} - -// @public -export interface AppConfigurationSnapshotCreatedEventData extends AppConfigurationSnapshotEventData { -} - -// @public -export interface AppConfigurationSnapshotEventData { - etag?: string; - name?: string; - syncToken?: string; -} - -// @public -export interface AppConfigurationSnapshotModifiedEventData extends AppConfigurationSnapshotEventData { -} - -// @public -export interface AppEventTypeDetail { - action: AppAction; -} - -// @public -export type AppServicePlanAction = string; - -// @public -export interface AppServicePlanEventTypeDetail { - action: AppServicePlanAction; - stampKind: StampKind; - status: AsyncStatus; -} - -// @public -export type AsyncStatus = string; - -// @public -export interface AvsClusterCreatedEventData extends AvsClusterEventData { -} - -// @public -export interface AvsClusterDeletedEventData extends AvsClusterEventData { -} - -// @public -export interface AvsClusterEventData { - addedHostNames?: string[]; - inMaintenanceHostNames?: string[]; - operationId: string; - removedHostNames?: string[]; -} - -// @public -export interface AvsClusterFailedEventData extends AvsClusterEventData { - failureMessage?: string; -} - -// @public -export interface AvsClusterUpdatedEventData extends AvsClusterEventData { -} - -// @public -export interface AvsClusterUpdatingEventData extends AvsClusterEventData { -} - -// @public -export interface AvsPrivateCloudEventData { - operationId: string; -} - -// @public -export interface AvsPrivateCloudFailedEventData extends AvsPrivateCloudEventData { - failureMessage?: string; -} - -// @public -export interface AvsPrivateCloudUpdatedEventData extends AvsPrivateCloudEventData { -} - -// @public -export interface AvsPrivateCloudUpdatingEventData extends AvsPrivateCloudEventData { -} - -// @public -export interface AvsScriptExecutionCancelledEventData extends AvsScriptExecutionEventData { -} - -// @public -export interface AvsScriptExecutionEventData { - cmdletId: string; - operationId: string; - output?: string[]; -} - -// @public -export interface AvsScriptExecutionFailedEventData extends AvsScriptExecutionEventData { - failureMessage?: string; -} - -// @public -export interface AvsScriptExecutionFinishedEventData extends AvsScriptExecutionEventData { - namedOutputs: Record; -} - -// @public -export interface AvsScriptExecutionStartedEventData extends AvsScriptExecutionEventData { -} - -// @public -export interface CloudEvent { - data?: T; - dataContentType?: string; - dataSchema?: string; - extensionAttributes?: Record; - id: string; - source: string; - specVersion?: string | "1.0"; - subject?: string; - time?: Date; - type: string; -} - -// @public -export type CommunicationCloudEnvironmentModel = string; - -// @public -export interface CommunicationIdentifierModel { - communicationUser: CommunicationUserIdentifierModel; - kind: CommunicationIdentifierModelKind; - microsoftTeamsApp: MicrosoftTeamsAppIdentifierModel; - microsoftTeamsUser: MicrosoftTeamsUserIdentifierModel; - phoneNumber: PhoneNumberIdentifierModel; - rawId?: string; -} - -// @public -export type CommunicationIdentifierModelKind = string; - -// @public -export interface CommunicationUserIdentifierModel { - id: string; -} - -// @public -export interface ContainerRegistryArtifactEventData { - action: string; - connectedRegistry?: ContainerRegistryEventConnectedRegistry; - id: string; - location: string; - target: ContainerRegistryArtifactEventTarget; - timestamp: Date; -} - -// @public -export interface ContainerRegistryArtifactEventTarget { - digest?: string; - mediaType: string; - name?: string; - repository: string; - size?: number; - tag?: string; - version?: string; -} - -// @public -export interface ContainerRegistryChartDeletedEventData extends ContainerRegistryArtifactEventData { -} - -// @public -export interface ContainerRegistryChartPushedEventData extends ContainerRegistryArtifactEventData { -} - -// @public -export interface ContainerRegistryEventActor { - name?: string; -} - -// @public -export interface ContainerRegistryEventConnectedRegistry { - name: string; -} - -// @public -export interface ContainerRegistryEventData { - action: string; - actor?: ContainerRegistryEventActor; - connectedRegistry?: ContainerRegistryEventConnectedRegistry; - id: string; - location: string; - request?: ContainerRegistryEventRequest; - source?: ContainerRegistryEventSource; - target: ContainerRegistryEventTarget; - timestamp: Date; -} - -// @public -export interface ContainerRegistryEventRequest { - addr?: string; - host: string; - id: string; - method: string; - useragent?: string; -} - -// @public -export interface ContainerRegistryEventSource { - addr?: string; - instanceID?: string; -} - -// @public -export interface ContainerRegistryEventTarget { - digest?: string; - length?: number; - mediaType: string; - repository: string; - size?: number; - tag?: string; - url?: string; -} - -// @public -export interface ContainerRegistryImageDeletedEventData extends ContainerRegistryEventData { -} - -// @public -export interface ContainerRegistryImagePushedEventData extends ContainerRegistryEventData { -} - -// @public -export interface ContainerServiceClusterSupportEndedEventData extends ContainerServiceClusterSupportEventData { -} - -// @public -export interface ContainerServiceClusterSupportEndingEventData extends ContainerServiceClusterSupportEventData { -} - -// @public -export interface ContainerServiceClusterSupportEventData { - kubernetesVersion?: string; -} - -// @public -export interface ContainerServiceNewKubernetesVersionAvailableEventData { - latestPreviewKubernetesVersion?: string; - latestStableKubernetesVersion?: string; - latestSupportedKubernetesVersion?: string; - lowestMinorKubernetesVersion?: string; -} - -// @public -export interface ContainerServiceNodePoolRollingEventData { - nodePoolName?: string; -} - -// @public -export interface ContainerServiceNodePoolRollingFailedEventData extends ContainerServiceNodePoolRollingEventData { -} - -// @public -export interface ContainerServiceNodePoolRollingStartedEventData extends ContainerServiceNodePoolRollingEventData { -} - -// @public -export interface ContainerServiceNodePoolRollingSucceededEventData extends ContainerServiceNodePoolRollingEventData { -} - -// @public -export interface DataBoxCopyCompletedEventData { - serialNumber: string; - stageName: DataBoxStageName; - stageTime: Date; -} - -// @public -export interface DataBoxCopyStartedEventData { - serialNumber: string; - stageName: DataBoxStageName; - stageTime: Date; -} - -// @public -export interface DataBoxOrderCompletedEventData { - serialNumber: string; - stageName: DataBoxStageName; - stageTime: Date; -} - -// @public -export type DataBoxStageName = string; - -// @public -export interface DeviceConnectionStateEvent { - deviceConnectionStateEventInfo: DeviceConnectionStateEventInfo; - deviceId: string; - hubName: string; - moduleId?: string; -} - -// @public -export interface DeviceConnectionStateEventInfo { - sequenceNumber: string; -} - -// @public -export interface DeviceLifeCycleEvent { - deviceId: string; - hubName: string; - twin: DeviceTwinInfo; -} - -// @public -export interface DeviceTelemetryEvent { - body: Record; - properties: Record; - systemProperties: Record; -} - -// @public -export interface DeviceTwin { - metadata: DeviceTwinMetadata; - version: number; -} - -// @public -export interface DeviceTwinInfo { - authenticationType: string; - cloudToDeviceMessageCount: number; - connectionState: string; - deviceId: string; - etag: string; - lastActivityTime: string; - properties: DeviceTwinInfoProperties; - status: string; - statusUpdateTime: string; - version: number; - x509Thumbprint: DeviceTwinInfoX509Thumbprint; -} - -// @public -export interface DeviceTwinInfoProperties { - desired: DeviceTwin; - reported: DeviceTwin; -} - -// @public -export interface DeviceTwinInfoX509Thumbprint { - primaryThumbprint: string; - secondaryThumbprint: string; -} - -// @public -export interface DeviceTwinMetadata { - lastUpdated: string; -} - -// @public -export interface EventGridEvent { - data: T; - dataVersion: string; - eventTime: Date; - eventType: string; - id: string; - subject: string; - topic?: string; -} - -// @public -export interface EventGridMqttClientCreatedOrUpdatedEventData extends EventGridMqttClientEventData { - attributes: Record; - createdOn: Date; - state: EventGridMqttClientState; - updatedOn: Date; -} - -// @public -export interface EventGridMqttClientDeletedEventData extends EventGridMqttClientEventData { -} - -// @public -export type EventGridMqttClientDisconnectionReason = string; - -// @public -export interface EventGridMqttClientEventData { - clientAuthenticationName: string; - clientName: string; - namespaceName: string; -} - -// @public -export interface EventGridMqttClientSessionConnectedEventData extends EventGridMqttClientEventData { - clientSessionName: string; - sequenceNumber: number; -} - -// @public -export interface EventGridMqttClientSessionDisconnectedEventData extends EventGridMqttClientEventData { - clientSessionName: string; - disconnectionReason: EventGridMqttClientDisconnectionReason; - sequenceNumber: number; -} - -// @public -export type EventGridMqttClientState = string; - -// @public -export interface EventHubCaptureFileCreatedEventData { - eventCount?: number; - fileType?: string; - fileUrl?: string; - firstEnqueueTime: Date; - firstSequenceNumber?: number; - lastEnqueueTime: Date; - lastSequenceNumber?: number; - partitionId?: string; - sizeInBytes?: number; -} - -// @public -export interface HealthcareDicomImageCreatedEventData { - imageSeriesInstanceUid: string; - imageSopInstanceUid: string; - imageStudyInstanceUid: string; - partitionName: string; - sequenceNumber: number; - serviceHostName: string; -} - -// @public -export interface HealthcareDicomImageDeletedEventData { - imageSeriesInstanceUid: string; - imageSopInstanceUid: string; - imageStudyInstanceUid: string; - partitionName: string; - sequenceNumber: number; - serviceHostName: string; -} - -// @public -export interface HealthcareDicomImageUpdatedEventData { - imageSeriesInstanceUid: string; - imageSopInstanceUid: string; - imageStudyInstanceUid: string; - partitionName: string; - sequenceNumber: number; - serviceHostName: string; -} - -// @public -export interface HealthcareFhirResourceCreatedEventData { - resourceFhirAccount: string; - resourceFhirId: string; - resourceType: HealthcareFhirResourceType; - resourceVersionId: number; -} - -// @public -export interface HealthcareFhirResourceDeletedEventData { - resourceFhirAccount: string; - resourceFhirId: string; - resourceType: HealthcareFhirResourceType; - resourceVersionId: number; -} - -// @public -export type HealthcareFhirResourceType = string; - -// @public -export interface HealthcareFhirResourceUpdatedEventData { - resourceFhirAccount: string; - resourceFhirId: string; - resourceType: HealthcareFhirResourceType; - resourceVersionId: number; -} - -// @public -export interface IotHubDeviceConnectedEventData extends DeviceConnectionStateEvent { -} - -// @public -export interface IotHubDeviceCreatedEventData extends DeviceLifeCycleEvent { -} - -// @public -export interface IotHubDeviceDeletedEventData extends DeviceLifeCycleEvent { -} - -// @public -export interface IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEvent { -} - -// @public -export interface IotHubDeviceTelemetryEventData extends DeviceTelemetryEvent { -} - -// @public -export function isSystemEvent(eventType: T, event: EventGridEvent): event is EventGridEvent; - -// @public -export function isSystemEvent(eventType: T, event: CloudEvent): event is CloudEvent; - -// @public -export interface KeyVaultAccessPolicyChangedEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultCertificateExpiredEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultCertificateNearExpiryEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultCertificateNewVersionCreatedEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultKeyExpiredEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultKeyNearExpiryEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultKeyNewVersionCreatedEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultSecretExpiredEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultSecretNearExpiryEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export interface KeyVaultSecretNewVersionCreatedEventData { - exp?: number; - id?: string; - nbf?: number; - objectName?: string; - objectType?: string; - vaultName?: string; - version?: string; -} - -// @public -export enum KnownAcsEmailDeliveryReportStatus { - Bounced = "Bounced", - Delivered = "Delivered", - Failed = "Failed", - FilteredSpam = "FilteredSpam", - Quarantined = "Quarantined", - Suppressed = "Suppressed" -} - -// @public -export enum KnownAcsInteractiveReplyKind { - buttonReply = "buttonReply", - listReply = "listReply", - unknown = "unknown" -} - -// @public -export enum KnownAcsMessageChannelKind { - whatsapp = "whatsapp" -} - -// @public -export enum KnownAcsMessageDeliveryStatus { - delivered = "delivered", - failed = "failed", - read = "read", - sent = "sent", - unknown = "unknown", - warning = "warning" -} - -// @public -export enum KnownAcsRouterJobStatus { - Assigned = "Assigned", - Cancelled = "Cancelled", - ClassificationFailed = "ClassificationFailed", - Closed = "Closed", - Completed = "Completed", - Created = "Created", - PendingClassification = "PendingClassification", - PendingSchedule = "PendingSchedule", - Queued = "Queued", - Scheduled = "Scheduled", - ScheduleFailed = "ScheduleFailed", - WaitingForActivation = "WaitingForActivation" -} - -// @public -export enum KnownAcsRouterLabelOperator { - Equal = "Equal", - Greater = "Greater", - GreaterThanOrEqual = "GreaterThanOrEqual", - Less = "Less", - LessThanOrEqual = "LessThanOrEqual", - NotEqual = "NotEqual" -} - -// @public -export enum KnownAcsRouterUpdatedWorkerProperty { - AvailableForOffers = "AvailableForOffers", - ChannelConfigurations = "ChannelConfigurations", - Labels = "Labels", - QueueAssignments = "QueueAssignments", - Tags = "Tags", - TotalCapacity = "TotalCapacity" -} - -// @public -export enum KnownAcsRouterWorkerSelectorState { - active = "active", - expired = "expired" -} - -// @public -export enum KnownAcsUserEngagement { - click = "click", - view = "view" -} - -// @public -export enum KnownAppAction { - ChangedAppSettings = "ChangedAppSettings", - Completed = "Completed", - Failed = "Failed", - Restarted = "Restarted", - Started = "Started", - Stopped = "Stopped" -} - -// @public -export enum KnownAppServicePlanAction { - Updated = "Updated" -} - -// @public -export enum KnownAsyncStatus { - Completed = "Completed", - Failed = "Failed", - Started = "Started" -} - -// @public -export enum KnownCommunicationCloudEnvironmentModel { - dod = "dod", - gcch = "gcch", - "public" = "public" -} - -// @public -export enum KnownCommunicationIdentifierModelKind { - communicationUser = "communicationUser", - microsoftTeamsUser = "microsoftTeamsUser", - phoneNumber = "phoneNumber", - unknown = "unknown" -} - -// @public -export enum KnownDataBoxStageName { - CopyCompleted = "CopyCompleted", - CopyStarted = "CopyStarted", - OrderCompleted = "OrderCompleted" -} - -// @public -export enum KnownEventGridMqttClientDisconnectionReason { - ClientAuthenticationError = "ClientAuthenticationError", - ClientAuthorizationError = "ClientAuthorizationError", - ClientError = "ClientError", - ClientInitiatedDisconnect = "ClientInitiatedDisconnect", - ConnectionLost = "ConnectionLost", - IpForbidden = "IpForbidden", - QuotaExceeded = "QuotaExceeded", - ServerError = "ServerError", - ServerInitiatedDisconnect = "ServerInitiatedDisconnect", - SessionOverflow = "SessionOverflow", - SessionTakenOver = "SessionTakenOver" -} - -// @public -export enum KnownEventGridMqttClientState { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownHealthcareFhirResourceType { - Account = "Account", - ActivityDefinition = "ActivityDefinition", - AdverseEvent = "AdverseEvent", - AllergyIntolerance = "AllergyIntolerance", - Appointment = "Appointment", - AppointmentResponse = "AppointmentResponse", - AuditEvent = "AuditEvent", - Basic = "Basic", - Binary = "Binary", - BiologicallyDerivedProduct = "BiologicallyDerivedProduct", - BodySite = "BodySite", - BodyStructure = "BodyStructure", - Bundle = "Bundle", - CapabilityStatement = "CapabilityStatement", - CarePlan = "CarePlan", - CareTeam = "CareTeam", - CatalogEntry = "CatalogEntry", - ChargeItem = "ChargeItem", - ChargeItemDefinition = "ChargeItemDefinition", - Claim = "Claim", - ClaimResponse = "ClaimResponse", - ClinicalImpression = "ClinicalImpression", - CodeSystem = "CodeSystem", - Communication = "Communication", - CommunicationRequest = "CommunicationRequest", - CompartmentDefinition = "CompartmentDefinition", - Composition = "Composition", - ConceptMap = "ConceptMap", - Condition = "Condition", - Consent = "Consent", - Contract = "Contract", - Coverage = "Coverage", - CoverageEligibilityRequest = "CoverageEligibilityRequest", - CoverageEligibilityResponse = "CoverageEligibilityResponse", - DataElement = "DataElement", - DetectedIssue = "DetectedIssue", - Device = "Device", - DeviceComponent = "DeviceComponent", - DeviceDefinition = "DeviceDefinition", - DeviceMetric = "DeviceMetric", - DeviceRequest = "DeviceRequest", - DeviceUseStatement = "DeviceUseStatement", - DiagnosticReport = "DiagnosticReport", - DocumentManifest = "DocumentManifest", - DocumentReference = "DocumentReference", - DomainResource = "DomainResource", - EffectEvidenceSynthesis = "EffectEvidenceSynthesis", - EligibilityRequest = "EligibilityRequest", - EligibilityResponse = "EligibilityResponse", - Encounter = "Encounter", - Endpoint = "Endpoint", - EnrollmentRequest = "EnrollmentRequest", - EnrollmentResponse = "EnrollmentResponse", - EpisodeOfCare = "EpisodeOfCare", - EventDefinition = "EventDefinition", - Evidence = "Evidence", - EvidenceVariable = "EvidenceVariable", - ExampleScenario = "ExampleScenario", - ExpansionProfile = "ExpansionProfile", - ExplanationOfBenefit = "ExplanationOfBenefit", - FamilyMemberHistory = "FamilyMemberHistory", - Flag = "Flag", - Goal = "Goal", - GraphDefinition = "GraphDefinition", - Group = "Group", - GuidanceResponse = "GuidanceResponse", - HealthcareService = "HealthcareService", - ImagingManifest = "ImagingManifest", - ImagingStudy = "ImagingStudy", - Immunization = "Immunization", - ImmunizationEvaluation = "ImmunizationEvaluation", - ImmunizationRecommendation = "ImmunizationRecommendation", - ImplementationGuide = "ImplementationGuide", - InsurancePlan = "InsurancePlan", - Invoice = "Invoice", - Library = "Library", - Linkage = "Linkage", - List = "List", - Location = "Location", - Measure = "Measure", - MeasureReport = "MeasureReport", - Media = "Media", - Medication = "Medication", - MedicationAdministration = "MedicationAdministration", - MedicationDispense = "MedicationDispense", - MedicationKnowledge = "MedicationKnowledge", - MedicationRequest = "MedicationRequest", - MedicationStatement = "MedicationStatement", - MedicinalProduct = "MedicinalProduct", - MedicinalProductAuthorization = "MedicinalProductAuthorization", - MedicinalProductContraindication = "MedicinalProductContraindication", - MedicinalProductIndication = "MedicinalProductIndication", - MedicinalProductIngredient = "MedicinalProductIngredient", - MedicinalProductInteraction = "MedicinalProductInteraction", - MedicinalProductManufactured = "MedicinalProductManufactured", - MedicinalProductPackaged = "MedicinalProductPackaged", - MedicinalProductPharmaceutical = "MedicinalProductPharmaceutical", - MedicinalProductUndesirableEffect = "MedicinalProductUndesirableEffect", - MessageDefinition = "MessageDefinition", - MessageHeader = "MessageHeader", - MolecularSequence = "MolecularSequence", - NamingSystem = "NamingSystem", - NutritionOrder = "NutritionOrder", - Observation = "Observation", - ObservationDefinition = "ObservationDefinition", - OperationDefinition = "OperationDefinition", - OperationOutcome = "OperationOutcome", - Organization = "Organization", - OrganizationAffiliation = "OrganizationAffiliation", - Parameters = "Parameters", - Patient = "Patient", - PaymentNotice = "PaymentNotice", - PaymentReconciliation = "PaymentReconciliation", - Person = "Person", - PlanDefinition = "PlanDefinition", - Practitioner = "Practitioner", - PractitionerRole = "PractitionerRole", - Procedure = "Procedure", - ProcedureRequest = "ProcedureRequest", - ProcessRequest = "ProcessRequest", - ProcessResponse = "ProcessResponse", - Provenance = "Provenance", - Questionnaire = "Questionnaire", - QuestionnaireResponse = "QuestionnaireResponse", - ReferralRequest = "ReferralRequest", - RelatedPerson = "RelatedPerson", - RequestGroup = "RequestGroup", - ResearchDefinition = "ResearchDefinition", - ResearchElementDefinition = "ResearchElementDefinition", - ResearchStudy = "ResearchStudy", - ResearchSubject = "ResearchSubject", - Resource = "Resource", - RiskAssessment = "RiskAssessment", - RiskEvidenceSynthesis = "RiskEvidenceSynthesis", - Schedule = "Schedule", - SearchParameter = "SearchParameter", - Sequence = "Sequence", - ServiceDefinition = "ServiceDefinition", - ServiceRequest = "ServiceRequest", - Slot = "Slot", - Specimen = "Specimen", - SpecimenDefinition = "SpecimenDefinition", - StructureDefinition = "StructureDefinition", - StructureMap = "StructureMap", - Subscription = "Subscription", - Substance = "Substance", - SubstanceNucleicAcid = "SubstanceNucleicAcid", - SubstancePolymer = "SubstancePolymer", - SubstanceProtein = "SubstanceProtein", - SubstanceReferenceInformation = "SubstanceReferenceInformation", - SubstanceSourceMaterial = "SubstanceSourceMaterial", - SubstanceSpecification = "SubstanceSpecification", - SupplyDelivery = "SupplyDelivery", - SupplyRequest = "SupplyRequest", - Task = "Task", - TerminologyCapabilities = "TerminologyCapabilities", - TestReport = "TestReport", - TestScript = "TestScript", - ValueSet = "ValueSet", - VerificationResult = "VerificationResult", - VisionPrescription = "VisionPrescription" -} - -// @public -export enum KnownRecordingChannelType { - Mixed = "Mixed", - Unmixed = "Unmixed" -} - -// @public -export enum KnownRecordingContentType { - Audio = "Audio", - AudioVideo = "AudioVideo" -} - -// @public -export enum KnownRecordingFormatType { - Mp3 = "Mp3", - Mp4 = "Mp4", - Wav = "Wav" -} - -// @public -export enum KnownStampKind { - AseV1 = "AseV1", - AseV2 = "AseV2", - Public = "Public" -} - -// @public -export enum KnownStorageBlobAccessTier { - Archive = "Archive", - Cold = "Cold", - Cool = "Cool", - Default = "Default", - Hot = "Hot" -} - -// @public -export enum KnownStorageTaskAssignmentCompletedStatus { - Failed = "Failed", - Succeeded = "Succeeded" -} - -// @public -export enum KnownStorageTaskCompletedStatus { - Failed = "Failed", - Succeeded = "Succeeded" -} - -// @public -export type KnownSystemEventTypes = keyof SystemEventNameToEventData; - -// @public -export interface MachineLearningServicesDatasetDriftDetectedEventData { - baseDatasetId?: string; - dataDriftId?: string; - dataDriftName?: string; - driftCoefficient?: number; - endTime: Date; - runId?: string; - startTime: Date; - targetDatasetId?: string; -} - -// @public -export interface MachineLearningServicesModelDeployedEventData { - modelIds?: string; - serviceComputeType?: string; - serviceName?: string; - serviceProperties: Record; - serviceTags: Record; -} - -// @public -export interface MachineLearningServicesModelRegisteredEventData { - modelName?: string; - modelProperties: Record; - modelTags: Record; - modelVersion?: string; -} - -// @public -export interface MachineLearningServicesRunCompletedEventData { - experimentId?: string; - experimentName?: string; - runId?: string; - runProperties: Record; - runTags: Record; - runType?: string; -} - -// @public -export interface MachineLearningServicesRunStatusChangedEventData { - experimentId?: string; - experimentName?: string; - runId?: string; - runProperties: Record; - runStatus?: string; - runTags: Record; - runType?: string; -} - -// @public -export interface MapsGeofenceEnteredEventData extends MapsGeofenceEvent { -} - -// @public -export interface MapsGeofenceEvent { - expiredGeofenceGeometryId?: string[]; - geometries: MapsGeofenceGeometry[]; - invalidPeriodGeofenceGeometryId?: string[]; - isEventPublished?: boolean; -} - -// @public -export interface MapsGeofenceExitedEventData extends MapsGeofenceEvent { -} - -// @public -export interface MapsGeofenceGeometry { - deviceId?: string; - distance?: number; - geometryId?: string; - nearestLat?: number; - nearestLon?: number; - udId?: string; -} - -// @public -export interface MapsGeofenceResultEventData extends MapsGeofenceEvent { -} - -// @public -export interface MicrosoftTeamsAppIdentifierModel { - appId: string; - cloud: CommunicationCloudEnvironmentModel; -} - -// @public -export interface MicrosoftTeamsUserIdentifierModel { - cloud: CommunicationCloudEnvironmentModel; - isAnonymous?: boolean; - userId: string; -} - -// @public -export interface PhoneNumberIdentifierModel { - value: string; -} - -// @public -export interface PolicyInsightsPolicyStateChangedEventData { - complianceReasonCode: string; - complianceState: string; - policyAssignmentId: string; - policyDefinitionId: string; - policyDefinitionReferenceId: string; - subscriptionId: string; - timestamp: Date; -} - -// @public -export interface PolicyInsightsPolicyStateCreatedEventData { - complianceReasonCode: string; - complianceState: string; - policyAssignmentId: string; - policyDefinitionId: string; - policyDefinitionReferenceId: string; - subscriptionId: string; - timestamp: Date; -} - -// @public -export interface PolicyInsightsPolicyStateDeletedEventData { - complianceReasonCode: string; - complianceState: string; - policyAssignmentId: string; - policyDefinitionId: string; - policyDefinitionReferenceId: string; - subscriptionId: string; - timestamp: Date; -} - -// @public -export type RecordingChannelType = string; - -// @public -export type RecordingContentType = string; - -// @public -export type RecordingFormatType = string; - -// @public -export interface RedisExportRDBCompletedEventData { - name?: string; - status?: string; - timestamp?: Date; -} - -// @public -export interface RedisImportRDBCompletedEventData { - name?: string; - status?: string; - timestamp?: Date; -} - -// @public -export interface RedisPatchingCompletedEventData { - name?: string; - status?: string; - timestamp?: Date; -} - -// @public -export interface RedisScalingCompletedEventData { - name?: string; - status?: string; - timestamp?: Date; -} - -// @public -export interface ResourceActionCancelEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceActionFailureEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceActionSuccessEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceAuthorization { - action?: string; - evidence: Record; - scope?: string; -} - -// @public -export interface ResourceDeleteCancelEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceDeleteFailureEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceDeleteSuccessEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceHttpRequest { - clientIpAddress?: string; - clientRequestId?: string; - method?: string; - url?: string; -} - -// @public -export interface ResourceNotificationsHealthResourcesAnnotatedEventData extends ResourceNotificationsResourceUpdatedEventData { -} - -// @public -export interface ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData extends ResourceNotificationsResourceUpdatedEventData { -} - -// @public -export interface ResourceNotificationsOperationalDetails { - resourceEventTime: Date; -} - -// @public -export interface ResourceNotificationsResourceDeletedDetails { - id: string; - name: string; - type: string; -} - -// @public -export interface ResourceNotificationsResourceDeletedEventData { - operationalDetails: ResourceNotificationsOperationalDetails; - resourceDetails: ResourceNotificationsResourceDeletedDetails; -} - -// @public -export interface ResourceNotificationsResourceManagementCreatedOrUpdatedEventData extends ResourceNotificationsResourceUpdatedEventData { -} - -// @public -export interface ResourceNotificationsResourceManagementDeletedEventData extends ResourceNotificationsResourceDeletedEventData { -} - -// @public -export interface ResourceNotificationsResourceUpdatedDetails { - id: string; - location?: string; - name: string; - properties?: Record; - tags?: Record; - type: string; -} - -// @public -export interface ResourceNotificationsResourceUpdatedEventData { - apiVersion: string; - operationalDetails: ResourceNotificationsOperationalDetails; - resourceDetails: ResourceNotificationsResourceUpdatedDetails; -} - -// @public -export interface ResourceWriteCancelEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceWriteFailureEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export interface ResourceWriteSuccessEventData { - authorization: ResourceAuthorization; - claims: Record; - correlationId?: string; - httpRequest: ResourceHttpRequest; - operationName?: string; - resourceGroup?: string; - resourceProvider?: string; - resourceUri?: string; - status?: string; - subscriptionId?: string; - tenantId?: string; -} - -// @public -export type ServiceApiVersions = "2018-01-01" | "2024-01-01"; - -// @public -export interface ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData { - entityType: string; - namespaceName: string; - queueName: string | null; - requestUri: string; - subscriptionName: string | null; - topicName: string | null; -} - -// @public -export interface ServiceBusActiveMessagesAvailableWithNoListenersEventData { - entityType: string; - namespaceName: string; - queueName: string | null; - requestUri: string; - subscriptionName: string | null; - topicName: string | null; -} - -// @public -export interface ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData { - entityType: string; - namespaceName: string; - queueName: string | null; - requestUri: string; - subscriptionName: string | null; - topicName: string | null; -} - -// @public -export interface ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { - entityType: string; - namespaceName: string; - queueName: string | null; - requestUri: string; - subscriptionName: string | null; - topicName: string | null; -} - -// @public -export interface SignalRServiceClientConnectionConnectedEventData { - connectionId: string; - hubName: string; - timestamp: Date; - userId?: string; -} - -// @public -export interface SignalRServiceClientConnectionDisconnectedEventData { - connectionId: string; - errorMessage?: string; - hubName: string; - timestamp: Date; - userId?: string; -} - -// @public -export type StampKind = string; - -// @public -export interface StorageAsyncOperationInitiatedEventData { - api?: string; - blobType?: string; - clientRequestId?: string; - contentLength?: number; - contentType?: string; - identity?: string; - requestId?: string; - sequencer?: string; - storageDiagnostics: Record; - url?: string; -} - -// @public -export type StorageBlobAccessTier = string; - -// @public -export interface StorageBlobCreatedEventData { - accessTier: StorageBlobAccessTier; - api?: string; - blobType?: string; - clientRequestId?: string; - contentLength?: number; - contentOffset?: number; - contentType?: string; - eTag?: string; - identity?: string; - requestId?: string; - sequencer?: string; - storageDiagnostics: Record; - url?: string; -} - -// @public -export interface StorageBlobDeletedEventData { - api?: string; - blobType?: string; - clientRequestId?: string; - contentType?: string; - identity?: string; - requestId?: string; - sequencer?: string; - storageDiagnostics: Record; - url?: string; -} - -// @public -export interface StorageBlobInventoryPolicyCompletedEventData { - accountName?: string; - manifestBlobUrl?: string; - policyRunId?: string; - policyRunStatus?: string; - policyRunStatusMessage?: string; - ruleName?: string; - scheduleDateTime: Date; -} - -// @public -export interface StorageBlobRenamedEventData { - api?: string; - clientRequestId?: string; - destinationUrl?: string; - identity?: string; - requestId?: string; - sequencer?: string; - sourceUrl?: string; - storageDiagnostics: Record; -} - -// @public -export interface StorageBlobTierChangedEventData { - accessTier: StorageBlobAccessTier; - api?: string; - blobType?: string; - clientRequestId?: string; - contentLength?: number; - contentType?: string; - identity?: string; - previousTier: StorageBlobAccessTier; - requestId?: string; - sequencer?: string; - storageDiagnostics: Record; - url?: string; -} - -// @public -export interface StorageDirectoryCreatedEventData { - api?: string; - clientRequestId?: string; - eTag?: string; - identity?: string; - requestId?: string; - sequencer?: string; - storageDiagnostics: Record; - url?: string; -} - -// @public -export interface StorageDirectoryDeletedEventData { - api?: string; - clientRequestId?: string; - identity?: string; - recursive?: string; - requestId?: string; - sequencer?: string; - storageDiagnostics: Record; - url?: string; -} - -// @public -export interface StorageDirectoryRenamedEventData { - api?: string; - clientRequestId?: string; - destinationUrl?: string; - identity?: string; - requestId?: string; - sequencer?: string; - sourceUrl?: string; - storageDiagnostics: Record; -} - -// @public -export interface StorageLifecyclePolicyActionSummaryDetail { - errorList?: string; - successCount?: number; - totalObjectsCount?: number; -} - -// @public -export interface StorageLifecyclePolicyCompletedEventData { - deleteSummary: StorageLifecyclePolicyActionSummaryDetail; - // Warning: (ae-forgotten-export) The symbol "StorageLifecyclePolicyRunSummary" needs to be exported by the entry point index.d.ts - policyRunSummary: StorageLifecyclePolicyRunSummary; - scheduleTime?: string; - tierToArchiveSummary: StorageLifecyclePolicyActionSummaryDetail; - tierToColdSummary: StorageLifecyclePolicyActionSummaryDetail; - tierToCoolSummary: StorageLifecyclePolicyActionSummaryDetail; -} - -// @public -export interface StorageTaskAssignmentCompletedEventData { - completedOn: Date; - status: StorageTaskAssignmentCompletedStatus; - summaryReportBlobUri: string; - taskExecutionId?: string; - taskName?: string; -} - -// @public -export type StorageTaskAssignmentCompletedStatus = string; - -// @public -export interface StorageTaskAssignmentQueuedEventData { - queuedOn: Date; - taskExecutionId?: string; -} - -// @public -export interface StorageTaskCompletedEventData { - completedDateTime: Date; - status: StorageTaskCompletedStatus; - summaryReportBlobUrl: string; - taskExecutionId?: string; - taskName?: string; -} - -// @public -export type StorageTaskCompletedStatus = string; - -// @public -export interface StorageTaskQueuedEventData { - queuedDateTime: Date; - taskExecutionId?: string; -} - -// @public -export interface SubscriptionDeletedEventData { - eventSubscriptionId: string; -} - -// @public -export interface SubscriptionValidationEventData { - validationCode: string; - validationUrl: string; -} - -// @public -export interface SubscriptionValidationResponse { - validationResponse: string; -} - -// @public -export interface SystemEventNameToEventData { - "Microsoft.ApiCenter.ApiDefinitionAdded": ApiCenterApiDefinitionAddedEventData; - "Microsoft.ApiCenter.ApiDefinitionUpdated": ApiCenterApiDefinitionUpdatedEventData; - "Microsoft.ApiManagement.APICreated": ApiManagementApiCreatedEventData; - "Microsoft.ApiManagement.APIDeleted": ApiManagementApiDeletedEventData; - "Microsoft.ApiManagement.APIReleaseCreated": ApiManagementApiReleaseCreatedEventData; - "Microsoft.ApiManagement.APIReleaseDeleted": ApiManagementApiReleaseDeletedEventData; - "Microsoft.ApiManagement.APIReleaseUpdated": ApiManagementApiReleaseUpdatedEventData; - "Microsoft.ApiManagement.APIUpdated": ApiManagementApiUpdatedEventData; - "Microsoft.ApiManagement.GatewayAPIAdded": ApiManagementGatewayApiAddedEventData; - "Microsoft.ApiManagement.GatewayAPIRemoved": ApiManagementGatewayApiRemovedEventData; - "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated": ApiManagementGatewayCertificateAuthorityCreatedEventData; - "Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted": ApiManagementGatewayCertificateAuthorityDeletedEventData; - "Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated": ApiManagementGatewayCertificateAuthorityUpdatedEventData; - "Microsoft.ApiManagement.GatewayCreated": ApiManagementGatewayCreatedEventData; - "Microsoft.ApiManagement.GatewayDeleted": ApiManagementGatewayDeletedEventData; - "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated": ApiManagementGatewayHostnameConfigurationCreatedEventData; - "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted": ApiManagementGatewayHostnameConfigurationDeletedEventData; - "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated": ApiManagementGatewayHostnameConfigurationUpdatedEventData; - "Microsoft.ApiManagement.GatewayUpdated": ApiManagementGatewayUpdatedEventData; - "Microsoft.ApiManagement.ProductCreated": ApiManagementProductCreatedEventData; - "Microsoft.ApiManagement.ProductDeleted": ApiManagementProductDeletedEventData; - "Microsoft.ApiManagement.ProductUpdated": ApiManagementProductUpdatedEventData; - "Microsoft.ApiManagement.SubscriptionCreated": ApiManagementSubscriptionCreatedEventData; - "Microsoft.ApiManagement.SubscriptionDeleted": ApiManagementSubscriptionDeletedEventData; - "Microsoft.ApiManagement.SubscriptionUpdated": ApiManagementSubscriptionUpdatedEventData; - "Microsoft.ApiManagement.UserCreated": ApiManagementUserCreatedEventData; - "Microsoft.ApiManagement.UserDeleted": ApiManagementUserDeletedEventData; - "Microsoft.ApiManagement.UserUpdated": ApiManagementUserUpdatedEventData; - "Microsoft.AppConfiguration.KeyValueDeleted": AppConfigurationKeyValueDeletedEventData; - "Microsoft.AppConfiguration.KeyValueModified": AppConfigurationKeyValueModifiedEventData; - "Microsoft.AppConfiguration.SnapshotCreated": AppConfigurationSnapshotCreatedEventData; - "Microsoft.AppConfiguration.SnapshotModified": AppConfigurationSnapshotModifiedEventData; - "Microsoft.AVS.ClusterCreated": AvsClusterCreatedEventData; - "Microsoft.AVS.ClusterDeleted": AvsClusterDeletedEventData; - "Microsoft.AVS.ClusterFailed": AvsClusterFailedEventData; - "Microsoft.AVS.ClusterUpdated": AvsClusterUpdatedEventData; - "Microsoft.AVS.ClusterUpdating": AvsClusterUpdatingEventData; - "Microsoft.AVS.PrivateCloudFailed": AvsPrivateCloudFailedEventData; - "Microsoft.AVS.PrivateCloudUpdated": AvsPrivateCloudUpdatedEventData; - "Microsoft.AVS.PrivateCloudUpdating": AvsPrivateCloudUpdatingEventData; - "Microsoft.AVS.ScriptExecutionCancelled": AvsScriptExecutionCancelledEventData; - "Microsoft.AVS.ScriptExecutionFailed": AvsScriptExecutionFailedEventData; - "Microsoft.AVS.ScriptExecutionFinished": AvsScriptExecutionFinishedEventData; - "Microsoft.AVS.ScriptExecutionStarted": AvsScriptExecutionStartedEventData; - "Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated": AcsMessageDeliveryStatusUpdatedEventData; - "Microsoft.Communication.AdvancedMessageReceived": AcsMessageReceivedEventData; - "Microsoft.Communication.ChatMessageDeleted": AcsChatMessageDeletedEventData; - "Microsoft.Communication.ChatMessageDeletedInThread": AcsChatMessageDeletedInThreadEventData; - "Microsoft.Communication.ChatMessageEdited": AcsChatMessageEditedEventData; - "Microsoft.Communication.ChatMessageEditedInThread": AcsChatMessageEditedInThreadEventData; - "Microsoft.Communication.ChatMessageReceived": AcsChatMessageReceivedEventData; - "Microsoft.Communication.ChatMessageReceivedInThread": AcsChatMessageReceivedInThreadEventData; - "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; - "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser": AcsChatParticipantRemovedFromThreadWithUserEventData; - "Microsoft.Communication.ChatThreadCreatedWithUser": AcsChatThreadCreatedWithUserEventData; - "Microsoft.Communication.ChatThreadParticipantAdded": AcsChatParticipantAddedToThreadEventData; - "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; - "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; - "Microsoft.Communication.ChatThreadWithUserDeleted": AcsChatThreadWithUserDeletedEventData; - "Microsoft.Communication.EmailDeliveryReportReceived": AcsEmailDeliveryReportReceivedEventData; - "Microsoft.Communication.EmailEngagementTrackingReportReceived": AcsEmailEngagementTrackingReportReceivedEventData; - "Microsoft.Communication.IncomingCall": AcsIncomingCallEventData; - "Microsoft.Communication.RecordingFileStatusUpdated": AcsRecordingFileStatusUpdatedEventData; - "Microsoft.Communication.RouterJobCancelled": AcsRouterJobCancelledEventData; - "Microsoft.Communication.RouterJobClassificationFailed": AcsRouterJobClassificationFailedEventData; - "Microsoft.Communication.RouterJobClassified": AcsRouterJobClassifiedEventData; - "Microsoft.Communication.RouterJobClosed": AcsRouterJobClosedEventData; - "Microsoft.Communication.RouterJobCompleted": AcsRouterJobCompletedEventData; - "Microsoft.Communication.RouterJobDeleted": AcsRouterJobDeletedEventData; - "Microsoft.Communication.RouterJobExceptionTriggered": AcsRouterJobExceptionTriggeredEventData; - "Microsoft.Communication.RouterJobQueued": AcsRouterJobQueuedEventData; - "Microsoft.Communication.RouterJobReceived": AcsRouterJobReceivedEventData; - "Microsoft.Communication.RouterJobSchedulingFailed": AcsRouterJobSchedulingFailedEventData; - "Microsoft.Communication.RouterJobUnassigned": AcsRouterJobUnassignedEventData; - "Microsoft.Communication.RouterJobWaitingForActivation": AcsRouterJobWaitingForActivationEventData; - "Microsoft.Communication.RouterJobWorkerSelectorsExpire": AcsRouterJobWorkerSelectorsExpiredEventData; - "Microsoft.Communication.RouterWorkerDeleted": AcsRouterWorkerDeletedEventData; - "Microsoft.Communication.RouterWorkerDeregistered": AcsRouterWorkerDeregisteredEventData; - "Microsoft.Communication.RouterWorkerOfferAccepted": AcsRouterWorkerOfferAcceptedEventData; - "Microsoft.Communication.RouterWorkerOfferDeclined": AcsRouterWorkerOfferDeclinedEventData; - "Microsoft.Communication.RouterWorkerOfferExpired": AcsRouterWorkerOfferExpiredEventData; - "Microsoft.Communication.RouterWorkerOfferIssued": AcsRouterWorkerOfferIssuedEventData; - "Microsoft.Communication.RouterWorkerOfferRevoked": AcsRouterWorkerOfferRevokedEventData; - "Microsoft.Communication.RouterWorkerRegistered": AcsRouterWorkerRegisteredEventData; - "Microsoft.Communication.RouterWorkerUpdated": AcsRouterWorkerUpdatedEventData; - "Microsoft.Communication.SMSDeliveryReportReceived": AcsSmsDeliveryReportReceivedEventData; - "Microsoft.Communication.SMSReceived": AcsSmsReceivedEventData; - "Microsoft.Communication.UserDisconnected": AcsUserDisconnectedEventData; - "Microsoft.ContainerRegistry.ChartDeleted": ContainerRegistryChartDeletedEventData; - "Microsoft.ContainerRegistry.ChartPushed": ContainerRegistryChartPushedEventData; - "Microsoft.ContainerRegistry.ImageDeleted": ContainerRegistryImageDeletedEventData; - "Microsoft.ContainerRegistry.ImagePushed": ContainerRegistryImagePushedEventData; - "Microsoft.ContainerService.ClusterSupportEnded": ContainerServiceClusterSupportEndedEventData; - "Microsoft.ContainerService.ClusterSupportEnding": ContainerServiceClusterSupportEndingEventData; - "Microsoft.ContainerService.NewKubernetesVersionAvailable": ContainerServiceNewKubernetesVersionAvailableEventData; - "Microsoft.ContainerService.NodePoolRollingFailed": ContainerServiceNodePoolRollingFailedEventData; - "Microsoft.ContainerService.NodePoolRollingStarted": ContainerServiceNodePoolRollingStartedEventData; - "Microsoft.ContainerService.NodePoolRollingSucceeded": ContainerServiceNodePoolRollingSucceededEventData; - "Microsoft.DataBox.CopyCompleted": DataBoxCopyCompletedEventData; - "Microsoft.DataBox.CopyStarted": DataBoxCopyStartedEventData; - "Microsoft.DataBox.OrderCompleted": DataBoxOrderCompletedEventData; - "Microsoft.Devices.DeviceConnected": IotHubDeviceConnectedEventData; - "Microsoft.Devices.DeviceCreated": IotHubDeviceCreatedEventData; - "Microsoft.Devices.DeviceDeleted": IotHubDeviceDeletedEventData; - "Microsoft.Devices.DeviceDisconnected": IotHubDeviceDisconnectedEventData; - "Microsoft.Devices.DeviceTelemetry": IotHubDeviceTelemetryEventData; - "Microsoft.EventGrid.MQTTClientCreatedOrUpdated": EventGridMqttClientCreatedOrUpdatedEventData; - "Microsoft.EventGrid.MQTTClientDeleted": EventGridMqttClientDeletedEventData; - "Microsoft.EventGrid.MQTTClientSessionConnected": EventGridMqttClientSessionConnectedEventData; - "Microsoft.EventGrid.MQTTClientSessionDisconnected": EventGridMqttClientSessionDisconnectedEventData; - "Microsoft.EventGrid.SubscriptionDeletedEvent": SubscriptionDeletedEventData; - "Microsoft.EventGrid.SubscriptionValidationEvent": SubscriptionValidationEventData; - "Microsoft.EventHub.CaptureFileCreated": EventHubCaptureFileCreatedEventData; - "Microsoft.HealthcareApis.DicomImageCreated": HealthcareDicomImageCreatedEventData; - "Microsoft.HealthcareApis.DicomImageDeleted": HealthcareDicomImageDeletedEventData; - "Microsoft.HealthcareApis.DicomImageUpdated": HealthcareDicomImageUpdatedEventData; - "Microsoft.HealthcareApis.FhirDeletedCreated": HealthcareFhirResourceDeletedEventData; - "Microsoft.HealthcareApis.FhirResourceCreated": HealthcareFhirResourceCreatedEventData; - "Microsoft.HealthcareApis.FhirUpdatedCreated": HealthcareFhirResourceUpdatedEventData; - "Microsoft.KeyVault.CertificateExpired": KeyVaultCertificateExpiredEventData; - "Microsoft.KeyVault.CertificateNearExpiry": KeyVaultCertificateNearExpiryEventData; - "Microsoft.KeyVault.CertificateNewVersionCreated": KeyVaultCertificateNewVersionCreatedEventData; - "Microsoft.KeyVault.KeyExpired": KeyVaultKeyExpiredEventData; - "Microsoft.KeyVault.KeyNearExpiry": KeyVaultKeyNearExpiryEventData; - "Microsoft.KeyVault.KeyNewVersionCreated": KeyVaultKeyNewVersionCreatedEventData; - "Microsoft.KeyVault.SecretExpired": KeyVaultSecretExpiredEventData; - "Microsoft.KeyVault.SecretNearExpiry": KeyVaultSecretNearExpiryEventData; - "Microsoft.KeyVault.SecretNewVersionCreated": KeyVaultSecretNewVersionCreatedEventData; - "Microsoft.KeyVault.VaultAccessPolicyChanged": KeyVaultAccessPolicyChangedEventData; - "Microsoft.MachineLearningServices.DatasetDriftDetected": MachineLearningServicesDatasetDriftDetectedEventData; - "Microsoft.MachineLearningServices.ModelDeployed": MachineLearningServicesModelDeployedEventData; - "Microsoft.MachineLearningServices.ModelRegistered": MachineLearningServicesModelRegisteredEventData; - "Microsoft.MachineLearningServices.RunCompleted": MachineLearningServicesRunCompletedEventData; - "Microsoft.MachineLearningServices.RunStatusChanged": MachineLearningServicesRunStatusChangedEventData; - "Microsoft.Maps.GeofenceEntered": MapsGeofenceEnteredEventData; - "Microsoft.Maps.GeofenceExited": MapsGeofenceExitedEventData; - "Microsoft.Maps.GeofenceResult": MapsGeofenceResultEventData; - "Microsoft.PolicyInsights.PolicyStateChanged ": PolicyInsightsPolicyStateChangedEventData; - "Microsoft.PolicyInsights.PolicyStateCreated": PolicyInsightsPolicyStateCreatedEventData; - "Microsoft.PolicyInsights.PolicyStateDeleted": PolicyInsightsPolicyStateDeletedEventData; - "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged": ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData; - "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated": ResourceNotificationsHealthResourcesAnnotatedEventData; - "Microsoft.ResourceNotifications.Resources.CreatedOrUpdated": ResourceNotificationsResourceManagementCreatedOrUpdatedEventData; - "Microsoft.ResourceNotifications.Resources.Deleted": ResourceNotificationsResourceManagementDeletedEventData; - "Microsoft.Resources.ResourceActionCancel": ResourceActionCancelEventData; - "Microsoft.Resources.ResourceActionFailure": ResourceActionFailureEventData; - "Microsoft.Resources.ResourceActionSuccess": ResourceActionSuccessEventData; - "Microsoft.Resources.ResourceDeleteCancel": ResourceDeleteCancelEventData; - "Microsoft.Resources.ResourceDeleteFailure": ResourceDeleteFailureEventData; - "Microsoft.Resources.ResourceDeleteSuccess": ResourceDeleteSuccessEventData; - "Microsoft.Resources.ResourceWriteCancel": ResourceWriteCancelEventData; - "Microsoft.Resources.ResourceWriteFailure": ResourceWriteFailureEventData; - "Microsoft.Resources.ResourceWriteSuccess": ResourceWriteSuccessEventData; - "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners": ServiceBusActiveMessagesAvailableWithNoListenersEventData; - "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners": ServiceBusDeadletterMessagesAvailableWithNoListenersEventData; - "Microsoft.Storage.AsyncOperationInitiated": StorageAsyncOperationInitiatedEventData; - "Microsoft.Storage.BlobCreated": StorageBlobCreatedEventData; - "Microsoft.Storage.BlobDeleted": StorageBlobDeletedEventData; - "Microsoft.Storage.BlobInventoryPolicyCompleted": StorageBlobInventoryPolicyCompletedEventData; - "Microsoft.Storage.BlobRenamed": StorageBlobRenamedEventData; - "Microsoft.Storage.BlobTierChanged": StorageBlobTierChangedEventData; - "Microsoft.Storage.DirectoryCreated": StorageDirectoryCreatedEventData; - "Microsoft.Storage.DirectoryDeleted": StorageDirectoryDeletedEventData; - "Microsoft.Storage.DirectoryRenamed": StorageDirectoryRenamedEventData; - "Microsoft.Storage.LifecyclePolicyCompleted": StorageLifecyclePolicyCompletedEventData; - "Microsoft.Storage.StorageTaskAssignmentCompleted": StorageTaskAssignmentCompletedEventData; - "Microsoft.Storage.StorageTaskAssignmentQueued": StorageTaskAssignmentQueuedEventData; - "Microsoft.Storage.StorageTaskCompleted": StorageTaskCompletedEventData; - "Microsoft.Storage.StorageTaskQueued": StorageTaskQueuedEventData; - "Microsoft.Web.AppServicePlanUpdated": WebAppServicePlanUpdatedEventData; - "Microsoft.Web.AppUpdated": WebAppUpdatedEventData; - "Microsoft.Web.BackupOperationCompleted": WebBackupOperationCompletedEventData; - "Microsoft.Web.BackupOperationFailed": WebBackupOperationFailedEventData; - "Microsoft.Web.BackupOperationStarted": WebBackupOperationStartedEventData; - "Microsoft.Web.RestoreOperationCompleted": WebRestoreOperationCompletedEventData; - "Microsoft.Web.RestoreOperationFailed": WebRestoreOperationFailedEventData; - "Microsoft.Web.RestoreOperationStarted": WebRestoreOperationStartedEventData; - "Microsoft.Web.SlotSwapCompleted": WebSlotSwapCompletedEventData; - "Microsoft.Web.SlotSwapFailed": WebSlotSwapFailedEventData; - "Microsoft.Web.SlotSwapStarted": WebSlotSwapStartedEventData; - "Microsoft.Web.SlotSwapWithPreviewCancelled": WebSlotSwapWithPreviewCancelledEventData; - "Microsoft.Web.SlotSwapWithPreviewStarted": WebSlotSwapWithPreviewStartedEventData; -} - -// @public -export interface WebAppServicePlanUpdatedEventData { - address?: string; - appServicePlanEventTypeDetail: AppServicePlanEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - sku: WebAppServicePlanUpdatedEventDataSku; - verb?: string; -} - -// @public -export interface WebAppServicePlanUpdatedEventDataSku { - capacity?: string; - family?: string; - name?: string; - size?: string; - tier?: string; -} - -// @public -export interface WebAppUpdatedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebBackupOperationCompletedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebBackupOperationFailedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebBackupOperationStartedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebRestoreOperationCompletedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebRestoreOperationFailedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebRestoreOperationStartedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebSlotSwapCompletedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebSlotSwapFailedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebSlotSwapStartedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebSlotSwapWithPreviewCancelledEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// @public -export interface WebSlotSwapWithPreviewStartedEventData { - address?: string; - appEventTypeDetail: AppEventTypeDetail; - clientRequestId?: string; - correlationRequestId?: string; - name?: string; - requestId?: string; - verb?: string; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/eventgrid/eventgrid-systemevents/sample.env b/sdk/eventgrid/eventgrid-systemevents/sample.env new file mode 100644 index 000000000000..508439fc7d62 --- /dev/null +++ b/sdk/eventgrid/eventgrid-systemevents/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/index.ts b/sdk/eventgrid/eventgrid-systemevents/src/api/index.ts similarity index 100% rename from sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/index.ts rename to sdk/eventgrid/eventgrid-systemevents/src/api/index.ts index 2eedcc56a4c4..22a0be5a477e 100644 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/index.ts +++ b/sdk/eventgrid/eventgrid-systemevents/src/api/index.ts @@ -3,6 +3,6 @@ export { createSystemEvents, - SystemEventsClientOptionalParams, SystemEventsContext, + SystemEventsClientOptionalParams, } from "./systemEventsContext.js"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/responses.ts b/sdk/eventgrid/eventgrid-systemevents/src/api/options.ts similarity index 55% rename from sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/responses.ts rename to sdk/eventgrid/eventgrid-systemevents/src/api/options.ts index 9bed5dcf4da7..fc36ab244fad 100644 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/responses.ts +++ b/sdk/eventgrid/eventgrid-systemevents/src/api/options.ts @@ -1,4 +1,2 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. - -// import { HttpResponse } from "@azure-rest/core-client"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/api/systemEventsContext.ts b/sdk/eventgrid/eventgrid-systemevents/src/api/systemEventsContext.ts new file mode 100644 index 000000000000..593d4cf08bee --- /dev/null +++ b/sdk/eventgrid/eventgrid-systemevents/src/api/systemEventsContext.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { logger } from "../logger.js"; +import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; + +/** Azure Messaging EventGrid SystemEvents */ +export interface SystemEventsContext extends Client {} + +/** Optional parameters for the client. */ +export interface SystemEventsClientOptionalParams extends ClientOptions {} + +/** Azure Messaging EventGrid SystemEvents */ +export function createSystemEvents( + endpointParam: string, + options: SystemEventsClientOptionalParams = {}, +): SystemEventsContext { + const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam); + const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; + const userAgentInfo = `azsdk-js-eventgrid-systemevents/1.0.0-beta.1`; + const userAgentPrefix = prefixFromOptions + ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` + : `azsdk-js-api ${userAgentInfo}`; + const { apiVersion: _, ...updatedOptions } = { + ...options, + userAgentOptions: { userAgentPrefix }, + loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info }, + }; + const clientContext = getClient(endpointUrl, undefined, updatedOptions); + clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); + if (options.apiVersion) { + logger.warning( + "This client does not support client api-version, please change it at the operation level", + ); + } + return clientContext; +} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/systemEventsContext.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/systemEventsContext.ts deleted file mode 100644 index 161c4393976f..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/api/systemEventsContext.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { ClientOptions } from "@azure-rest/core-client"; -import { SystemEventsContext } from "../rest/index.js"; -import getClient from "../rest/index.js"; - -/** Optional parameters for the client. */ -export interface SystemEventsClientOptionalParams extends ClientOptions {} - -export { SystemEventsContext } from "../rest/index.js"; - -/** Azure Messaging EventGrid SystemEvents */ -export function createSystemEvents( - endpoint: string, - options: SystemEventsClientOptionalParams = {}, -): SystemEventsContext { - const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; - const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api` : "azsdk-js-api"; - - const clientContext = getClient(endpoint, { - ...options, - userAgentOptions: { userAgentPrefix }, - }); - return clientContext; -} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/helpers/serializerHelpers.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/helpers/serializerHelpers.ts deleted file mode 100644 index 7518a16c2ee9..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/helpers/serializerHelpers.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export function serializeRecord( - item: Record, -): Record; -export function serializeRecord( - item: Record, - serializer: (item: T) => R, -): Record; -export function serializeRecord( - item: Record, - serializer?: (item: T) => R, -): Record { - return Object.keys(item).reduce( - (acc, key) => { - if (isSupportedRecordType(item[key])) { - acc[key] = item[key] as any; - } else if (serializer) { - const value = item[key]; - if (value !== undefined) { - acc[key] = serializer(value); - } - } else { - console.warn(`Don't know how to serialize ${item[key]}`); - acc[key] = item[key] as any; - } - return acc; - }, - {} as Record, - ); -} - -function isSupportedRecordType(t: any) { - return ["number", "string", "boolean", "null"].includes(typeof t) || t instanceof Date; -} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/index.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/index.ts deleted file mode 100644 index 0c0dc0081051..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/index.ts +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export { - ApiCenterApiDefinitionAddedEventData, - ApiCenterApiSpecification, - ApiCenterApiDefinitionUpdatedEventData, - ApiManagementUserCreatedEventData, - ApiManagementUserUpdatedEventData, - ApiManagementUserDeletedEventData, - ApiManagementSubscriptionCreatedEventData, - ApiManagementSubscriptionUpdatedEventData, - ApiManagementSubscriptionDeletedEventData, - ApiManagementProductCreatedEventData, - ApiManagementProductUpdatedEventData, - ApiManagementProductDeletedEventData, - ApiManagementApiCreatedEventData, - ApiManagementApiUpdatedEventData, - ApiManagementApiDeletedEventData, - ApiManagementApiReleaseCreatedEventData, - ApiManagementApiReleaseUpdatedEventData, - ApiManagementApiReleaseDeletedEventData, - ApiManagementGatewayCreatedEventData, - ApiManagementGatewayUpdatedEventData, - ApiManagementGatewayDeletedEventData, - ApiManagementGatewayHostnameConfigurationCreatedEventData, - ApiManagementGatewayHostnameConfigurationUpdatedEventData, - ApiManagementGatewayHostnameConfigurationDeletedEventData, - ApiManagementGatewayCertificateAuthorityCreatedEventData, - ApiManagementGatewayCertificateAuthorityUpdatedEventData, - ApiManagementGatewayCertificateAuthorityDeletedEventData, - ApiManagementGatewayApiAddedEventData, - ApiManagementGatewayApiRemovedEventData, - AppConfigurationKeyValueModifiedEventData, - AppConfigurationKeyValueDeletedEventData, - AppConfigurationSnapshotEventData, - AppConfigurationSnapshotCreatedEventData, - AppConfigurationSnapshotModifiedEventData, - AvsPrivateCloudEventData, - AvsPrivateCloudUpdatingEventData, - AvsPrivateCloudUpdatedEventData, - AvsPrivateCloudFailedEventData, - AvsClusterEventData, - AvsClusterCreatedEventData, - AvsClusterDeletedEventData, - AvsClusterUpdatingEventData, - AvsClusterUpdatedEventData, - AvsClusterFailedEventData, - AvsScriptExecutionEventData, - AvsScriptExecutionStartedEventData, - AvsScriptExecutionFinishedEventData, - AvsScriptExecutionCancelledEventData, - AvsScriptExecutionFailedEventData, - AcsIncomingCallEventData, - CommunicationIdentifierModel, - KnownCommunicationIdentifierModelKind, - CommunicationIdentifierModelKind, - CommunicationUserIdentifierModel, - PhoneNumberIdentifierModel, - MicrosoftTeamsUserIdentifierModel, - KnownCommunicationCloudEnvironmentModel, - CommunicationCloudEnvironmentModel, - MicrosoftTeamsAppIdentifierModel, - AcsIncomingCallCustomContext, - AcsUserDisconnectedEventData, - AcsChatEventBase, - AcsChatEventInThreadBase, - AcsChatMessageEventBase, - AcsChatMessageReceivedEventData, - AcsChatMessageEventInThreadBase, - AcsChatMessageReceivedInThreadEventData, - AcsChatMessageEditedEventData, - AcsChatMessageEditedInThreadEventData, - AcsChatMessageDeletedEventData, - AcsChatMessageDeletedInThreadEventData, - AcsChatThreadEventBase, - AcsChatThreadCreatedWithUserEventData, - AcsChatThreadParticipant, - AcsChatThreadEventInThreadBase, - AcsChatThreadCreatedEventData, - AcsChatThreadWithUserDeletedEventData, - AcsChatThreadDeletedEventData, - AcsChatThreadPropertiesUpdatedPerUserEventData, - AcsChatThreadPropertiesUpdatedEventData, - AcsChatParticipantAddedToThreadWithUserEventData, - AcsChatParticipantRemovedFromThreadWithUserEventData, - AcsChatParticipantAddedToThreadEventData, - AcsChatParticipantRemovedFromThreadEventData, - AcsSmsEventBase, - AcsSmsDeliveryReportReceivedEventData, - AcsSmsDeliveryAttempt, - AcsSmsReceivedEventData, - AcsRecordingFileStatusUpdatedEventData, - AcsRecordingStorageInfo, - AcsRecordingChunkInfo, - KnownRecordingContentType, - RecordingContentType, - KnownRecordingChannelType, - RecordingChannelType, - KnownRecordingFormatType, - RecordingFormatType, - AcsEmailDeliveryReportReceivedEventData, - KnownAcsEmailDeliveryReportStatus, - AcsEmailDeliveryReportStatus, - AcsEmailDeliveryReportStatusDetails, - AcsEmailEngagementTrackingReportReceivedEventData, - KnownAcsUserEngagement, - AcsUserEngagement, - AcsRouterEventData, - AcsRouterJobEventData, - AcsRouterJobCancelledEventData, - AcsRouterJobClassificationFailedEventData, - AcsRouterCommunicationError, - AcsRouterJobClassifiedEventData, - AcsRouterQueueDetails, - AcsRouterWorkerSelector, - KnownAcsRouterLabelOperator, - AcsRouterLabelOperator, - KnownAcsRouterWorkerSelectorState, - AcsRouterWorkerSelectorState, - AcsRouterJobClosedEventData, - AcsRouterJobCompletedEventData, - AcsRouterJobDeletedEventData, - AcsRouterJobExceptionTriggeredEventData, - AcsRouterJobQueuedEventData, - AcsRouterJobReceivedEventData, - KnownAcsRouterJobStatus, - AcsRouterJobStatus, - AcsRouterJobSchedulingFailedEventData, - AcsRouterJobUnassignedEventData, - AcsRouterJobWaitingForActivationEventData, - AcsRouterJobWorkerSelectorsExpiredEventData, - AcsRouterWorkerEventData, - AcsRouterWorkerDeletedEventData, - AcsRouterWorkerDeregisteredEventData, - AcsRouterWorkerOfferAcceptedEventData, - AcsRouterWorkerOfferDeclinedEventData, - AcsRouterWorkerOfferExpiredEventData, - AcsRouterWorkerOfferIssuedEventData, - AcsRouterWorkerOfferRevokedEventData, - AcsRouterWorkerRegisteredEventData, - AcsRouterChannelConfiguration, - AcsRouterWorkerUpdatedEventData, - KnownAcsRouterUpdatedWorkerProperty, - AcsRouterUpdatedWorkerProperty, - AcsMessageEventData, - AcsMessageChannelEventError, - AcsMessageDeliveryStatusUpdatedEventData, - KnownAcsMessageDeliveryStatus, - AcsMessageDeliveryStatus, - KnownAcsMessageChannelKind, - AcsMessageChannelKind, - AcsMessageReceivedEventData, - AcsMessageMediaContent, - AcsMessageContext, - AcsMessageButtonContent, - AcsMessageInteractiveContent, - KnownAcsInteractiveReplyKind, - AcsInteractiveReplyKind, - AcsMessageInteractiveButtonReplyContent, - AcsMessageInteractiveListReplyContent, - ContainerRegistryEventData, - ContainerRegistryEventTarget, - ContainerRegistryEventRequest, - ContainerRegistryEventActor, - ContainerRegistryEventSource, - ContainerRegistryEventConnectedRegistry, - ContainerRegistryImagePushedEventData, - ContainerRegistryImageDeletedEventData, - ContainerRegistryArtifactEventData, - ContainerRegistryArtifactEventTarget, - ContainerRegistryChartPushedEventData, - ContainerRegistryChartDeletedEventData, - ContainerServiceNewKubernetesVersionAvailableEventData, - ContainerServiceClusterSupportEventData, - ContainerServiceClusterSupportEndedEventData, - ContainerServiceClusterSupportEndingEventData, - ContainerServiceNodePoolRollingEventData, - ContainerServiceNodePoolRollingStartedEventData, - ContainerServiceNodePoolRollingSucceededEventData, - ContainerServiceNodePoolRollingFailedEventData, - DataBoxCopyStartedEventData, - KnownDataBoxStageName, - DataBoxStageName, - DataBoxCopyCompletedEventData, - DataBoxOrderCompletedEventData, - EventHubCaptureFileCreatedEventData, - MapsGeofenceEvent, - MapsGeofenceGeometry, - MapsGeofenceEnteredEventData, - MapsGeofenceExitedEventData, - MapsGeofenceResultEventData, - DeviceLifeCycleEvent, - DeviceTwinInfo, - DeviceTwinInfoProperties, - DeviceTwin, - DeviceTwinMetadata, - DeviceTwinInfoX509Thumbprint, - DeviceConnectionStateEvent, - DeviceConnectionStateEventInfo, - DeviceTelemetryEvent, - IotHubDeviceCreatedEventData, - IotHubDeviceDeletedEventData, - IotHubDeviceConnectedEventData, - IotHubDeviceDisconnectedEventData, - IotHubDeviceTelemetryEventData, - HealthcareFhirResourceCreatedEventData, - KnownHealthcareFhirResourceType, - HealthcareFhirResourceType, - HealthcareFhirResourceUpdatedEventData, - HealthcareFhirResourceDeletedEventData, - HealthcareDicomImageCreatedEventData, - HealthcareDicomImageDeletedEventData, - HealthcareDicomImageUpdatedEventData, - KeyVaultCertificateNewVersionCreatedEventData, - KeyVaultCertificateNearExpiryEventData, - KeyVaultCertificateExpiredEventData, - KeyVaultKeyNewVersionCreatedEventData, - KeyVaultKeyNearExpiryEventData, - KeyVaultKeyExpiredEventData, - KeyVaultSecretNewVersionCreatedEventData, - KeyVaultSecretNearExpiryEventData, - KeyVaultSecretExpiredEventData, - KeyVaultAccessPolicyChangedEventData, - MachineLearningServicesModelRegisteredEventData, - MachineLearningServicesModelDeployedEventData, - MachineLearningServicesRunCompletedEventData, - MachineLearningServicesDatasetDriftDetectedEventData, - MachineLearningServicesRunStatusChangedEventData, - PolicyInsightsPolicyStateCreatedEventData, - PolicyInsightsPolicyStateChangedEventData, - PolicyInsightsPolicyStateDeletedEventData, - RedisPatchingCompletedEventData, - RedisScalingCompletedEventData, - RedisExportRDBCompletedEventData, - RedisImportRDBCompletedEventData, - ResourceWriteSuccessEventData, - ResourceAuthorization, - ResourceHttpRequest, - ResourceWriteFailureEventData, - ResourceWriteCancelEventData, - ResourceDeleteSuccessEventData, - ResourceDeleteFailureEventData, - ResourceDeleteCancelEventData, - ResourceActionSuccessEventData, - ResourceActionFailureEventData, - ResourceActionCancelEventData, - ServiceBusActiveMessagesAvailableWithNoListenersEventData, - ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, - ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData, - ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData, - SignalRServiceClientConnectionConnectedEventData, - SignalRServiceClientConnectionDisconnectedEventData, - StorageBlobCreatedEventData, - KnownStorageBlobAccessTier, - StorageBlobAccessTier, - StorageBlobDeletedEventData, - StorageDirectoryCreatedEventData, - StorageDirectoryDeletedEventData, - StorageBlobRenamedEventData, - StorageDirectoryRenamedEventData, - StorageLifecyclePolicyCompletedEventData, - StorageLifecyclePolicyRunSummary, - KnownStorageLifecycleCompletionStatus, - StorageLifecycleCompletionStatus, - StorageLifecyclePolicyActionSummaryDetail, - StorageBlobTierChangedEventData, - StorageAsyncOperationInitiatedEventData, - StorageBlobInventoryPolicyCompletedEventData, - StorageTaskCompletedEventData, - KnownStorageTaskCompletedStatus, - StorageTaskCompletedStatus, - StorageTaskQueuedEventData, - StorageTaskAssignmentQueuedEventData, - StorageTaskAssignmentCompletedEventData, - KnownStorageTaskAssignmentCompletedStatus, - StorageTaskAssignmentCompletedStatus, - AppEventTypeDetail, - KnownAppAction, - AppAction, - WebAppUpdatedEventData, - WebBackupOperationStartedEventData, - WebBackupOperationCompletedEventData, - WebBackupOperationFailedEventData, - WebRestoreOperationStartedEventData, - WebRestoreOperationCompletedEventData, - WebRestoreOperationFailedEventData, - WebSlotSwapStartedEventData, - WebSlotSwapCompletedEventData, - WebSlotSwapFailedEventData, - WebSlotSwapWithPreviewStartedEventData, - WebSlotSwapWithPreviewCancelledEventData, - WebAppServicePlanUpdatedEventData, - AppServicePlanEventTypeDetail, - KnownStampKind, - StampKind, - KnownAppServicePlanAction, - AppServicePlanAction, - KnownAsyncStatus, - AsyncStatus, - WebAppServicePlanUpdatedEventDataSku, - SubscriptionValidationEventData, - SubscriptionValidationResponse, - SubscriptionDeletedEventData, - EventGridMqttClientEventData, - EventGridMqttClientCreatedOrUpdatedEventData, - KnownEventGridMqttClientState, - EventGridMqttClientState, - EventGridMqttClientDeletedEventData, - EventGridMqttClientSessionConnectedEventData, - EventGridMqttClientSessionDisconnectedEventData, - KnownEventGridMqttClientDisconnectionReason, - EventGridMqttClientDisconnectionReason, - ResourceNotificationsResourceUpdatedEventData, - ResourceNotificationsResourceUpdatedDetails, - ResourceNotificationsOperationalDetails, - ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData, - ResourceNotificationsHealthResourcesAnnotatedEventData, - ResourceNotificationsResourceDeletedDetails, - ResourceNotificationsResourceDeletedEventData, - ResourceNotificationsResourceManagementCreatedOrUpdatedEventData, - ResourceNotificationsResourceManagementDeletedEventData, - ResourceNotificationsContainerServiceEventResourcesScheduledEventData, - ServiceApiVersions, -} from "./models.js"; -// export * from "./options.js"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/options.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/options.ts deleted file mode 100644 index 7b9f1c3ce750..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/options.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// import { OperationOptions } from "@azure-rest/core-client"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/clientDefinitions.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/clientDefinitions.ts deleted file mode 100644 index 62945bba839e..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/clientDefinitions.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { Client } from "@azure-rest/core-client"; - -export interface Routes {} - -export type SystemEventsContext = Client & { - path: Routes; -}; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/index.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/index.ts deleted file mode 100644 index 6d5b703167b3..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import SystemEventsClient from "./systemEventsClient.js"; - -export * from "./systemEventsClient.js"; -// export * from "./parameters.js"; -// export * from "./responses.js"; -export * from "./clientDefinitions.js"; - -export default SystemEventsClient; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/parameters.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/parameters.ts deleted file mode 100644 index ab466bf33596..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/parameters.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// import { RequestParameters } from "@azure-rest/core-client"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/systemEventsClient.ts b/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/systemEventsClient.ts deleted file mode 100644 index 55e96d0eb5de..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/rest/systemEventsClient.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { getClient, ClientOptions } from "@azure-rest/core-client"; -import { logger } from "../logger.js"; -import { SystemEventsContext } from "./clientDefinitions.js"; - -/** The optional parameters for the client */ -export interface SystemEventsContextOptions extends ClientOptions {} - -/** - * Initialize a new instance of `SystemEventsContext` - * @param endpointParam - The parameter endpointParam - * @param options - the parameter for all optional parameters - */ -export default function createClient( - endpointParam: string, - options: SystemEventsContextOptions = {}, -): SystemEventsContext { - const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`; - const userAgentInfo = `azsdk-js-eventgrid-systemevents/1.0.0-beta.6`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` - : `${userAgentInfo}`; - options = { - ...options, - userAgentOptions: { - userAgentPrefix, - }, - loggingOptions: { - logger: options.loggingOptions?.logger ?? logger.info, - }, - }; - const client = getClient(endpointUrl, options) as SystemEventsContext; - - client.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - if (options.apiVersion) { - logger.warning( - "This client does not support client api-version, please change it at the operation level", - ); - } - - return client; -} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/index.ts b/sdk/eventgrid/eventgrid-systemevents/src/index.ts index 9a9af4b219c8..cb4d9a05897c 100644 --- a/sdk/eventgrid/eventgrid-systemevents/src/index.ts +++ b/sdk/eventgrid/eventgrid-systemevents/src/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +export { SystemEventsClient } from "./systemEventsClient.js"; export { ApiCenterApiDefinitionAddedEventData, ApiCenterApiSpecification, @@ -212,6 +213,16 @@ export { HealthcareDicomImageCreatedEventData, HealthcareDicomImageDeletedEventData, HealthcareDicomImageUpdatedEventData, + KeyVaultCertificateNewVersionCreatedEventData, + KeyVaultCertificateNearExpiryEventData, + KeyVaultCertificateExpiredEventData, + KeyVaultKeyNewVersionCreatedEventData, + KeyVaultKeyNearExpiryEventData, + KeyVaultKeyExpiredEventData, + KeyVaultSecretNewVersionCreatedEventData, + KeyVaultSecretNearExpiryEventData, + KeyVaultSecretExpiredEventData, + KeyVaultAccessPolicyChangedEventData, MachineLearningServicesModelRegisteredEventData, MachineLearningServicesModelDeployedEventData, MachineLearningServicesRunCompletedEventData, @@ -250,6 +261,9 @@ export { StorageBlobRenamedEventData, StorageDirectoryRenamedEventData, StorageLifecyclePolicyCompletedEventData, + StorageLifecyclePolicyRunSummary, + KnownStorageLifecycleCompletionStatus, + StorageLifecycleCompletionStatus, StorageLifecyclePolicyActionSummaryDetail, StorageBlobTierChangedEventData, StorageAsyncOperationInitiatedEventData, @@ -303,26 +317,11 @@ export { ResourceNotificationsOperationalDetails, ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData, ResourceNotificationsHealthResourcesAnnotatedEventData, - ResourceNotificationsResourceManagementCreatedOrUpdatedEventData, - ResourceNotificationsResourceDeletedEventData, ResourceNotificationsResourceDeletedDetails, + ResourceNotificationsResourceDeletedEventData, + ResourceNotificationsResourceManagementCreatedOrUpdatedEventData, ResourceNotificationsResourceManagementDeletedEventData, - ServiceApiVersions, -} from "./cadl-generated/index.js"; - -export { - CloudEvent, - EventGridEvent, - KeyVaultCertificateNewVersionCreatedEventData, - KeyVaultCertificateNearExpiryEventData, - KeyVaultCertificateExpiredEventData, - KeyVaultKeyNewVersionCreatedEventData, - KeyVaultKeyNearExpiryEventData, - KeyVaultKeyExpiredEventData, - KeyVaultSecretNewVersionCreatedEventData, - KeyVaultSecretNearExpiryEventData, - KeyVaultAccessPolicyChangedEventData, - KeyVaultSecretExpiredEventData, -} from "./models.js"; - -export { isSystemEvent, KnownSystemEventTypes, SystemEventNameToEventData } from "./predicates.js"; + ResourceNotificationsContainerServiceEventResourcesScheduledEventData, + KnownServiceApiVersions, +} from "./models/index.js"; +export { SystemEventsClientOptionalParams } from "./api/index.js"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/logger.ts b/sdk/eventgrid/eventgrid-systemevents/src/logger.ts similarity index 100% rename from sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/logger.ts rename to sdk/eventgrid/eventgrid-systemevents/src/logger.ts diff --git a/sdk/eventgrid/eventgrid-systemevents/src/models.ts b/sdk/eventgrid/eventgrid-systemevents/src/models.ts deleted file mode 100644 index eb34859d737f..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/models.ts +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * Cloud Event Schema. - */ -export interface CloudEvent { - /** - * Type of event related to the originating occurrence. - */ - type: string; - /** - * Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. - */ - source: string; - /** - * An identifier for the event. The combination of id and source must be unique for each distinct event. - */ - id: string; - /** - * The time the event was generated. - */ - time?: Date; - /** - * Identifies the schema that data adheres to. - */ - dataSchema?: string; - /** - * Content type of data value. - */ - dataContentType?: string; - /** - * Event data specific to the event type. - */ - data?: T; - /** - * This describes the subject of the event in the context of the event producer (identified by source). - */ - subject?: string; - /** - * Additional context attributes for the event. The Cloud Event specification refers to these as "extension attributes". - */ - extensionAttributes?: Record; - /** - * The version of the CloudEvents specification which the event uses. - */ - specVersion?: string | "1.0"; -} - -/** - * An event in the in the Event Grid Schema. - */ -export interface EventGridEvent { - /** - * The type of the event. - */ - eventType: string; - /** - * The time the event was generated. - */ - eventTime: Date; - /** - * An unique identifier for the event. - */ - id: string; - /** - * The resource path of the event source. - */ - topic?: string; - /** - * A resource path relative to the topic path. - */ - subject: string; - /** - * The schema version of the data object. - */ - dataVersion: string; - /** - * Event data specific to the event type. - */ - data: T; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateNewVersionCreated event. */ -export interface KeyVaultCertificateNewVersionCreatedEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateNearExpiry event. */ -export interface KeyVaultCertificateNearExpiryEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateExpired event. */ -export interface KeyVaultCertificateExpiredEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyNewVersionCreated event. */ -export interface KeyVaultKeyNewVersionCreatedEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyNearExpiry event. */ -export interface KeyVaultKeyNearExpiryEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyExpired event. */ -export interface KeyVaultKeyExpiredEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretNewVersionCreated event. */ -export interface KeyVaultSecretNewVersionCreatedEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretNearExpiry event. */ -export interface KeyVaultSecretNearExpiryEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.VaultAccessPolicyChanged event. */ -export interface KeyVaultAccessPolicyChangedEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} - -/** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretExpired event. */ -export interface KeyVaultSecretExpiredEventData { - /** The id of the object that triggered this event. */ - id?: string; - /** Key vault name of the object that triggered this event. */ - vaultName?: string; - /** The type of the object that triggered this event */ - objectType?: string; - /** The name of the object that triggered this event */ - objectName?: string; - /** The version of the object that triggered this event */ - version?: string; - /** Not before date of the object that triggered this event */ - nbf?: number; - /** The expiration date of the object that triggered this event */ - exp?: number; -} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/index.ts b/sdk/eventgrid/eventgrid-systemevents/src/models/index.ts similarity index 99% rename from sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/index.ts rename to sdk/eventgrid/eventgrid-systemevents/src/models/index.ts index 7334440fb390..554283e891a9 100644 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/index.ts +++ b/sdk/eventgrid/eventgrid-systemevents/src/models/index.ts @@ -321,5 +321,5 @@ export { ResourceNotificationsResourceManagementCreatedOrUpdatedEventData, ResourceNotificationsResourceManagementDeletedEventData, ResourceNotificationsContainerServiceEventResourcesScheduledEventData, - ServiceApiVersions, -} from "./models/index.js"; + KnownServiceApiVersions, +} from "./models.js"; diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/models.ts b/sdk/eventgrid/eventgrid-systemevents/src/models/models.ts similarity index 54% rename from sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/models.ts rename to sdk/eventgrid/eventgrid-systemevents/src/models/models.ts index e6c0a3a5342f..79b747617af2 100644 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/models/models.ts +++ b/sdk/eventgrid/eventgrid-systemevents/src/models/models.ts @@ -11,6 +11,18 @@ export interface ApiCenterApiDefinitionAddedEventData { specification?: ApiCenterApiSpecification; } +export function apiCenterApiDefinitionAddedEventDataDeserializer( + item: any, +): ApiCenterApiDefinitionAddedEventData { + return { + title: item["title"], + description: item["description"], + specification: !item["specification"] + ? item["specification"] + : apiCenterApiSpecificationDeserializer(item["specification"]), + }; +} + /** API specification details. */ export interface ApiCenterApiSpecification { /** Specification name. */ @@ -19,6 +31,13 @@ export interface ApiCenterApiSpecification { version?: string; } +export function apiCenterApiSpecificationDeserializer(item: any): ApiCenterApiSpecification { + return { + name: item["name"], + version: item["version"], + }; +} + /** Schema of the data property of an EventGridEvent for a Microsoft.ApiCenter.ApiDefinitionUpdated event. */ export interface ApiCenterApiDefinitionUpdatedEventData { /** API definition title. */ @@ -29,162 +48,382 @@ export interface ApiCenterApiDefinitionUpdatedEventData { specification?: ApiCenterApiSpecification; } +export function apiCenterApiDefinitionUpdatedEventDataDeserializer( + item: any, +): ApiCenterApiDefinitionUpdatedEventData { + return { + title: item["title"], + description: item["description"], + specification: !item["specification"] + ? item["specification"] + : apiCenterApiSpecificationDeserializer(item["specification"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserCreated event. */ export interface ApiManagementUserCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementUserCreatedEventDataDeserializer( + item: any, +): ApiManagementUserCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserUpdated event. */ export interface ApiManagementUserUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementUserUpdatedEventDataDeserializer( + item: any, +): ApiManagementUserUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserDeleted event. */ export interface ApiManagementUserDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementUserDeletedEventDataDeserializer( + item: any, +): ApiManagementUserDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionCreated event. */ export interface ApiManagementSubscriptionCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementSubscriptionCreatedEventDataDeserializer( + item: any, +): ApiManagementSubscriptionCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionUpdated event. */ export interface ApiManagementSubscriptionUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementSubscriptionUpdatedEventDataDeserializer( + item: any, +): ApiManagementSubscriptionUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionDeleted event. */ export interface ApiManagementSubscriptionDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementSubscriptionDeletedEventDataDeserializer( + item: any, +): ApiManagementSubscriptionDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductCreated event. */ export interface ApiManagementProductCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementProductCreatedEventDataDeserializer( + item: any, +): ApiManagementProductCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductUpdated event. */ export interface ApiManagementProductUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementProductUpdatedEventDataDeserializer( + item: any, +): ApiManagementProductUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductDeleted event. */ export interface ApiManagementProductDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementProductDeletedEventDataDeserializer( + item: any, +): ApiManagementProductDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APICreated event. */ export interface ApiManagementApiCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementApiCreatedEventDataDeserializer( + item: any, +): ApiManagementApiCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIUpdated event. */ export interface ApiManagementApiUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementApiUpdatedEventDataDeserializer( + item: any, +): ApiManagementApiUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIDeleted event. */ export interface ApiManagementApiDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementApiDeletedEventDataDeserializer( + item: any, +): ApiManagementApiDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIReleaseCreated event. */ export interface ApiManagementApiReleaseCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementApiReleaseCreatedEventDataDeserializer( + item: any, +): ApiManagementApiReleaseCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIReleaseUpdated event. */ export interface ApiManagementApiReleaseUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementApiReleaseUpdatedEventDataDeserializer( + item: any, +): ApiManagementApiReleaseUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.APIReleaseDeleted event. */ export interface ApiManagementApiReleaseDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///` */ resourceUri?: string; } +export function apiManagementApiReleaseDeletedEventDataDeserializer( + item: any, +): ApiManagementApiReleaseDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayCreated event. */ export interface ApiManagementGatewayCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways/` */ resourceUri?: string; } +export function apiManagementGatewayCreatedEventDataDeserializer( + item: any, +): ApiManagementGatewayCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayUpdated event. */ export interface ApiManagementGatewayUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways/` */ resourceUri?: string; } +export function apiManagementGatewayUpdatedEventDataDeserializer( + item: any, +): ApiManagementGatewayUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayDeleted event. */ export interface ApiManagementGatewayDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways/` */ resourceUri?: string; } +export function apiManagementGatewayDeletedEventDataDeserializer( + item: any, +): ApiManagementGatewayDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayHostnameConfigurationCreated event. */ export interface ApiManagementGatewayHostnameConfigurationCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//hostnameConfigurations/` */ resourceUri?: string; } +export function apiManagementGatewayHostnameConfigurationCreatedEventDataDeserializer( + item: any, +): ApiManagementGatewayHostnameConfigurationCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated event. */ export interface ApiManagementGatewayHostnameConfigurationUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//hostnameConfigurations/` */ resourceUri?: string; } +export function apiManagementGatewayHostnameConfigurationUpdatedEventDataDeserializer( + item: any, +): ApiManagementGatewayHostnameConfigurationUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted event. */ export interface ApiManagementGatewayHostnameConfigurationDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//hostnameConfigurations/` */ resourceUri?: string; } +export function apiManagementGatewayHostnameConfigurationDeletedEventDataDeserializer( + item: any, +): ApiManagementGatewayHostnameConfigurationDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayCertificateAuthorityCreated event. */ export interface ApiManagementGatewayCertificateAuthorityCreatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//certificateAuthorities/` */ resourceUri?: string; } +export function apiManagementGatewayCertificateAuthorityCreatedEventDataDeserializer( + item: any, +): ApiManagementGatewayCertificateAuthorityCreatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated event. */ export interface ApiManagementGatewayCertificateAuthorityUpdatedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//certificateAuthorities/` */ resourceUri?: string; } +export function apiManagementGatewayCertificateAuthorityUpdatedEventDataDeserializer( + item: any, +): ApiManagementGatewayCertificateAuthorityUpdatedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted event. */ export interface ApiManagementGatewayCertificateAuthorityDeletedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//certificateAuthorities/` */ resourceUri?: string; } +export function apiManagementGatewayCertificateAuthorityDeletedEventDataDeserializer( + item: any, +): ApiManagementGatewayCertificateAuthorityDeletedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayAPIAdded event. */ export interface ApiManagementGatewayApiAddedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//apis/` */ resourceUri?: string; } +export function apiManagementGatewayApiAddedEventDataDeserializer( + item: any, +): ApiManagementGatewayApiAddedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayAPIRemoved event. */ export interface ApiManagementGatewayApiRemovedEventData { /** The fully qualified ID of the resource that the compliance state change is for, including the resource name and resource type. Uses the format, `/subscriptions//resourceGroups//Microsoft.ApiManagement/service//gateways//apis/` */ resourceUri?: string; } +export function apiManagementGatewayApiRemovedEventDataDeserializer( + item: any, +): ApiManagementGatewayApiRemovedEventData { + return { + resourceUri: item["resourceUri"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueModified event. */ export interface AppConfigurationKeyValueModifiedEventData { /** The key used to identify the key-value that was modified. */ @@ -197,6 +436,17 @@ export interface AppConfigurationKeyValueModifiedEventData { syncToken?: string; } +export function appConfigurationKeyValueModifiedEventDataDeserializer( + item: any, +): AppConfigurationKeyValueModifiedEventData { + return { + key: item["key"], + label: item["label"], + etag: item["etag"], + syncToken: item["syncToken"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueDeleted event. */ export interface AppConfigurationKeyValueDeletedEventData { /** The key used to identify the key-value that was deleted. */ @@ -209,6 +459,17 @@ export interface AppConfigurationKeyValueDeletedEventData { syncToken?: string; } +export function appConfigurationKeyValueDeletedEventDataDeserializer( + item: any, +): AppConfigurationKeyValueDeletedEventData { + return { + key: item["key"], + label: item["label"], + etag: item["etag"], + syncToken: item["syncToken"], + }; +} + /** Schema of common properties of snapshot events */ export interface AppConfigurationSnapshotEventData { /** The name of the snapshot. */ @@ -219,32 +480,93 @@ export interface AppConfigurationSnapshotEventData { syncToken?: string; } +export function appConfigurationSnapshotEventDataDeserializer( + item: any, +): AppConfigurationSnapshotEventData { + return { + name: item["name"], + etag: item["etag"], + syncToken: item["syncToken"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.SnapshotCreated event. */ export interface AppConfigurationSnapshotCreatedEventData extends AppConfigurationSnapshotEventData {} +export function appConfigurationSnapshotCreatedEventDataDeserializer( + item: any, +): AppConfigurationSnapshotCreatedEventData { + return { + name: item["name"], + etag: item["etag"], + syncToken: item["syncToken"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.SnapshotModified event. */ export interface AppConfigurationSnapshotModifiedEventData extends AppConfigurationSnapshotEventData {} +export function appConfigurationSnapshotModifiedEventDataDeserializer( + item: any, +): AppConfigurationSnapshotModifiedEventData { + return { + name: item["name"], + etag: item["etag"], + syncToken: item["syncToken"], + }; +} + /** Schema of the Data property of an EventGridEvent for Microsoft.AVS/privateClouds events. */ export interface AvsPrivateCloudEventData { /** Id of the operation that caused this event. */ operationId: string; } +export function avsPrivateCloudEventDataDeserializer(item: any): AvsPrivateCloudEventData { + return { + operationId: item["operationId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudUpdating event. */ export interface AvsPrivateCloudUpdatingEventData extends AvsPrivateCloudEventData {} +export function avsPrivateCloudUpdatingEventDataDeserializer( + item: any, +): AvsPrivateCloudUpdatingEventData { + return { + operationId: item["operationId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudUpdated event. */ export interface AvsPrivateCloudUpdatedEventData extends AvsPrivateCloudEventData {} +export function avsPrivateCloudUpdatedEventDataDeserializer( + item: any, +): AvsPrivateCloudUpdatedEventData { + return { + operationId: item["operationId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.PrivateCloudFailed event. */ export interface AvsPrivateCloudFailedEventData extends AvsPrivateCloudEventData { /** Failure reason of an event. */ failureMessage?: string; } +export function avsPrivateCloudFailedEventDataDeserializer( + item: any, +): AvsPrivateCloudFailedEventData { + return { + operationId: item["operationId"], + failureMessage: item["failureMessage"], + }; +} + /** Schema of the Data property of an EventGridEvent for Microsoft.AVS/clusters events. */ export interface AvsClusterEventData { /** Id of the operation that caused this event. */ @@ -257,24 +579,151 @@ export interface AvsClusterEventData { inMaintenanceHostNames?: string[]; } +export function avsClusterEventDataDeserializer(item: any): AvsClusterEventData { + return { + operationId: item["operationId"], + addedHostNames: !item["addedHostNames"] + ? item["addedHostNames"] + : item["addedHostNames"].map((p: any) => { + return p; + }), + removedHostNames: !item["removedHostNames"] + ? item["removedHostNames"] + : item["removedHostNames"].map((p: any) => { + return p; + }), + inMaintenanceHostNames: !item["inMaintenanceHostNames"] + ? item["inMaintenanceHostNames"] + : item["inMaintenanceHostNames"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterCreated event. */ export interface AvsClusterCreatedEventData extends AvsClusterEventData {} +export function avsClusterCreatedEventDataDeserializer(item: any): AvsClusterCreatedEventData { + return { + operationId: item["operationId"], + addedHostNames: !item["addedHostNames"] + ? item["addedHostNames"] + : item["addedHostNames"].map((p: any) => { + return p; + }), + removedHostNames: !item["removedHostNames"] + ? item["removedHostNames"] + : item["removedHostNames"].map((p: any) => { + return p; + }), + inMaintenanceHostNames: !item["inMaintenanceHostNames"] + ? item["inMaintenanceHostNames"] + : item["inMaintenanceHostNames"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterDeleted event. */ export interface AvsClusterDeletedEventData extends AvsClusterEventData {} +export function avsClusterDeletedEventDataDeserializer(item: any): AvsClusterDeletedEventData { + return { + operationId: item["operationId"], + addedHostNames: !item["addedHostNames"] + ? item["addedHostNames"] + : item["addedHostNames"].map((p: any) => { + return p; + }), + removedHostNames: !item["removedHostNames"] + ? item["removedHostNames"] + : item["removedHostNames"].map((p: any) => { + return p; + }), + inMaintenanceHostNames: !item["inMaintenanceHostNames"] + ? item["inMaintenanceHostNames"] + : item["inMaintenanceHostNames"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterUpdating event. */ export interface AvsClusterUpdatingEventData extends AvsClusterEventData {} +export function avsClusterUpdatingEventDataDeserializer(item: any): AvsClusterUpdatingEventData { + return { + operationId: item["operationId"], + addedHostNames: !item["addedHostNames"] + ? item["addedHostNames"] + : item["addedHostNames"].map((p: any) => { + return p; + }), + removedHostNames: !item["removedHostNames"] + ? item["removedHostNames"] + : item["removedHostNames"].map((p: any) => { + return p; + }), + inMaintenanceHostNames: !item["inMaintenanceHostNames"] + ? item["inMaintenanceHostNames"] + : item["inMaintenanceHostNames"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterUpdated event. */ export interface AvsClusterUpdatedEventData extends AvsClusterEventData {} +export function avsClusterUpdatedEventDataDeserializer(item: any): AvsClusterUpdatedEventData { + return { + operationId: item["operationId"], + addedHostNames: !item["addedHostNames"] + ? item["addedHostNames"] + : item["addedHostNames"].map((p: any) => { + return p; + }), + removedHostNames: !item["removedHostNames"] + ? item["removedHostNames"] + : item["removedHostNames"].map((p: any) => { + return p; + }), + inMaintenanceHostNames: !item["inMaintenanceHostNames"] + ? item["inMaintenanceHostNames"] + : item["inMaintenanceHostNames"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ClusterFailed event. */ export interface AvsClusterFailedEventData extends AvsClusterEventData { /** Failure reason of an event. */ failureMessage?: string; } +export function avsClusterFailedEventDataDeserializer(item: any): AvsClusterFailedEventData { + return { + operationId: item["operationId"], + addedHostNames: !item["addedHostNames"] + ? item["addedHostNames"] + : item["addedHostNames"].map((p: any) => { + return p; + }), + removedHostNames: !item["removedHostNames"] + ? item["removedHostNames"] + : item["removedHostNames"].map((p: any) => { + return p; + }), + inMaintenanceHostNames: !item["inMaintenanceHostNames"] + ? item["inMaintenanceHostNames"] + : item["inMaintenanceHostNames"].map((p: any) => { + return p; + }), + failureMessage: item["failureMessage"], + }; +} + /** Schema of the Data property of an EventGridEvent for Microsoft.AVS/scriptExecutions events. */ export interface AvsScriptExecutionEventData { /** Id of the operation that caused this event. */ @@ -285,24 +734,94 @@ export interface AvsScriptExecutionEventData { output?: string[]; } +export function avsScriptExecutionEventDataDeserializer(item: any): AvsScriptExecutionEventData { + return { + operationId: item["operationId"], + cmdletId: item["cmdletId"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionStarted event. */ export interface AvsScriptExecutionStartedEventData extends AvsScriptExecutionEventData {} +export function avsScriptExecutionStartedEventDataDeserializer( + item: any, +): AvsScriptExecutionStartedEventData { + return { + operationId: item["operationId"], + cmdletId: item["cmdletId"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionFinished event. */ export interface AvsScriptExecutionFinishedEventData extends AvsScriptExecutionEventData { /** Named outputs of completed execution, if any. */ namedOutputs: Record; } +export function avsScriptExecutionFinishedEventDataDeserializer( + item: any, +): AvsScriptExecutionFinishedEventData { + return { + operationId: item["operationId"], + cmdletId: item["cmdletId"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + namedOutputs: item["namedOutputs"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionCancelled event. */ export interface AvsScriptExecutionCancelledEventData extends AvsScriptExecutionEventData {} +export function avsScriptExecutionCancelledEventDataDeserializer( + item: any, +): AvsScriptExecutionCancelledEventData { + return { + operationId: item["operationId"], + cmdletId: item["cmdletId"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.AVS.ScriptExecutionFailed event. */ export interface AvsScriptExecutionFailedEventData extends AvsScriptExecutionEventData { /** Failure reason of an event. */ failureMessage?: string; } +export function avsScriptExecutionFailedEventDataDeserializer( + item: any, +): AvsScriptExecutionFailedEventData { + return { + operationId: item["operationId"], + cmdletId: item["cmdletId"], + output: !item["output"] + ? item["output"] + : item["output"].map((p: any) => { + return p; + }), + failureMessage: item["failureMessage"], + }; +} + /** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.IncomingCall event */ export interface AcsIncomingCallEventData { /** The communication identifier of the target user. */ @@ -323,6 +842,21 @@ export interface AcsIncomingCallEventData { correlationId?: string; } +export function acsIncomingCallEventDataDeserializer(item: any): AcsIncomingCallEventData { + return { + toCommunicationIdentifier: communicationIdentifierModelDeserializer(item["to"]), + fromCommunicationIdentifier: communicationIdentifierModelDeserializer(item["from"]), + serverCallId: item["serverCallId"], + callerDisplayName: item["callerDisplayName"], + customContext: acsIncomingCallCustomContextDeserializer(item["customContext"]), + incomingCallContext: item["incomingCallContext"], + onBehalfOfCallee: !item["onBehalfOfCallee"] + ? item["onBehalfOfCallee"] + : communicationIdentifierModelDeserializer(item["onBehalfOfCallee"]), + correlationId: item["correlationId"], + }; +} + /** Identifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model must be interpreted as a union: Apart from rawId, at most one further property may be set. */ export interface CommunicationIdentifierModel { /** The identifier kind. Only required in responses. */ @@ -339,27 +873,38 @@ export interface CommunicationIdentifierModel { microsoftTeamsApp: MicrosoftTeamsAppIdentifierModel; } -/** Known values of {@link CommunicationIdentifierModelKind} that the service accepts. */ +export function communicationIdentifierModelDeserializer(item: any): CommunicationIdentifierModel { + return { + kind: item["kind"], + rawId: item["rawId"], + communicationUser: communicationUserIdentifierModelDeserializer(item["communicationUser"]), + phoneNumber: phoneNumberIdentifierModelDeserializer(item["phoneNumber"]), + microsoftTeamsUser: microsoftTeamsUserIdentifierModelDeserializer(item["microsoftTeamsUser"]), + microsoftTeamsApp: microsoftTeamsAppIdentifierModelDeserializer(item["microsoftTeamsApp"]), + }; +} + +/** Communication model identifier kind */ export enum KnownCommunicationIdentifierModelKind { - /** unknown */ + /** Unknown */ unknown = "unknown", - /** communicationUser */ + /** Communication User */ communicationUser = "communicationUser", - /** phoneNumber */ + /** Phone Number */ phoneNumber = "phoneNumber", - /** microsoftTeamsUser */ + /** Microsoft Teams User */ microsoftTeamsUser = "microsoftTeamsUser", } /** - * Communication model identifier kind + * Communication model identifier kind \ * {@link KnownCommunicationIdentifierModelKind} can be used interchangeably with CommunicationIdentifierModelKind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **unknown** - * **communicationUser** - * **phoneNumber** - * **microsoftTeamsUser** + * **unknown**: Unknown \ + * **communicationUser**: Communication User \ + * **phoneNumber**: Phone Number \ + * **microsoftTeamsUser**: Microsoft Teams User */ export type CommunicationIdentifierModelKind = string; @@ -369,12 +914,26 @@ export interface CommunicationUserIdentifierModel { id: string; } +export function communicationUserIdentifierModelDeserializer( + item: any, +): CommunicationUserIdentifierModel { + return { + id: item["id"], + }; +} + /** A phone number. */ export interface PhoneNumberIdentifierModel { /** The phone number in E.164 format. */ value: string; } +export function phoneNumberIdentifierModelDeserializer(item: any): PhoneNumberIdentifierModel { + return { + value: item["value"], + }; +} + /** A Microsoft Teams user. */ export interface MicrosoftTeamsUserIdentifierModel { /** The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the user. */ @@ -385,24 +944,34 @@ export interface MicrosoftTeamsUserIdentifierModel { cloud: CommunicationCloudEnvironmentModel; } -/** Known values of {@link CommunicationCloudEnvironmentModel} that the service accepts. */ +export function microsoftTeamsUserIdentifierModelDeserializer( + item: any, +): MicrosoftTeamsUserIdentifierModel { + return { + userId: item["userId"], + isAnonymous: item["isAnonymous"], + cloud: item["cloud"], + }; +} + +/** Communication cloud environment model. */ export enum KnownCommunicationCloudEnvironmentModel { - /** public */ + /** Public */ "public" = "public", - /** dod */ + /** Dod */ dod = "dod", - /** gcch */ + /** Gcch */ gcch = "gcch", } /** - * Communication cloud environment model. + * Communication cloud environment model. \ * {@link KnownCommunicationCloudEnvironmentModel} can be used interchangeably with CommunicationCloudEnvironmentModel, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **public** - * **dod** - * **gcch** + * **public**: Public \ + * **dod**: Dod \ + * **gcch**: Gcch */ export type CommunicationCloudEnvironmentModel = string; @@ -414,6 +983,15 @@ export interface MicrosoftTeamsAppIdentifierModel { cloud: CommunicationCloudEnvironmentModel; } +export function microsoftTeamsAppIdentifierModelDeserializer( + item: any, +): MicrosoftTeamsAppIdentifierModel { + return { + appId: item["appId"], + cloud: item["cloud"], + }; +} + /** Custom Context of Incoming Call */ export interface AcsIncomingCallCustomContext { /** Sip Headers for incoming call */ @@ -422,12 +1000,27 @@ export interface AcsIncomingCallCustomContext { voipHeaders: Record; } +export function acsIncomingCallCustomContextDeserializer(item: any): AcsIncomingCallCustomContext { + return { + sipHeaders: item["sipHeaders"], + voipHeaders: item["voipHeaders"], + }; +} + /** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.UserDisconnected event. */ export interface AcsUserDisconnectedEventData { /** The communication identifier of the user who was disconnected */ userCommunicationIdentifier: CommunicationIdentifierModel; } +export function acsUserDisconnectedEventDataDeserializer(item: any): AcsUserDisconnectedEventData { + return { + userCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["userCommunicationIdentifier"], + ), + }; +} + /** Schema of common properties of all chat events */ export interface AcsChatEventBase { /** The communication identifier of the target user */ @@ -438,6 +1031,16 @@ export interface AcsChatEventBase { threadId?: string; } +export function acsChatEventBaseDeserializer(item: any): AcsChatEventBase { + return { + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + }; +} + /** Schema of common properties of all thread-level chat events */ export interface AcsChatEventInThreadBase { /** The transaction id will be used as co-relation vector */ @@ -446,6 +1049,13 @@ export interface AcsChatEventInThreadBase { threadId?: string; } +export function acsChatEventInThreadBaseDeserializer(item: any): AcsChatEventInThreadBase { + return { + transactionId: item["transactionId"], + threadId: item["threadId"], + }; +} + /** Schema of common properties of all chat message events */ export interface AcsChatMessageEventBase extends AcsChatEventBase { /** The chat message id */ @@ -462,6 +1072,24 @@ export interface AcsChatMessageEventBase extends AcsChatEventBase { version?: number; } +export function acsChatMessageEventBaseDeserializer(item: any): AcsChatMessageEventBase { + return { + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceived event. */ export interface AcsChatMessageReceivedEventData extends AcsChatMessageEventBase { /** The body of the chat message */ @@ -470,6 +1098,28 @@ export interface AcsChatMessageReceivedEventData extends AcsChatMessageEventBase metadata: Record; } +export function acsChatMessageReceivedEventDataDeserializer( + item: any, +): AcsChatMessageReceivedEventData { + return { + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + messageBody: item["messageBody"], + metadata: item["metadata"], + }; +} + /** Schema of common properties of all thread-level chat message events */ export interface AcsChatMessageEventInThreadBase extends AcsChatEventInThreadBase { /** The chat message id */ @@ -486,6 +1136,23 @@ export interface AcsChatMessageEventInThreadBase extends AcsChatEventInThreadBas version?: number; } +export function acsChatMessageEventInThreadBaseDeserializer( + item: any, +): AcsChatMessageEventInThreadBase { + return { + transactionId: item["transactionId"], + threadId: item["threadId"], + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceivedInThread event. */ export interface AcsChatMessageReceivedInThreadEventData extends AcsChatMessageEventInThreadBase { /** The body of the chat message */ @@ -494,6 +1161,25 @@ export interface AcsChatMessageReceivedInThreadEventData extends AcsChatMessageE metadata: Record; } +export function acsChatMessageReceivedInThreadEventDataDeserializer( + item: any, +): AcsChatMessageReceivedInThreadEventData { + return { + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + transactionId: item["transactionId"], + threadId: item["threadId"], + messageBody: item["messageBody"], + metadata: item["metadata"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEdited event. */ export interface AcsChatMessageEditedEventData extends AcsChatMessageEventBase { /** The body of the chat message */ @@ -504,6 +1190,29 @@ export interface AcsChatMessageEditedEventData extends AcsChatMessageEventBase { editTime: Date; } +export function acsChatMessageEditedEventDataDeserializer( + item: any, +): AcsChatMessageEditedEventData { + return { + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + messageBody: item["messageBody"], + metadata: item["metadata"], + editTime: new Date(item["editTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEditedInThread event. */ export interface AcsChatMessageEditedInThreadEventData extends AcsChatMessageEventInThreadBase { /** The body of the chat message */ @@ -514,18 +1223,77 @@ export interface AcsChatMessageEditedInThreadEventData extends AcsChatMessageEve editTime: Date; } +export function acsChatMessageEditedInThreadEventDataDeserializer( + item: any, +): AcsChatMessageEditedInThreadEventData { + return { + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + transactionId: item["transactionId"], + threadId: item["threadId"], + messageBody: item["messageBody"], + metadata: item["metadata"], + editTime: new Date(item["editTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeleted event. */ export interface AcsChatMessageDeletedEventData extends AcsChatMessageEventBase { /** The time at which the message was deleted */ deleteTime: Date; } +export function acsChatMessageDeletedEventDataDeserializer( + item: any, +): AcsChatMessageDeletedEventData { + return { + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + deleteTime: new Date(item["deleteTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeletedInThread event. */ export interface AcsChatMessageDeletedInThreadEventData extends AcsChatMessageEventInThreadBase { /** The time at which the message was deleted */ deleteTime: Date; } +export function acsChatMessageDeletedInThreadEventDataDeserializer( + item: any, +): AcsChatMessageDeletedInThreadEventData { + return { + messageId: item["messageId"], + senderCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["senderCommunicationIdentifier"], + ), + senderDisplayName: item["senderDisplayName"], + composeTime: new Date(item["composeTime"]), + type: item["type"], + version: item["version"], + transactionId: item["transactionId"], + threadId: item["threadId"], + deleteTime: new Date(item["deleteTime"]), + }; +} + /** Schema of common properties of all chat thread events */ export interface AcsChatThreadEventBase extends AcsChatEventBase { /** The original creation time of the thread */ @@ -534,6 +1302,18 @@ export interface AcsChatThreadEventBase extends AcsChatEventBase { version?: number; } +export function acsChatThreadEventBaseDeserializer(item: any): AcsChatThreadEventBase { + return { + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + createTime: new Date(item["createTime"]), + version: item["version"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadCreatedWithUser event. */ export interface AcsChatThreadCreatedWithUserEventData extends AcsChatThreadEventBase { /** The communication identifier of the user who created the thread */ @@ -546,6 +1326,34 @@ export interface AcsChatThreadCreatedWithUserEventData extends AcsChatThreadEven participants: AcsChatThreadParticipant[]; } +export function acsChatThreadCreatedWithUserEventDataDeserializer( + item: any, +): AcsChatThreadCreatedWithUserEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + createdByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["createdByCommunicationIdentifier"], + ), + properties: item["properties"], + metadata: item["metadata"], + participants: acsChatThreadParticipantArrayDeserializer(item["participants"]), + }; +} + +export function acsChatThreadParticipantArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsChatThreadParticipantDeserializer(item); + }); +} + /** Schema of the chat thread participant */ export interface AcsChatThreadParticipant { /** The name of the user */ @@ -556,6 +1364,16 @@ export interface AcsChatThreadParticipant { metadata: Record; } +export function acsChatThreadParticipantDeserializer(item: any): AcsChatThreadParticipant { + return { + displayName: item["displayName"], + participantCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["participantCommunicationIdentifier"], + ), + metadata: item["metadata"], + }; +} + /** Schema of common properties of all chat thread events */ export interface AcsChatThreadEventInThreadBase extends AcsChatEventInThreadBase { /** The original creation time of the thread */ @@ -564,6 +1382,17 @@ export interface AcsChatThreadEventInThreadBase extends AcsChatEventInThreadBase version?: number; } +export function acsChatThreadEventInThreadBaseDeserializer( + item: any, +): AcsChatThreadEventInThreadBase { + return { + transactionId: item["transactionId"], + threadId: item["threadId"], + createTime: new Date(item["createTime"]), + version: item["version"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadCreated event. */ export interface AcsChatThreadCreatedEventData extends AcsChatThreadEventInThreadBase { /** The communication identifier of the user who created the thread */ @@ -576,6 +1405,23 @@ export interface AcsChatThreadCreatedEventData extends AcsChatThreadEventInThrea participants: AcsChatThreadParticipant[]; } +export function acsChatThreadCreatedEventDataDeserializer( + item: any, +): AcsChatThreadCreatedEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + transactionId: item["transactionId"], + threadId: item["threadId"], + createdByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["createdByCommunicationIdentifier"], + ), + properties: item["properties"], + metadata: item["metadata"], + participants: acsChatThreadParticipantArrayDeserializer(item["participants"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadWithUserDeleted event. */ export interface AcsChatThreadWithUserDeletedEventData extends AcsChatThreadEventBase { /** The communication identifier of the user who deleted the thread */ @@ -584,6 +1430,24 @@ export interface AcsChatThreadWithUserDeletedEventData extends AcsChatThreadEven deleteTime: Date; } +export function acsChatThreadWithUserDeletedEventDataDeserializer( + item: any, +): AcsChatThreadWithUserDeletedEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + deletedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["deletedByCommunicationIdentifier"], + ), + deleteTime: new Date(item["deleteTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadDeleted event. */ export interface AcsChatThreadDeletedEventData extends AcsChatThreadEventInThreadBase { /** The communication identifier of the user who deleted the thread */ @@ -592,6 +1456,21 @@ export interface AcsChatThreadDeletedEventData extends AcsChatThreadEventInThrea deleteTime: Date; } +export function acsChatThreadDeletedEventDataDeserializer( + item: any, +): AcsChatThreadDeletedEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + transactionId: item["transactionId"], + threadId: item["threadId"], + deletedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["deletedByCommunicationIdentifier"], + ), + deleteTime: new Date(item["deleteTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser event. */ export interface AcsChatThreadPropertiesUpdatedPerUserEventData extends AcsChatThreadEventBase { /** The communication identifier of the user who updated the thread properties */ @@ -604,6 +1483,26 @@ export interface AcsChatThreadPropertiesUpdatedPerUserEventData extends AcsChatT properties: Record; } +export function acsChatThreadPropertiesUpdatedPerUserEventDataDeserializer( + item: any, +): AcsChatThreadPropertiesUpdatedPerUserEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + editedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["editedByCommunicationIdentifier"], + ), + editTime: new Date(item["editTime"]), + metadata: item["metadata"], + properties: item["properties"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadPropertiesUpdated event. */ export interface AcsChatThreadPropertiesUpdatedEventData extends AcsChatThreadEventInThreadBase { /** The communication identifier of the user who updated the thread properties */ @@ -616,6 +1515,23 @@ export interface AcsChatThreadPropertiesUpdatedEventData extends AcsChatThreadEv metadata: Record; } +export function acsChatThreadPropertiesUpdatedEventDataDeserializer( + item: any, +): AcsChatThreadPropertiesUpdatedEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + transactionId: item["transactionId"], + threadId: item["threadId"], + editedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["editedByCommunicationIdentifier"], + ), + editTime: new Date(item["editTime"]), + properties: item["properties"], + metadata: item["metadata"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatParticipantAddedToThreadWithUser event. */ export interface AcsChatParticipantAddedToThreadWithUserEventData extends AcsChatThreadEventBase { /** The time at which the user was added to the thread */ @@ -626,6 +1542,25 @@ export interface AcsChatParticipantAddedToThreadWithUserEventData extends AcsCha participantAdded: AcsChatThreadParticipant; } +export function acsChatParticipantAddedToThreadWithUserEventDataDeserializer( + item: any, +): AcsChatParticipantAddedToThreadWithUserEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + time: new Date(item["time"]), + addedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["addedByCommunicationIdentifier"], + ), + participantAdded: acsChatThreadParticipantDeserializer(item["participantAdded"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser event. */ export interface AcsChatParticipantRemovedFromThreadWithUserEventData extends AcsChatThreadEventBase { @@ -637,6 +1572,25 @@ export interface AcsChatParticipantRemovedFromThreadWithUserEventData participantRemoved: AcsChatThreadParticipant; } +export function acsChatParticipantRemovedFromThreadWithUserEventDataDeserializer( + item: any, +): AcsChatParticipantRemovedFromThreadWithUserEventData { + return { + createTime: new Date(item["createTime"]), + version: item["version"], + recipientCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["recipientCommunicationIdentifier"], + ), + transactionId: item["transactionId"], + threadId: item["threadId"], + time: new Date(item["time"]), + removedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["removedByCommunicationIdentifier"], + ), + participantRemoved: acsChatThreadParticipantDeserializer(item["participantRemoved"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadParticipantAdded event. */ export interface AcsChatParticipantAddedToThreadEventData extends AcsChatEventInThreadBase { /** The time at which the user was added to the thread */ @@ -649,6 +1603,21 @@ export interface AcsChatParticipantAddedToThreadEventData extends AcsChatEventIn version?: number; } +export function acsChatParticipantAddedToThreadEventDataDeserializer( + item: any, +): AcsChatParticipantAddedToThreadEventData { + return { + transactionId: item["transactionId"], + threadId: item["threadId"], + time: new Date(item["time"]), + addedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["addedByCommunicationIdentifier"], + ), + participantAdded: acsChatThreadParticipantDeserializer(item["participantAdded"]), + version: item["version"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadParticipantRemoved event. */ export interface AcsChatParticipantRemovedFromThreadEventData extends AcsChatEventInThreadBase { /** The time at which the user was removed to the thread */ @@ -661,6 +1630,21 @@ export interface AcsChatParticipantRemovedFromThreadEventData extends AcsChatEve version?: number; } +export function acsChatParticipantRemovedFromThreadEventDataDeserializer( + item: any, +): AcsChatParticipantRemovedFromThreadEventData { + return { + transactionId: item["transactionId"], + threadId: item["threadId"], + time: new Date(item["time"]), + removedByCommunicationIdentifier: communicationIdentifierModelDeserializer( + item["removedByCommunicationIdentifier"], + ), + participantRemoved: acsChatThreadParticipantDeserializer(item["participantRemoved"]), + version: item["version"], + }; +} + /** Schema of common properties of all SMS events */ export interface AcsSmsEventBase { /** The identity of the SMS message */ @@ -671,6 +1655,14 @@ export interface AcsSmsEventBase { to?: string; } +export function acsSmsEventBaseDeserializer(item: any): AcsSmsEventBase { + return { + messageId: item["messageId"], + from: item["from"], + to: item["to"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSDeliveryReportReceived event. */ export interface AcsSmsDeliveryReportReceivedEventData extends AcsSmsEventBase { /** Status of Delivery */ @@ -685,6 +1677,29 @@ export interface AcsSmsDeliveryReportReceivedEventData extends AcsSmsEventBase { tag?: string; } +export function acsSmsDeliveryReportReceivedEventDataDeserializer( + item: any, +): AcsSmsDeliveryReportReceivedEventData { + return { + messageId: item["messageId"], + from: item["from"], + to: item["to"], + deliveryStatus: item["deliveryStatus"], + deliveryStatusDetails: item["deliveryStatusDetails"], + deliveryAttempts: acsSmsDeliveryAttemptArrayDeserializer(item["deliveryAttempts"]), + receivedTimestamp: new Date(item["receivedTimestamp"]), + tag: item["tag"], + }; +} + +export function acsSmsDeliveryAttemptArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsSmsDeliveryAttemptDeserializer(item); + }); +} + /** Schema for details of a delivery attempt */ export interface AcsSmsDeliveryAttempt { /** TimeStamp when delivery was attempted */ @@ -695,6 +1710,14 @@ export interface AcsSmsDeliveryAttempt { segmentsFailed?: number; } +export function acsSmsDeliveryAttemptDeserializer(item: any): AcsSmsDeliveryAttempt { + return { + timestamp: new Date(item["timestamp"]), + segmentsSucceeded: item["segmentsSucceeded"], + segmentsFailed: item["segmentsFailed"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. */ export interface AcsSmsReceivedEventData extends AcsSmsEventBase { /** The SMS content */ @@ -705,6 +1728,17 @@ export interface AcsSmsReceivedEventData extends AcsSmsEventBase { segmentCount: number; } +export function acsSmsReceivedEventDataDeserializer(item: any): AcsSmsReceivedEventData { + return { + messageId: item["messageId"], + from: item["from"], + to: item["to"], + message: item["message"], + receivedTimestamp: new Date(item["receivedTimestamp"]), + segmentCount: item["segmentCount"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RecordingFileStatusUpdated event. */ export interface AcsRecordingFileStatusUpdatedEventData { /** The details of recording storage information */ @@ -723,12 +1757,40 @@ export interface AcsRecordingFileStatusUpdatedEventData { sessionEndReason?: string; } +export function acsRecordingFileStatusUpdatedEventDataDeserializer( + item: any, +): AcsRecordingFileStatusUpdatedEventData { + return { + recordingStorageInfo: acsRecordingStorageInfoDeserializer(item["recordingStorageInfo"]), + recordingStartTime: new Date(item["recordingStartTime"]), + recordingDurationMs: item["recordingDurationMs"], + recordingContentType: item["recordingContentType"], + recordingChannelType: item["recordingChannelType"], + recordingFormatType: item["recordingFormatType"], + sessionEndReason: item["sessionEndReason"], + }; +} + /** Schema for all properties of Recording Storage Information. */ export interface AcsRecordingStorageInfo { /** List of details of recording chunks information */ recordingChunks: AcsRecordingChunkInfo[]; } +export function acsRecordingStorageInfoDeserializer(item: any): AcsRecordingStorageInfo { + return { + recordingChunks: acsRecordingChunkInfoArrayDeserializer(item["recordingChunks"]), + }; +} + +export function acsRecordingChunkInfoArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsRecordingChunkInfoDeserializer(item); + }); +} + /** Schema for all properties of Recording Chunk Information. */ export interface AcsRecordingChunkInfo { /** The documentId of the recording chunk */ @@ -745,60 +1807,71 @@ export interface AcsRecordingChunkInfo { deleteLocation?: string; } -/** Known values of {@link RecordingContentType} that the service accepts. */ +export function acsRecordingChunkInfoDeserializer(item: any): AcsRecordingChunkInfo { + return { + documentId: item["documentId"], + index: item["index"], + endReason: item["endReason"], + metadataLocation: item["metadataLocation"], + contentLocation: item["contentLocation"], + deleteLocation: item["deleteLocation"], + }; +} + +/** Recording content type */ export enum KnownRecordingContentType { - /** AudioVideo */ + /** AudioVideo content type */ AudioVideo = "AudioVideo", - /** Audio */ + /** Audio content type */ Audio = "Audio", } /** - * Recording content type - * {@link KnownRecordingContentType} can be used interchangeably with RecordingContentType, + * Recording content type \ + * {@link KnownrecordingContentType} can be used interchangeably with recordingContentType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **AudioVideo** - * **Audio** + * **AudioVideo**: AudioVideo content type \ + * **Audio**: Audio content type */ export type RecordingContentType = string; -/** Known values of {@link RecordingChannelType} that the service accepts. */ +/** Recording channel type */ export enum KnownRecordingChannelType { - /** Mixed */ + /** Mixed channel type */ Mixed = "Mixed", - /** Unmixed */ + /** Unmixed channel type */ Unmixed = "Unmixed", } /** - * Recording channel type - * {@link KnownRecordingChannelType} can be used interchangeably with RecordingChannelType, + * Recording channel type \ + * {@link KnownrecordingChannelType} can be used interchangeably with recordingChannelType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Mixed** - * **Unmixed** + * **Mixed**: Mixed channel type \ + * **Unmixed**: Unmixed channel type */ export type RecordingChannelType = string; -/** Known values of {@link RecordingFormatType} that the service accepts. */ +/** Recording format type */ export enum KnownRecordingFormatType { - /** Wav */ + /** WAV format */ Wav = "Wav", - /** Mp3 */ + /** MP3 format */ Mp3 = "Mp3", - /** Mp4 */ + /** MP4 format */ Mp4 = "Mp4", } /** - * Recording format type - * {@link KnownRecordingFormatType} can be used interchangeably with RecordingFormatType, + * Recording format type \ + * {@link KnownrecordingFormatType} can be used interchangeably with recordingFormatType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Wav** - * **Mp3** - * **Mp4** + * **Wav**: WAV format \ + * **Mp3**: MP3 format \ + * **Mp4**: MP4 format */ export type RecordingFormatType = string; @@ -820,33 +1893,49 @@ export interface AcsEmailDeliveryReportReceivedEventData { deliveryAttemptTimestamp: Date; } -/** Known values of {@link AcsEmailDeliveryReportStatus} that the service accepts. */ +export function acsEmailDeliveryReportReceivedEventDataDeserializer( + item: any, +): AcsEmailDeliveryReportReceivedEventData { + return { + sender: item["sender"], + recipient: item["recipient"], + internetMessageId: item["internetMessageId"], + messageId: item["messageId"], + status: item["status"], + deliveryStatusDetails: acsEmailDeliveryReportStatusDetailsDeserializer( + item["deliveryStatusDetails"], + ), + deliveryAttemptTimestamp: new Date(item["deliveryAttemptTimestamp"]), + }; +} + +/** The status of the email. Any value other than Delivered is considered failed. */ export enum KnownAcsEmailDeliveryReportStatus { - /** Bounced */ + /** Hard bounce detected while sending the email */ Bounced = "Bounced", - /** Delivered */ + /** The email was delivered */ Delivered = "Delivered", - /** Failed */ + /** The email failed to be delivered */ Failed = "Failed", - /** FilteredSpam */ + /** The message was identified as spam and was rejected or blocked (not quarantined). */ FilteredSpam = "FilteredSpam", - /** Quarantined */ + /** The message was quarantined (as spam, bulk mail, or phishing). For more information, see Quarantined email messages in EOP (EXCHANGE ONLINE PROTECTION). */ Quarantined = "Quarantined", - /** Suppressed */ + /** The email was suppressed */ Suppressed = "Suppressed", } /** - * The status of the email. Any value other than Delivered is considered failed. + * The status of the email. Any value other than Delivered is considered failed. \ * {@link KnownAcsEmailDeliveryReportStatus} can be used interchangeably with AcsEmailDeliveryReportStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Bounced** - * **Delivered** - * **Failed** - * **FilteredSpam** - * **Quarantined** - * **Suppressed** + * **Bounced**: Hard bounce detected while sending the email \ + * **Delivered**: The email was delivered \ + * **Failed**: The email failed to be delivered \ + * **FilteredSpam**: The message was identified as spam and was rejected or blocked (not quarantined). \ + * **Quarantined**: The message was quarantined (as spam, bulk mail, or phishing). For more information, see Quarantined email messages in EOP (EXCHANGE ONLINE PROTECTION). \ + * **Suppressed**: The email was suppressed */ export type AcsEmailDeliveryReportStatus = string; @@ -858,6 +1947,15 @@ export interface AcsEmailDeliveryReportStatusDetails { recipientMailServerHostName?: string; } +export function acsEmailDeliveryReportStatusDetailsDeserializer( + item: any, +): AcsEmailDeliveryReportStatusDetails { + return { + statusMessage: item["statusMessage"], + recipientMailServerHostName: item["recipientMailServerHostName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.EmailEngagementTrackingReportReceived event. */ export interface AcsEmailEngagementTrackingReportReceivedEventData { /** The Sender Email Address */ @@ -876,21 +1974,35 @@ export interface AcsEmailEngagementTrackingReportReceivedEventData { engagement: AcsUserEngagement; } -/** Known values of {@link AcsUserEngagement} that the service accepts. */ +export function acsEmailEngagementTrackingReportReceivedEventDataDeserializer( + item: any, +): AcsEmailEngagementTrackingReportReceivedEventData { + return { + sender: item["sender"], + recipient: item["recipient"], + messageId: item["messageId"], + userActionTimestamp: new Date(item["userActionTimestamp"]), + engagementContext: item["engagementContext"], + userAgent: item["userAgent"], + engagement: item["engagementType"], + }; +} + +/** The type of engagement user have with email. */ export enum KnownAcsUserEngagement { - /** view */ + /** View */ view = "view", - /** click */ + /** Click */ click = "click", } /** - * The type of engagement user have with email. + * The type of engagement user have with email. \ * {@link KnownAcsUserEngagement} can be used interchangeably with AcsUserEngagement, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **view** - * **click** + * **view**: View \ + * **click**: Click */ export type AcsUserEngagement = string; @@ -904,6 +2016,14 @@ export interface AcsRouterEventData { channelId?: string; } +export function acsRouterEventDataDeserializer(item: any): AcsRouterEventData { + return { + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + }; +} + /** Schema of common properties of all Router Job events */ export interface AcsRouterJobEventData extends AcsRouterEventData { /** Router Job events Queue Id */ @@ -914,6 +2034,17 @@ export interface AcsRouterJobEventData extends AcsRouterEventData { tags: Record; } +export function acsRouterJobEventDataDeserializer(item: any): AcsRouterJobEventData { + return { + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCancelled event */ export interface AcsRouterJobCancelledEventData extends AcsRouterJobEventData { /** Router Job Note */ @@ -922,6 +2053,21 @@ export interface AcsRouterJobCancelledEventData extends AcsRouterJobEventData { dispositionCode?: string; } +export function acsRouterJobCancelledEventDataDeserializer( + item: any, +): AcsRouterJobCancelledEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + note: item["note"], + dispositionCode: item["dispositionCode"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassificationFailed event */ export interface AcsRouterJobClassificationFailedEventData extends AcsRouterJobEventData { /** Router Job Classification Policy Id */ @@ -930,6 +2076,29 @@ export interface AcsRouterJobClassificationFailedEventData extends AcsRouterJobE errors: AcsRouterCommunicationError[]; } +export function acsRouterJobClassificationFailedEventDataDeserializer( + item: any, +): AcsRouterJobClassificationFailedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + classificationPolicyId: item["classificationPolicyId"], + errors: acsRouterCommunicationErrorArrayDeserializer(item["errors"]), + }; +} + +export function acsRouterCommunicationErrorArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsRouterCommunicationErrorDeserializer(item); + }); +} + /** Router Communication Error */ export interface AcsRouterCommunicationError { /** Router Communication Error Code */ @@ -944,6 +2113,16 @@ export interface AcsRouterCommunicationError { details: AcsRouterCommunicationError[]; } +export function acsRouterCommunicationErrorDeserializer(item: any): AcsRouterCommunicationError { + return { + code: item["code"], + message: item["message"], + target: item["target"], + innererror: acsRouterCommunicationErrorDeserializer(item["innererror"]), + details: acsRouterCommunicationErrorArrayDeserializer(item["details"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassified event */ export interface AcsRouterJobClassifiedEventData extends AcsRouterJobEventData { /** Router Job Queue Info */ @@ -956,6 +2135,25 @@ export interface AcsRouterJobClassifiedEventData extends AcsRouterJobEventData { attachedWorkerSelectors: AcsRouterWorkerSelector[]; } +export function acsRouterJobClassifiedEventDataDeserializer( + item: any, +): AcsRouterJobClassifiedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueDetails: acsRouterQueueDetailsDeserializer(item["queueDetails"]), + classificationPolicyId: item["classificationPolicyId"], + priority: item["priority"], + attachedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["attachedWorkerSelectors"], + ), + }; +} + /** Router Queue Details */ export interface AcsRouterQueueDetails { /** Router Queue Id */ @@ -966,6 +2164,22 @@ export interface AcsRouterQueueDetails { labels: Record; } +export function acsRouterQueueDetailsDeserializer(item: any): AcsRouterQueueDetails { + return { + id: item["id"], + name: item["name"], + labels: item["labels"], + }; +} + +export function acsRouterWorkerSelectorArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsRouterWorkerSelectorDeserializer(item); + }); +} + /** Router Job Worker Selector */ export interface AcsRouterWorkerSelector { /** Router Job Worker Selector Key */ @@ -982,51 +2196,62 @@ export interface AcsRouterWorkerSelector { expirationTime: Date; } -/** Known values of {@link AcsRouterLabelOperator} that the service accepts. */ +export function acsRouterWorkerSelectorDeserializer(item: any): AcsRouterWorkerSelector { + return { + key: item["key"], + labelOperator: item["labelOperator"], + labelValue: item["value"], + ttlSeconds: item["ttlSeconds"], + state: item["state"], + expirationTime: new Date(item["expirationTime"]), + }; +} + +/** Router Job Worker Selector Label Operator */ export enum KnownAcsRouterLabelOperator { - /** Equal */ + /** Router Label Operator Equal */ Equal = "Equal", - /** NotEqual */ + /** Router Label Operator Not Equal */ NotEqual = "NotEqual", - /** Greater */ + /** Router Label Operator Greater */ Greater = "Greater", - /** Less */ + /** Router Label Operator Less */ Less = "Less", - /** GreaterThanOrEqual */ + /** Router Label Operator Greater than or equal */ GreaterThanOrEqual = "GreaterThanOrEqual", - /** LessThanOrEqual */ + /** Router Label Operator Less than or equal */ LessThanOrEqual = "LessThanOrEqual", } /** - * Router Job Worker Selector Label Operator + * Router Job Worker Selector Label Operator \ * {@link KnownAcsRouterLabelOperator} can be used interchangeably with AcsRouterLabelOperator, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Equal** - * **NotEqual** - * **Greater** - * **Less** - * **GreaterThanOrEqual** - * **LessThanOrEqual** + * **Equal**: Router Label Operator Equal \ + * **NotEqual**: Router Label Operator Not Equal \ + * **Greater**: Router Label Operator Greater \ + * **Less**: Router Label Operator Less \ + * **GreaterThanOrEqual**: Router Label Operator Greater than or equal \ + * **LessThanOrEqual**: Router Label Operator Less than or equal */ export type AcsRouterLabelOperator = string; -/** Known values of {@link AcsRouterWorkerSelectorState} that the service accepts. */ +/** Router Worker Selector State */ export enum KnownAcsRouterWorkerSelectorState { - /** active */ - active = "active", - /** expired */ - expired = "expired", + /** Router Worker Selector State Active */ + Active = "active", + /** Router Worker Selector State Expired */ + Expired = "expired", } /** - * Router Worker Selector State + * Router Worker Selector State \ * {@link KnownAcsRouterWorkerSelectorState} can be used interchangeably with AcsRouterWorkerSelectorState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **active** - * **expired** + * **active**: Router Worker Selector State Active \ + * **expired**: Router Worker Selector State Expired */ export type AcsRouterWorkerSelectorState = string; @@ -1040,6 +2265,20 @@ export interface AcsRouterJobClosedEventData extends AcsRouterJobEventData { dispositionCode?: string; } +export function acsRouterJobClosedEventDataDeserializer(item: any): AcsRouterJobClosedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + assignmentId: item["assignmentId"], + workerId: item["workerId"], + dispositionCode: item["dispositionCode"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobCompleted event */ export interface AcsRouterJobCompletedEventData extends AcsRouterJobEventData { /** Router Job Completed Assignment Id */ @@ -1048,9 +2287,35 @@ export interface AcsRouterJobCompletedEventData extends AcsRouterJobEventData { workerId?: string; } +export function acsRouterJobCompletedEventDataDeserializer( + item: any, +): AcsRouterJobCompletedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + assignmentId: item["assignmentId"], + workerId: item["workerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobDeleted event */ export interface AcsRouterJobDeletedEventData extends AcsRouterJobEventData {} +export function acsRouterJobDeletedEventDataDeserializer(item: any): AcsRouterJobDeletedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobExceptionTriggered event */ export interface AcsRouterJobExceptionTriggeredEventData extends AcsRouterJobEventData { /** Router Job Exception Triggered Rule Key */ @@ -1059,6 +2324,21 @@ export interface AcsRouterJobExceptionTriggeredEventData extends AcsRouterJobEve exceptionRuleId?: string; } +export function acsRouterJobExceptionTriggeredEventDataDeserializer( + item: any, +): AcsRouterJobExceptionTriggeredEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + ruleKey: item["ruleKey"], + exceptionRuleId: item["exceptionRuleId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobQueued event */ export interface AcsRouterJobQueuedEventData extends AcsRouterJobEventData { /** Router Job Priority */ @@ -1069,6 +2349,24 @@ export interface AcsRouterJobQueuedEventData extends AcsRouterJobEventData { requestedWorkerSelectors: AcsRouterWorkerSelector[]; } +export function acsRouterJobQueuedEventDataDeserializer(item: any): AcsRouterJobQueuedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + priority: item["priority"], + attachedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["attachedWorkerSelectors"], + ), + requestedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["requestedWorkerSelectors"], + ), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobReceived event */ export interface AcsRouterJobReceivedEventData extends AcsRouterJobEventData { /** Router Job Received Job Status */ @@ -1085,51 +2383,72 @@ export interface AcsRouterJobReceivedEventData extends AcsRouterJobEventData { unavailableForMatching: boolean; } -/** Known values of {@link AcsRouterJobStatus} that the service accepts. */ +export function acsRouterJobReceivedEventDataDeserializer( + item: any, +): AcsRouterJobReceivedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + jobStatus: item["jobStatus"], + classificationPolicyId: item["classificationPolicyId"], + priority: item["priority"], + requestedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["requestedWorkerSelectors"], + ), + scheduledOn: new Date(item["scheduledOn"]), + unavailableForMatching: item["unavailableForMatching"], + }; +} + +/** Acs Router Job Status */ export enum KnownAcsRouterJobStatus { - /** PendingClassification */ + /** Router Job Status Pending Classification */ PendingClassification = "PendingClassification", - /** Queued */ + /** Router Job Status Queued */ Queued = "Queued", - /** Assigned */ + /** Router Job Status Assigned */ Assigned = "Assigned", - /** Completed */ + /** Router Job Status Completed */ Completed = "Completed", - /** Closed */ + /** Router Job Status Closed */ Closed = "Closed", - /** Cancelled */ + /** Router Job Status Cancelled */ Cancelled = "Cancelled", - /** ClassificationFailed */ + /** Router Job Status Classification Failed */ ClassificationFailed = "ClassificationFailed", - /** Created */ + /** Router Job Status Created */ Created = "Created", - /** PendingSchedule */ + /** Router Job Status Pending Schedule */ PendingSchedule = "PendingSchedule", - /** Scheduled */ + /** Router Job Status Scheduled */ Scheduled = "Scheduled", - /** ScheduleFailed */ + /** Router Job Status Schedule Failed */ ScheduleFailed = "ScheduleFailed", - /** WaitingForActivation */ + /** Router Job Status Waiting For Activation */ WaitingForActivation = "WaitingForActivation", } /** - * Acs Router Job Status + * Acs Router Job Status \ * {@link KnownAcsRouterJobStatus} can be used interchangeably with AcsRouterJobStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **PendingClassification** - * **Queued** - * **Assigned** - * **Completed** - * **Closed** - * **Cancelled** - * **ClassificationFailed** - * **Created** - * **PendingSchedule** - * **Scheduled** - * **ScheduleFailed** - * **WaitingForActivation** + * **PendingClassification**: Router Job Status Pending Classification \ + * **Queued**: Router Job Status Queued \ + * **Assigned**: Router Job Status Assigned \ + * **Completed**: Router Job Status Completed \ + * **Closed**: Router Job Status Closed \ + * **Cancelled**: Router Job Status Cancelled \ + * **ClassificationFailed**: Router Job Status Classification Failed \ + * **Created**: Router Job Status Created \ + * **PendingSchedule**: Router Job Status Pending Schedule \ + * **Scheduled**: Router Job Status Scheduled \ + * **ScheduleFailed**: Router Job Status Schedule Failed \ + * **WaitingForActivation**: Router Job Status Waiting For Activation */ export type AcsRouterJobStatus = string; @@ -1147,6 +2466,28 @@ export interface AcsRouterJobSchedulingFailedEventData extends AcsRouterJobEvent failureReason?: string; } +export function acsRouterJobSchedulingFailedEventDataDeserializer( + item: any, +): AcsRouterJobSchedulingFailedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + priority: item["priority"], + expiredAttachedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["expiredAttachedWorkerSelectors"], + ), + expiredRequestedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["expiredRequestedWorkerSelectors"], + ), + scheduledOn: new Date(item["scheduledOn"]), + failureReason: item["failureReason"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobUnassigned event */ export interface AcsRouterJobUnassignedEventData extends AcsRouterJobEventData { /** Router Job Unassigned Assignment Id */ @@ -1155,6 +2496,21 @@ export interface AcsRouterJobUnassignedEventData extends AcsRouterJobEventData { workerId?: string; } +export function acsRouterJobUnassignedEventDataDeserializer( + item: any, +): AcsRouterJobUnassignedEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + assignmentId: item["assignmentId"], + workerId: item["workerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWaitingForActivation event */ export interface AcsRouterJobWaitingForActivationEventData extends AcsRouterJobEventData { /** Router Job Waiting For Activation Priority */ @@ -1169,6 +2525,28 @@ export interface AcsRouterJobWaitingForActivationEventData extends AcsRouterJobE unavailableForMatching: boolean; } +export function acsRouterJobWaitingForActivationEventDataDeserializer( + item: any, +): AcsRouterJobWaitingForActivationEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + priority: item["priority"], + expiredAttachedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["expiredAttachedWorkerSelectors"], + ), + expiredRequestedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["expiredRequestedWorkerSelectors"], + ), + scheduledOn: new Date(item["scheduledOn"]), + unavailableForMatching: item["unavailableForMatching"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobWorkerSelectorsExpired event */ export interface AcsRouterJobWorkerSelectorsExpiredEventData extends AcsRouterJobEventData { /** Router Job Worker Selectors Expired Requested Worker Selectors */ @@ -1177,21 +2555,68 @@ export interface AcsRouterJobWorkerSelectorsExpiredEventData extends AcsRouterJo expiredAttachedWorkerSelectors: AcsRouterWorkerSelector[]; } +export function acsRouterJobWorkerSelectorsExpiredEventDataDeserializer( + item: any, +): AcsRouterJobWorkerSelectorsExpiredEventData { + return { + queueId: item["queueId"], + labels: item["labels"], + tags: item["tags"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + expiredRequestedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["expiredRequestedWorkerSelectors"], + ), + expiredAttachedWorkerSelectors: acsRouterWorkerSelectorArrayDeserializer( + item["expiredAttachedWorkerSelectors"], + ), + }; +} + /** Schema of common properties of all Router Worker events */ export interface AcsRouterWorkerEventData extends AcsRouterEventData { /** Router Worker events Worker Id */ workerId?: string; } +export function acsRouterWorkerEventDataDeserializer(item: any): AcsRouterWorkerEventData { + return { + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + workerId: item["workerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerDeleted event */ export interface AcsRouterWorkerDeletedEventData extends AcsRouterWorkerEventData {} +export function acsRouterWorkerDeletedEventDataDeserializer( + item: any, +): AcsRouterWorkerDeletedEventData { + return { + workerId: item["workerId"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerDeregistered event */ export interface AcsRouterWorkerDeregisteredEventData { /** Router Worker Deregistered Worker Id */ workerId?: string; } +export function acsRouterWorkerDeregisteredEventDataDeserializer( + item: any, +): AcsRouterWorkerDeregisteredEventData { + return { + workerId: item["workerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferAccepted event */ export interface AcsRouterWorkerOfferAcceptedEventData extends AcsRouterWorkerEventData { /** Router Worker Offer Accepted Queue Id */ @@ -1212,6 +2637,25 @@ export interface AcsRouterWorkerOfferAcceptedEventData extends AcsRouterWorkerEv jobTags: Record; } +export function acsRouterWorkerOfferAcceptedEventDataDeserializer( + item: any, +): AcsRouterWorkerOfferAcceptedEventData { + return { + workerId: item["workerId"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueId: item["queueId"], + offerId: item["offerId"], + assignmentId: item["assignmentId"], + jobPriority: item["jobPriority"], + workerLabels: item["workerLabels"], + workerTags: item["workerTags"], + jobLabels: item["jobLabels"], + jobTags: item["jobTags"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferDeclined event */ export interface AcsRouterWorkerOfferDeclinedEventData extends AcsRouterWorkerEventData { /** Router Worker Offer Declined Queue Id */ @@ -1220,6 +2664,19 @@ export interface AcsRouterWorkerOfferDeclinedEventData extends AcsRouterWorkerEv offerId?: string; } +export function acsRouterWorkerOfferDeclinedEventDataDeserializer( + item: any, +): AcsRouterWorkerOfferDeclinedEventData { + return { + workerId: item["workerId"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueId: item["queueId"], + offerId: item["offerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferExpired event */ export interface AcsRouterWorkerOfferExpiredEventData extends AcsRouterWorkerEventData { /** Router Worker Offer Expired Queue Id */ @@ -1228,6 +2685,19 @@ export interface AcsRouterWorkerOfferExpiredEventData extends AcsRouterWorkerEve offerId?: string; } +export function acsRouterWorkerOfferExpiredEventDataDeserializer( + item: any, +): AcsRouterWorkerOfferExpiredEventData { + return { + workerId: item["workerId"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueId: item["queueId"], + offerId: item["offerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferIssued event */ export interface AcsRouterWorkerOfferIssuedEventData extends AcsRouterWorkerEventData { /** Router Worker Offer Issued Queue Id */ @@ -1250,6 +2720,26 @@ export interface AcsRouterWorkerOfferIssuedEventData extends AcsRouterWorkerEven jobTags: Record; } +export function acsRouterWorkerOfferIssuedEventDataDeserializer( + item: any, +): AcsRouterWorkerOfferIssuedEventData { + return { + workerId: item["workerId"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueId: item["queueId"], + offerId: item["offerId"], + jobPriority: item["jobPriority"], + workerLabels: item["workerLabels"], + offeredOn: new Date(item["offeredOn"]), + expiresOn: new Date(item["expiresOn"]), + workerTags: item["workerTags"], + jobLabels: item["jobLabels"], + jobTags: item["jobTags"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerOfferRevoked event */ export interface AcsRouterWorkerOfferRevokedEventData extends AcsRouterWorkerEventData { /** Router Worker Offer Revoked Queue Id */ @@ -1258,6 +2748,19 @@ export interface AcsRouterWorkerOfferRevokedEventData extends AcsRouterWorkerEve offerId?: string; } +export function acsRouterWorkerOfferRevokedEventDataDeserializer( + item: any, +): AcsRouterWorkerOfferRevokedEventData { + return { + workerId: item["workerId"], + jobId: item["jobId"], + channelReference: item["channelReference"], + channelId: item["channelId"], + queueId: item["queueId"], + offerId: item["offerId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerRegistered event */ export interface AcsRouterWorkerRegisteredEventData { /** Router Worker Registered Worker Id */ @@ -1274,6 +2777,37 @@ export interface AcsRouterWorkerRegisteredEventData { tags: Record; } +export function acsRouterWorkerRegisteredEventDataDeserializer( + item: any, +): AcsRouterWorkerRegisteredEventData { + return { + workerId: item["workerId"], + queueAssignments: acsRouterQueueDetailsArrayDeserializer(item["queueAssignments"]), + channelConfigurations: acsRouterChannelConfigurationArrayDeserializer( + item["channelConfigurations"], + ), + totalCapacity: item["totalCapacity"], + labels: item["labels"], + tags: item["tags"], + }; +} + +export function acsRouterQueueDetailsArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsRouterQueueDetailsDeserializer(item); + }); +} + +export function acsRouterChannelConfigurationArrayDeserializer( + result: Array, +): any[] { + return result.map((item) => { + return acsRouterChannelConfigurationDeserializer(item); + }); +} + /** Router Channel Configuration */ export interface AcsRouterChannelConfiguration { /** Channel ID for Router Job */ @@ -1284,6 +2818,16 @@ export interface AcsRouterChannelConfiguration { maxNumberOfJobs?: number; } +export function acsRouterChannelConfigurationDeserializer( + item: any, +): AcsRouterChannelConfiguration { + return { + channelId: item["channelId"], + capacityCostPerJob: item["capacityCostPerJob"], + maxNumberOfJobs: item["maxNumberOfJobs"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterWorkerUpdated event. */ export interface AcsRouterWorkerUpdatedEventData { /** Router Worker Updated Worker Id */ @@ -1302,7 +2846,25 @@ export interface AcsRouterWorkerUpdatedEventData { updatedWorkerProperties: AcsRouterUpdatedWorkerProperty[]; } -/** Known values of {@link AcsRouterUpdatedWorkerProperty} that the service accepts. */ +export function acsRouterWorkerUpdatedEventDataDeserializer( + item: any, +): AcsRouterWorkerUpdatedEventData { + return { + workerId: item["workerId"], + queueAssignments: acsRouterQueueDetailsArrayDeserializer(item["queueAssignments"]), + channelConfigurations: acsRouterChannelConfigurationArrayDeserializer( + item["channelConfigurations"], + ), + totalCapacity: item["totalCapacity"], + labels: item["labels"], + tags: item["tags"], + updatedWorkerProperties: item["updatedWorkerProperties"].map((p: any) => { + return p; + }), + }; +} + +/** Worker properties that can be updated */ export enum KnownAcsRouterUpdatedWorkerProperty { /** AvailableForOffers */ AvailableForOffers = "AvailableForOffers", @@ -1319,16 +2881,16 @@ export enum KnownAcsRouterUpdatedWorkerProperty { } /** - * Worker properties that can be updated + * Worker properties that can be updated \ * {@link KnownAcsRouterUpdatedWorkerProperty} can be used interchangeably with AcsRouterUpdatedWorkerProperty, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **AvailableForOffers** - * **TotalCapacity** - * **QueueAssignments** - * **Labels** - * **Tags** - * **ChannelConfigurations** + * **AvailableForOffers**: AvailableForOffers \ + * **TotalCapacity**: TotalCapacity \ + * **QueueAssignments**: QueueAssignments \ + * **Labels**: Labels \ + * **Tags**: Tags \ + * **ChannelConfigurations**: ChannelConfigurations */ export type AcsRouterUpdatedWorkerProperty = string; @@ -1344,6 +2906,15 @@ export interface AcsMessageEventData { error: AcsMessageChannelEventError; } +export function acsMessageEventDataDeserializer(item: any): AcsMessageEventData { + return { + from: item["from"], + to: item["to"], + receivedTimeStamp: new Date(item["receivedTimeStamp"]), + error: acsMessageChannelEventErrorDeserializer(item["error"]), + }; +} + /** Message Channel Event Error */ export interface AcsMessageChannelEventError { /** The channel error code */ @@ -1352,6 +2923,13 @@ export interface AcsMessageChannelEventError { channelMessage?: string; } +export function acsMessageChannelEventErrorDeserializer(item: any): AcsMessageChannelEventError { + return { + channelCode: item["channelCode"], + channelMessage: item["channelMessage"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated event. */ export interface AcsMessageDeliveryStatusUpdatedEventData extends AcsMessageEventData { /** The message id */ @@ -1362,48 +2940,62 @@ export interface AcsMessageDeliveryStatusUpdatedEventData extends AcsMessageEven channelKind: AcsMessageChannelKind; } -/** Known values of {@link AcsMessageDeliveryStatus} that the service accepts. */ +export function acsMessageDeliveryStatusUpdatedEventDataDeserializer( + item: any, +): AcsMessageDeliveryStatusUpdatedEventData { + return { + from: item["from"], + to: item["to"], + receivedTimeStamp: new Date(item["receivedTimeStamp"]), + error: acsMessageChannelEventErrorDeserializer(item["error"]), + messageId: item["messageId"], + status: item["status"], + channelKind: item["channelType"], + }; +} + +/** Message delivery status */ export enum KnownAcsMessageDeliveryStatus { - /** read */ + /** Read */ read = "read", - /** delivered */ + /** Delivered */ delivered = "delivered", - /** failed */ + /** Failed */ failed = "failed", - /** sent */ + /** Sent */ sent = "sent", - /** warning */ + /** Warning */ warning = "warning", - /** unknown */ + /** Unknown */ unknown = "unknown", } /** - * Message delivery status + * Message delivery status \ * {@link KnownAcsMessageDeliveryStatus} can be used interchangeably with AcsMessageDeliveryStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **read** - * **delivered** - * **failed** - * **sent** - * **warning** - * **unknown** + * **read**: Read \ + * **delivered**: Delivered \ + * **failed**: Failed \ + * **sent**: Sent \ + * **warning**: Warning \ + * **unknown**: Unknown */ export type AcsMessageDeliveryStatus = string; -/** Known values of {@link AcsMessageChannelKind} that the service accepts. */ +/** Message channel kind */ export enum KnownAcsMessageChannelKind { - /** whatsapp */ + /** Updated message channel type is WhatsApp */ whatsapp = "whatsapp", } /** - * Message channel kind + * Message channel kind \ * {@link KnownAcsMessageChannelKind} can be used interchangeably with AcsMessageChannelKind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **whatsapp** + * **whatsapp**: Updated message channel type is WhatsApp */ export type AcsMessageChannelKind = string; @@ -1423,6 +3015,21 @@ export interface AcsMessageReceivedEventData extends AcsMessageEventData { interactiveContent: AcsMessageInteractiveContent; } +export function acsMessageReceivedEventDataDeserializer(item: any): AcsMessageReceivedEventData { + return { + from: item["from"], + to: item["to"], + receivedTimeStamp: new Date(item["receivedTimeStamp"]), + error: acsMessageChannelEventErrorDeserializer(item["error"]), + content: item["content"], + channelKind: item["channelType"], + mediaContent: acsMessageMediaContentDeserializer(item["media"]), + context: acsMessageContextDeserializer(item["context"]), + button: acsMessageButtonContentDeserializer(item["button"]), + interactiveContent: acsMessageInteractiveContentDeserializer(item["interactive"]), + }; +} + /** Message Media Content */ export interface AcsMessageMediaContent { /** The MIME type of the file this media represents */ @@ -1435,6 +3042,15 @@ export interface AcsMessageMediaContent { caption?: string; } +export function acsMessageMediaContentDeserializer(item: any): AcsMessageMediaContent { + return { + mimeType: item["mimeType"], + mediaId: item["id"], + fileName: item["fileName"], + caption: item["caption"], + }; +} + /** Message Context */ export interface AcsMessageContext { /** The WhatsApp ID for the customer who replied to an inbound message. */ @@ -1443,6 +3059,13 @@ export interface AcsMessageContext { messageId?: string; } +export function acsMessageContextDeserializer(item: any): AcsMessageContext { + return { + from: item["from"], + messageId: item["id"], + }; +} + /** Message Button Content */ export interface AcsMessageButtonContent { /** The Text of the button */ @@ -1451,6 +3074,13 @@ export interface AcsMessageButtonContent { payload?: string; } +export function acsMessageButtonContentDeserializer(item: any): AcsMessageButtonContent { + return { + text: item["text"], + payload: item["payload"], + }; +} + /** Message Interactive Content */ export interface AcsMessageInteractiveContent { /** The Message interactive reply type */ @@ -1461,24 +3091,32 @@ export interface AcsMessageInteractiveContent { listReply: AcsMessageInteractiveListReplyContent; } -/** Known values of {@link AcsInteractiveReplyKind} that the service accepts. */ +export function acsMessageInteractiveContentDeserializer(item: any): AcsMessageInteractiveContent { + return { + replyKind: item["type"], + buttonReply: acsMessageInteractiveButtonReplyContentDeserializer(item["buttonReply"]), + listReply: acsMessageInteractiveListReplyContentDeserializer(item["listReply"]), + }; +} + +/** Interactive reply kind */ export enum KnownAcsInteractiveReplyKind { - /** buttonReply */ + /** Messaged interactive reply type is ButtonReply */ buttonReply = "buttonReply", - /** listReply */ + /** Messaged interactive reply type is ListReply */ listReply = "listReply", - /** unknown */ + /** Messaged interactive reply type is Unknown */ unknown = "unknown", } /** - * Interactive reply kind + * Interactive reply kind \ * {@link KnownAcsInteractiveReplyKind} can be used interchangeably with AcsInteractiveReplyKind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **buttonReply** - * **listReply** - * **unknown** + * **buttonReply**: Messaged interactive reply type is ButtonReply \ + * **listReply**: Messaged interactive reply type is ListReply \ + * **unknown**: Messaged interactive reply type is Unknown */ export type AcsInteractiveReplyKind = string; @@ -1490,6 +3128,15 @@ export interface AcsMessageInteractiveButtonReplyContent { title?: string; } +export function acsMessageInteractiveButtonReplyContentDeserializer( + item: any, +): AcsMessageInteractiveButtonReplyContent { + return { + buttonId: item["id"], + title: item["title"], + }; +} + /** Message Interactive list reply content for a user to business message */ export interface AcsMessageInteractiveListReplyContent { /** The ID of the selected list item */ @@ -1500,6 +3147,16 @@ export interface AcsMessageInteractiveListReplyContent { description?: string; } +export function acsMessageInteractiveListReplyContentDeserializer( + item: any, +): AcsMessageInteractiveListReplyContent { + return { + listItemId: item["id"], + title: item["title"], + description: item["description"], + }; +} + /** The content of the event request message. */ export interface ContainerRegistryEventData { /** The event ID. */ @@ -1522,6 +3179,26 @@ export interface ContainerRegistryEventData { connectedRegistry?: ContainerRegistryEventConnectedRegistry; } +export function containerRegistryEventDataDeserializer(item: any): ContainerRegistryEventData { + return { + id: item["id"], + timestamp: new Date(item["timestamp"]), + action: item["action"], + location: item["location"], + target: containerRegistryEventTargetDeserializer(item["target"]), + request: !item["request"] + ? item["request"] + : containerRegistryEventRequestDeserializer(item["request"]), + actor: !item["actor"] ? item["actor"] : containerRegistryEventActorDeserializer(item["actor"]), + source: !item["source"] + ? item["source"] + : containerRegistryEventSourceDeserializer(item["source"]), + connectedRegistry: !item["connectedRegistry"] + ? item["connectedRegistry"] + : containerRegistryEventConnectedRegistryDeserializer(item["connectedRegistry"]), + }; +} + /** The target of the event. */ export interface ContainerRegistryEventTarget { /** The MIME type of the referenced object. */ @@ -1540,6 +3217,18 @@ export interface ContainerRegistryEventTarget { tag?: string; } +export function containerRegistryEventTargetDeserializer(item: any): ContainerRegistryEventTarget { + return { + mediaType: item["mediaType"], + size: item["size"], + digest: item["digest"], + length: item["length"], + repository: item["repository"], + url: item["url"], + tag: item["tag"], + }; +} + /** The request that generated the event. */ export interface ContainerRegistryEventRequest { /** The ID of the request that initiated the event. */ @@ -1554,12 +3243,30 @@ export interface ContainerRegistryEventRequest { useragent?: string; } +export function containerRegistryEventRequestDeserializer( + item: any, +): ContainerRegistryEventRequest { + return { + id: item["id"], + addr: item["addr"], + host: item["host"], + method: item["method"], + useragent: item["useragent"], + }; +} + /** The agent that initiated the event. For most situations, this could be from the authorization context of the request. */ export interface ContainerRegistryEventActor { /** The subject or username associated with the request context that generated the event. */ name?: string; } +export function containerRegistryEventActorDeserializer(item: any): ContainerRegistryEventActor { + return { + name: item["name"], + }; +} + /** The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. */ export interface ContainerRegistryEventSource { /** The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port. */ @@ -1568,18 +3275,77 @@ export interface ContainerRegistryEventSource { instanceID?: string; } +export function containerRegistryEventSourceDeserializer(item: any): ContainerRegistryEventSource { + return { + addr: item["addr"], + instanceID: item["instanceID"], + }; +} + /** The connected registry information if the event is generated by a connected registry. */ export interface ContainerRegistryEventConnectedRegistry { /** The name of the connected registry that generated this event. */ name: string; } +export function containerRegistryEventConnectedRegistryDeserializer( + item: any, +): ContainerRegistryEventConnectedRegistry { + return { + name: item["name"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImagePushed event. */ export interface ContainerRegistryImagePushedEventData extends ContainerRegistryEventData {} +export function containerRegistryImagePushedEventDataDeserializer( + item: any, +): ContainerRegistryImagePushedEventData { + return { + id: item["id"], + timestamp: new Date(item["timestamp"]), + action: item["action"], + location: item["location"], + target: containerRegistryEventTargetDeserializer(item["target"]), + request: !item["request"] + ? item["request"] + : containerRegistryEventRequestDeserializer(item["request"]), + actor: !item["actor"] ? item["actor"] : containerRegistryEventActorDeserializer(item["actor"]), + source: !item["source"] + ? item["source"] + : containerRegistryEventSourceDeserializer(item["source"]), + connectedRegistry: !item["connectedRegistry"] + ? item["connectedRegistry"] + : containerRegistryEventConnectedRegistryDeserializer(item["connectedRegistry"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImageDeleted event. */ export interface ContainerRegistryImageDeletedEventData extends ContainerRegistryEventData {} +export function containerRegistryImageDeletedEventDataDeserializer( + item: any, +): ContainerRegistryImageDeletedEventData { + return { + id: item["id"], + timestamp: new Date(item["timestamp"]), + action: item["action"], + location: item["location"], + target: containerRegistryEventTargetDeserializer(item["target"]), + request: !item["request"] + ? item["request"] + : containerRegistryEventRequestDeserializer(item["request"]), + actor: !item["actor"] ? item["actor"] : containerRegistryEventActorDeserializer(item["actor"]), + source: !item["source"] + ? item["source"] + : containerRegistryEventSourceDeserializer(item["source"]), + connectedRegistry: !item["connectedRegistry"] + ? item["connectedRegistry"] + : containerRegistryEventConnectedRegistryDeserializer(item["connectedRegistry"]), + }; +} + /** The content of the event request message. */ export interface ContainerRegistryArtifactEventData { /** The event ID. */ @@ -1596,6 +3362,21 @@ export interface ContainerRegistryArtifactEventData { connectedRegistry?: ContainerRegistryEventConnectedRegistry; } +export function containerRegistryArtifactEventDataDeserializer( + item: any, +): ContainerRegistryArtifactEventData { + return { + id: item["id"], + timestamp: new Date(item["timestamp"]), + action: item["action"], + location: item["location"], + target: containerRegistryArtifactEventTargetDeserializer(item["target"]), + connectedRegistry: !item["connectedRegistry"] + ? item["connectedRegistry"] + : containerRegistryEventConnectedRegistryDeserializer(item["connectedRegistry"]), + }; +} + /** The target of the event. */ export interface ContainerRegistryArtifactEventTarget { /** The MIME type of the artifact. */ @@ -1614,13 +3395,57 @@ export interface ContainerRegistryArtifactEventTarget { version?: string; } +export function containerRegistryArtifactEventTargetDeserializer( + item: any, +): ContainerRegistryArtifactEventTarget { + return { + mediaType: item["mediaType"], + size: item["size"], + digest: item["digest"], + repository: item["repository"], + tag: item["tag"], + name: item["name"], + version: item["version"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartPushed event. */ export interface ContainerRegistryChartPushedEventData extends ContainerRegistryArtifactEventData {} +export function containerRegistryChartPushedEventDataDeserializer( + item: any, +): ContainerRegistryChartPushedEventData { + return { + id: item["id"], + timestamp: new Date(item["timestamp"]), + action: item["action"], + location: item["location"], + target: containerRegistryArtifactEventTargetDeserializer(item["target"]), + connectedRegistry: !item["connectedRegistry"] + ? item["connectedRegistry"] + : containerRegistryEventConnectedRegistryDeserializer(item["connectedRegistry"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartDeleted event. */ export interface ContainerRegistryChartDeletedEventData extends ContainerRegistryArtifactEventData {} +export function containerRegistryChartDeletedEventDataDeserializer( + item: any, +): ContainerRegistryChartDeletedEventData { + return { + id: item["id"], + timestamp: new Date(item["timestamp"]), + action: item["action"], + location: item["location"], + target: containerRegistryArtifactEventTargetDeserializer(item["target"]), + connectedRegistry: !item["connectedRegistry"] + ? item["connectedRegistry"] + : containerRegistryEventConnectedRegistryDeserializer(item["connectedRegistry"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NewKubernetesVersionAvailable event */ export interface ContainerServiceNewKubernetesVersionAvailableEventData { /** The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource */ @@ -1633,38 +3458,105 @@ export interface ContainerServiceNewKubernetesVersionAvailableEventData { latestPreviewKubernetesVersion?: string; } +export function containerServiceNewKubernetesVersionAvailableEventDataDeserializer( + item: any, +): ContainerServiceNewKubernetesVersionAvailableEventData { + return { + latestSupportedKubernetesVersion: item["latestSupportedKubernetesVersion"], + latestStableKubernetesVersion: item["latestStableKubernetesVersion"], + lowestMinorKubernetesVersion: item["lowestMinorKubernetesVersion"], + latestPreviewKubernetesVersion: item["latestPreviewKubernetesVersion"], + }; +} + /** Schema of common properties of cluster support events */ export interface ContainerServiceClusterSupportEventData { /** The Kubernetes version of the ManagedCluster resource */ kubernetesVersion?: string; } +export function containerServiceClusterSupportEventDataDeserializer( + item: any, +): ContainerServiceClusterSupportEventData { + return { + kubernetesVersion: item["kubernetesVersion"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.ClusterSupportEnded event */ export interface ContainerServiceClusterSupportEndedEventData extends ContainerServiceClusterSupportEventData {} +export function containerServiceClusterSupportEndedEventDataDeserializer( + item: any, +): ContainerServiceClusterSupportEndedEventData { + return { + kubernetesVersion: item["kubernetesVersion"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.ClusterSupportEnding event */ export interface ContainerServiceClusterSupportEndingEventData extends ContainerServiceClusterSupportEventData {} +export function containerServiceClusterSupportEndingEventDataDeserializer( + item: any, +): ContainerServiceClusterSupportEndingEventData { + return { + kubernetesVersion: item["kubernetesVersion"], + }; +} + /** Schema of common properties of node pool rolling events */ export interface ContainerServiceNodePoolRollingEventData { /** The name of the node pool in the ManagedCluster resource */ nodePoolName?: string; } +export function containerServiceNodePoolRollingEventDataDeserializer( + item: any, +): ContainerServiceNodePoolRollingEventData { + return { + nodePoolName: item["nodePoolName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingStarted event */ export interface ContainerServiceNodePoolRollingStartedEventData extends ContainerServiceNodePoolRollingEventData {} +export function containerServiceNodePoolRollingStartedEventDataDeserializer( + item: any, +): ContainerServiceNodePoolRollingStartedEventData { + return { + nodePoolName: item["nodePoolName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingSucceeded event */ export interface ContainerServiceNodePoolRollingSucceededEventData extends ContainerServiceNodePoolRollingEventData {} +export function containerServiceNodePoolRollingSucceededEventDataDeserializer( + item: any, +): ContainerServiceNodePoolRollingSucceededEventData { + return { + nodePoolName: item["nodePoolName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NodePoolRollingFailed event */ export interface ContainerServiceNodePoolRollingFailedEventData extends ContainerServiceNodePoolRollingEventData {} +export function containerServiceNodePoolRollingFailedEventDataDeserializer( + item: any, +): ContainerServiceNodePoolRollingFailedEventData { + return { + nodePoolName: item["nodePoolName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.DataBox.CopyStarted event. */ export interface DataBoxCopyStartedEventData { /** Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. */ @@ -1675,24 +3567,32 @@ export interface DataBoxCopyStartedEventData { stageTime: Date; } -/** Known values of {@link DataBoxStageName} that the service accepts. */ +export function dataBoxCopyStartedEventDataDeserializer(item: any): DataBoxCopyStartedEventData { + return { + serialNumber: item["serialNumber"], + stageName: item["stageName"], + stageTime: new Date(item["stageTime"]), + }; +} + +/** Schema of DataBox Stage Name enumeration. */ export enum KnownDataBoxStageName { - /** CopyStarted */ + /** Copy has started */ CopyStarted = "CopyStarted", - /** CopyCompleted */ + /** Copy has completed */ CopyCompleted = "CopyCompleted", - /** OrderCompleted */ + /** Order has been completed */ OrderCompleted = "OrderCompleted", } /** - * Schema of DataBox Stage Name enumeration. + * Schema of DataBox Stage Name enumeration. \ * {@link KnownDataBoxStageName} can be used interchangeably with DataBoxStageName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **CopyStarted** - * **CopyCompleted** - * **OrderCompleted** + * **CopyStarted**: Copy has started \ + * **CopyCompleted**: Copy has completed \ + * **OrderCompleted**: Order has been completed */ export type DataBoxStageName = string; @@ -1706,6 +3606,16 @@ export interface DataBoxCopyCompletedEventData { stageTime: Date; } +export function dataBoxCopyCompletedEventDataDeserializer( + item: any, +): DataBoxCopyCompletedEventData { + return { + serialNumber: item["serialNumber"], + stageName: item["stageName"], + stageTime: new Date(item["stageTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.DataBox.OrderCompleted event. */ export interface DataBoxOrderCompletedEventData { /** Serial Number of the device associated with the event. The list is comma separated if more than one serial number is associated. */ @@ -1716,6 +3626,16 @@ export interface DataBoxOrderCompletedEventData { stageTime: Date; } +export function dataBoxOrderCompletedEventDataDeserializer( + item: any, +): DataBoxOrderCompletedEventData { + return { + serialNumber: item["serialNumber"], + stageName: item["stageName"], + stageTime: new Date(item["stageTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.EventHub.CaptureFileCreated event. */ export interface EventHubCaptureFileCreatedEventData { /** The path to the capture file. */ @@ -1738,43 +3658,128 @@ export interface EventHubCaptureFileCreatedEventData { lastEnqueueTime: Date; } +export function eventHubCaptureFileCreatedEventDataDeserializer( + item: any, +): EventHubCaptureFileCreatedEventData { + return { + fileUrl: item["fileUrl"], + fileType: item["fileType"], + partitionId: item["partitionId"], + sizeInBytes: item["sizeInBytes"], + eventCount: item["eventCount"], + firstSequenceNumber: item["firstSequenceNumber"], + lastSequenceNumber: item["lastSequenceNumber"], + firstEnqueueTime: new Date(item["firstEnqueueTime"]), + lastEnqueueTime: new Date(item["lastEnqueueTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Geofence event (GeofenceEntered, GeofenceExited, GeofenceResult). */ export interface MapsGeofenceEvent { /** Lists of the geometry ID of the geofence which is expired relative to the user time in the request. */ - expiredGeofenceGeometryId?: string[]; + expiredGeofenceGeometryId: string[]; /** Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. */ geometries: MapsGeofenceGeometry[]; /** Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. */ - invalidPeriodGeofenceGeometryId?: string[]; + invalidPeriodGeofenceGeometryId: string[]; /** True if at least one event is published to the Azure Maps event subscriber, false if no event is published to the Azure Maps event subscriber. */ - isEventPublished?: boolean; + isEventPublished: boolean; +} + +export function mapsGeofenceEventDeserializer(item: any): MapsGeofenceEvent { + return { + expiredGeofenceGeometryId: item["expiredGeofenceGeometryId"].map((p: any) => { + return p; + }), + geometries: mapsGeofenceGeometryArrayDeserializer(item["geometries"]), + invalidPeriodGeofenceGeometryId: item["invalidPeriodGeofenceGeometryId"].map((p: any) => { + return p; + }), + isEventPublished: item["isEventPublished"], + }; +} + +export function mapsGeofenceGeometryArrayDeserializer(result: Array): any[] { + return result.map((item) => { + return mapsGeofenceGeometryDeserializer(item); + }); } /** The geofence geometry. */ export interface MapsGeofenceGeometry { /** ID of the device. */ - deviceId?: string; + deviceId: string; /** Distance from the coordinate to the closest border of the geofence. Positive means the coordinate is outside of the geofence. If the coordinate is outside of the geofence, but more than the value of searchBuffer away from the closest geofence border, then the value is 999. Negative means the coordinate is inside of the geofence. If the coordinate is inside the polygon, but more than the value of searchBuffer away from the closest geofencing border,then the value is -999. A value of 999 means that there is great confidence the coordinate is well outside the geofence. A value of -999 means that there is great confidence the coordinate is well within the geofence. */ - distance?: number; + distance: number; /** The unique ID for the geofence geometry. */ - geometryId?: string; + geometryId: string; /** Latitude of the nearest point of the geometry. */ - nearestLat?: number; + nearestLat: number; /** Longitude of the nearest point of the geometry. */ - nearestLon?: number; + nearestLon: number; /** The unique id returned from user upload service when uploading a geofence. Will not be included in geofencing post API. */ udId?: string; } +export function mapsGeofenceGeometryDeserializer(item: any): MapsGeofenceGeometry { + return { + deviceId: item["deviceId"], + distance: item["distance"], + geometryId: item["geometryId"], + nearestLat: item["nearestLat"], + nearestLon: item["nearestLon"], + udId: item["udId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. */ export interface MapsGeofenceEnteredEventData extends MapsGeofenceEvent {} +export function mapsGeofenceEnteredEventDataDeserializer(item: any): MapsGeofenceEnteredEventData { + return { + expiredGeofenceGeometryId: item["expiredGeofenceGeometryId"].map((p: any) => { + return p; + }), + geometries: mapsGeofenceGeometryArrayDeserializer(item["geometries"]), + invalidPeriodGeofenceGeometryId: item["invalidPeriodGeofenceGeometryId"].map((p: any) => { + return p; + }), + isEventPublished: item["isEventPublished"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. */ export interface MapsGeofenceExitedEventData extends MapsGeofenceEvent {} +export function mapsGeofenceExitedEventDataDeserializer(item: any): MapsGeofenceExitedEventData { + return { + expiredGeofenceGeometryId: item["expiredGeofenceGeometryId"].map((p: any) => { + return p; + }), + geometries: mapsGeofenceGeometryArrayDeserializer(item["geometries"]), + invalidPeriodGeofenceGeometryId: item["invalidPeriodGeofenceGeometryId"].map((p: any) => { + return p; + }), + isEventPublished: item["isEventPublished"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceResult event. */ export interface MapsGeofenceResultEventData extends MapsGeofenceEvent {} +export function mapsGeofenceResultEventDataDeserializer(item: any): MapsGeofenceResultEventData { + return { + expiredGeofenceGeometryId: item["expiredGeofenceGeometryId"].map((p: any) => { + return p; + }), + geometries: mapsGeofenceGeometryArrayDeserializer(item["geometries"]), + invalidPeriodGeofenceGeometryId: item["invalidPeriodGeofenceGeometryId"].map((p: any) => { + return p; + }), + isEventPublished: item["isEventPublished"], + }; +} + /** Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted). */ export interface DeviceLifeCycleEvent { /** The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '. */ @@ -1785,6 +3790,14 @@ export interface DeviceLifeCycleEvent { twin: DeviceTwinInfo; } +export function deviceLifeCycleEventDeserializer(item: any): DeviceLifeCycleEvent { + return { + deviceId: item["deviceId"], + hubName: item["hubName"], + twin: deviceTwinInfoDeserializer(item["twin"]), + }; +} + /** Information about the device twin, which is the cloud representation of application device metadata. */ export interface DeviceTwinInfo { /** Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority. */ @@ -1811,6 +3824,22 @@ export interface DeviceTwinInfo { x509Thumbprint: DeviceTwinInfoX509Thumbprint; } +export function deviceTwinInfoDeserializer(item: any): DeviceTwinInfo { + return { + authenticationType: item["authenticationType"], + cloudToDeviceMessageCount: item["cloudToDeviceMessageCount"], + connectionState: item["connectionState"], + deviceId: item["deviceId"], + etag: item["etag"], + lastActivityTime: item["lastActivityTime"], + properties: deviceTwinInfoPropertiesDeserializer(item["properties"]), + status: item["status"], + statusUpdateTime: item["statusUpdateTime"], + version: item["version"], + x509Thumbprint: deviceTwinInfoX509ThumbprintDeserializer(item["x509Thumbprint"]), + }; +} + /** Properties JSON element. */ export interface DeviceTwinInfoProperties { /** A portion of the properties that can be written only by the application back-end, and read by the device. */ @@ -1819,6 +3848,13 @@ export interface DeviceTwinInfoProperties { reported: DeviceTwin; } +export function deviceTwinInfoPropertiesDeserializer(item: any): DeviceTwinInfoProperties { + return { + desired: deviceTwinDeserializer(item["desired"]), + reported: deviceTwinDeserializer(item["reported"]), + }; +} + /** A portion of the properties that can be written only by the application back-end, and read by the device. */ export interface DeviceTwin { /** Metadata information for the properties JSON document. */ @@ -1827,12 +3863,25 @@ export interface DeviceTwin { version: number; } +export function deviceTwinDeserializer(item: any): DeviceTwin { + return { + metadata: deviceTwinMetadataDeserializer(item["metadata"]), + version: item["version"], + }; +} + /** Metadata information for the properties JSON document. */ export interface DeviceTwinMetadata { /** The ISO8601 timestamp of the last time the properties were updated. */ lastUpdated: string; } +export function deviceTwinMetadataDeserializer(item: any): DeviceTwinMetadata { + return { + lastUpdated: item["lastUpdated"], + }; +} + /** The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate. */ export interface DeviceTwinInfoX509Thumbprint { /** Primary thumbprint for the x509 certificate. */ @@ -1841,6 +3890,13 @@ export interface DeviceTwinInfoX509Thumbprint { secondaryThumbprint: string; } +export function deviceTwinInfoX509ThumbprintDeserializer(item: any): DeviceTwinInfoX509Thumbprint { + return { + primaryThumbprint: item["primaryThumbprint"], + secondaryThumbprint: item["secondaryThumbprint"], + }; +} + /** Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected). */ export interface DeviceConnectionStateEvent { /** The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = `@` ; $ '. */ @@ -1853,12 +3909,31 @@ export interface DeviceConnectionStateEvent { deviceConnectionStateEventInfo: DeviceConnectionStateEventInfo; } +export function deviceConnectionStateEventDeserializer(item: any): DeviceConnectionStateEvent { + return { + deviceId: item["deviceId"], + moduleId: item["moduleId"], + hubName: item["hubName"], + deviceConnectionStateEventInfo: deviceConnectionStateEventInfoDeserializer( + item["deviceConnectionStateEventInfo"], + ), + }; +} + /** Information about the device connection state event. */ export interface DeviceConnectionStateEventInfo { /** Sequence number is string representation of a hexadecimal number. string compare can be used to identify the larger number because both in ASCII and HEX numbers come after alphabets. If you are converting the string to hex, then the number is a 256 bit number. */ sequenceNumber: string; } +export function deviceConnectionStateEventInfoDeserializer( + item: any, +): DeviceConnectionStateEventInfo { + return { + sequenceNumber: item["sequenceNumber"], + }; +} + /** Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). */ export interface DeviceTelemetryEvent { /** The content of the message from the device. */ @@ -1869,21 +3944,81 @@ export interface DeviceTelemetryEvent { systemProperties: Record; } +export function deviceTelemetryEventDeserializer(item: any): DeviceTelemetryEvent { + return { + body: item["body"], + properties: item["properties"], + systemProperties: item["systemProperties"], + }; +} + /** Event data for Microsoft.Devices.DeviceCreated event. */ export interface IotHubDeviceCreatedEventData extends DeviceLifeCycleEvent {} +export function iotHubDeviceCreatedEventDataDeserializer(item: any): IotHubDeviceCreatedEventData { + return { + deviceId: item["deviceId"], + hubName: item["hubName"], + twin: deviceTwinInfoDeserializer(item["twin"]), + }; +} + /** Event data for Microsoft.Devices.DeviceDeleted event. */ export interface IotHubDeviceDeletedEventData extends DeviceLifeCycleEvent {} +export function iotHubDeviceDeletedEventDataDeserializer(item: any): IotHubDeviceDeletedEventData { + return { + deviceId: item["deviceId"], + hubName: item["hubName"], + twin: deviceTwinInfoDeserializer(item["twin"]), + }; +} + /** Event data for Microsoft.Devices.DeviceConnected event. */ export interface IotHubDeviceConnectedEventData extends DeviceConnectionStateEvent {} +export function iotHubDeviceConnectedEventDataDeserializer( + item: any, +): IotHubDeviceConnectedEventData { + return { + deviceId: item["deviceId"], + moduleId: item["moduleId"], + hubName: item["hubName"], + deviceConnectionStateEventInfo: deviceConnectionStateEventInfoDeserializer( + item["deviceConnectionStateEventInfo"], + ), + }; +} + /** Event data for Microsoft.Devices.DeviceDisconnected event. */ export interface IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEvent {} +export function iotHubDeviceDisconnectedEventDataDeserializer( + item: any, +): IotHubDeviceDisconnectedEventData { + return { + deviceId: item["deviceId"], + moduleId: item["moduleId"], + hubName: item["hubName"], + deviceConnectionStateEventInfo: deviceConnectionStateEventInfoDeserializer( + item["deviceConnectionStateEventInfo"], + ), + }; +} + /** Event data for Microsoft.Devices.DeviceTelemetry event. */ export interface IotHubDeviceTelemetryEventData extends DeviceTelemetryEvent {} +export function iotHubDeviceTelemetryEventDataDeserializer( + item: any, +): IotHubDeviceTelemetryEventData { + return { + body: item["body"], + properties: item["properties"], + systemProperties: item["systemProperties"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceCreated event. */ export interface HealthcareFhirResourceCreatedEventData { /** Type of HL7 FHIR resource. */ @@ -1896,498 +4031,509 @@ export interface HealthcareFhirResourceCreatedEventData { resourceVersionId: number; } -/** Known values of {@link HealthcareFhirResourceType} that the service accepts. */ +export function healthcareFhirResourceCreatedEventDataDeserializer( + item: any, +): HealthcareFhirResourceCreatedEventData { + return { + resourceType: item["resourceType"], + resourceFhirAccount: item["resourceFhirAccount"], + resourceFhirId: item["resourceFhirId"], + resourceVersionId: item["resourceVersionId"], + }; +} + +/** Schema of FHIR resource type enumeration. */ export enum KnownHealthcareFhirResourceType { - /** Account */ + /** The FHIR resource type defined in STU3 and R4. */ Account = "Account", - /** ActivityDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ ActivityDefinition = "ActivityDefinition", - /** AdverseEvent */ + /** The FHIR resource type defined in STU3 and R4. */ AdverseEvent = "AdverseEvent", - /** AllergyIntolerance */ + /** The FHIR resource type defined in STU3 and R4. */ AllergyIntolerance = "AllergyIntolerance", - /** Appointment */ + /** The FHIR resource type defined in STU3 and R4. */ Appointment = "Appointment", - /** AppointmentResponse */ + /** The FHIR resource type defined in STU3 and R4. */ AppointmentResponse = "AppointmentResponse", - /** AuditEvent */ + /** The FHIR resource type defined in STU3 and R4. */ AuditEvent = "AuditEvent", - /** Basic */ + /** The FHIR resource type defined in STU3 and R4. */ Basic = "Basic", - /** Binary */ + /** The FHIR resource type defined in STU3 and R4. */ Binary = "Binary", - /** BiologicallyDerivedProduct */ + /** The FHIR resource type defined in R4. */ BiologicallyDerivedProduct = "BiologicallyDerivedProduct", - /** BodySite */ + /** The FHIR resource type defined in STU3. */ BodySite = "BodySite", - /** BodyStructure */ + /** The FHIR resource type defined in R4. */ BodyStructure = "BodyStructure", - /** Bundle */ + /** The FHIR resource type defined in STU3 and R4. */ Bundle = "Bundle", - /** CapabilityStatement */ + /** The FHIR resource type defined in STU3 and R4. */ CapabilityStatement = "CapabilityStatement", - /** CarePlan */ + /** The FHIR resource type defined in STU3 and R4. */ CarePlan = "CarePlan", - /** CareTeam */ + /** The FHIR resource type defined in STU3 and R4. */ CareTeam = "CareTeam", - /** CatalogEntry */ + /** The FHIR resource type defined in R4. */ CatalogEntry = "CatalogEntry", - /** ChargeItem */ + /** The FHIR resource type defined in STU3 and R4. */ ChargeItem = "ChargeItem", - /** ChargeItemDefinition */ + /** The FHIR resource type defined in R4. */ ChargeItemDefinition = "ChargeItemDefinition", - /** Claim */ + /** The FHIR resource type defined in STU3 and R4. */ Claim = "Claim", - /** ClaimResponse */ + /** The FHIR resource type defined in STU3 and R4. */ ClaimResponse = "ClaimResponse", - /** ClinicalImpression */ + /** The FHIR resource type defined in STU3 and R4. */ ClinicalImpression = "ClinicalImpression", - /** CodeSystem */ + /** The FHIR resource type defined in STU3 and R4. */ CodeSystem = "CodeSystem", - /** Communication */ + /** The FHIR resource type defined in STU3 and R4. */ Communication = "Communication", - /** CommunicationRequest */ + /** The FHIR resource type defined in STU3 and R4. */ CommunicationRequest = "CommunicationRequest", - /** CompartmentDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ CompartmentDefinition = "CompartmentDefinition", - /** Composition */ + /** The FHIR resource type defined in STU3 and R4. */ Composition = "Composition", - /** ConceptMap */ + /** The FHIR resource type defined in STU3 and R4. */ ConceptMap = "ConceptMap", - /** Condition */ + /** The FHIR resource type defined in STU3 and R4. */ Condition = "Condition", - /** Consent */ + /** The FHIR resource type defined in STU3 and R4. */ Consent = "Consent", - /** Contract */ + /** The FHIR resource type defined in STU3 and R4. */ Contract = "Contract", - /** Coverage */ + /** The FHIR resource type defined in STU3 and R4. */ Coverage = "Coverage", - /** CoverageEligibilityRequest */ + /** The FHIR resource type defined in R4. */ CoverageEligibilityRequest = "CoverageEligibilityRequest", - /** CoverageEligibilityResponse */ + /** The FHIR resource type defined in R4. */ CoverageEligibilityResponse = "CoverageEligibilityResponse", - /** DataElement */ + /** The FHIR resource type defined in STU3. */ DataElement = "DataElement", - /** DetectedIssue */ + /** The FHIR resource type defined in STU3 and R4. */ DetectedIssue = "DetectedIssue", - /** Device */ + /** The FHIR resource type defined in STU3 and R4. */ Device = "Device", - /** DeviceComponent */ + /** The FHIR resource type defined in STU3. */ DeviceComponent = "DeviceComponent", - /** DeviceDefinition */ + /** The FHIR resource type defined in R4. */ DeviceDefinition = "DeviceDefinition", - /** DeviceMetric */ + /** The FHIR resource type defined in STU3 and R4. */ DeviceMetric = "DeviceMetric", - /** DeviceRequest */ + /** The FHIR resource type defined in STU3 and R4. */ DeviceRequest = "DeviceRequest", - /** DeviceUseStatement */ + /** The FHIR resource type defined in STU3 and R4. */ DeviceUseStatement = "DeviceUseStatement", - /** DiagnosticReport */ + /** The FHIR resource type defined in STU3 and R4. */ DiagnosticReport = "DiagnosticReport", - /** DocumentManifest */ + /** The FHIR resource type defined in STU3 and R4. */ DocumentManifest = "DocumentManifest", - /** DocumentReference */ + /** The FHIR resource type defined in STU3 and R4. */ DocumentReference = "DocumentReference", - /** DomainResource */ + /** The FHIR resource type defined in STU3 and R4. */ DomainResource = "DomainResource", - /** EffectEvidenceSynthesis */ + /** The FHIR resource type defined in R4. */ EffectEvidenceSynthesis = "EffectEvidenceSynthesis", - /** EligibilityRequest */ + /** The FHIR resource type defined in STU3. */ EligibilityRequest = "EligibilityRequest", - /** EligibilityResponse */ + /** The FHIR resource type defined in STU3. */ EligibilityResponse = "EligibilityResponse", - /** Encounter */ + /** The FHIR resource type defined in STU3 and R4. */ Encounter = "Encounter", - /** Endpoint */ + /** The FHIR resource type defined in STU3 and R4. */ Endpoint = "Endpoint", - /** EnrollmentRequest */ + /** The FHIR resource type defined in STU3 and R4. */ EnrollmentRequest = "EnrollmentRequest", - /** EnrollmentResponse */ + /** The FHIR resource type defined in STU3 and R4. */ EnrollmentResponse = "EnrollmentResponse", - /** EpisodeOfCare */ + /** The FHIR resource type defined in STU3 and R4. */ EpisodeOfCare = "EpisodeOfCare", - /** EventDefinition */ + /** The FHIR resource type defined in R4. */ EventDefinition = "EventDefinition", - /** Evidence */ + /** The FHIR resource type defined in R4. */ Evidence = "Evidence", - /** EvidenceVariable */ + /** The FHIR resource type defined in R4. */ EvidenceVariable = "EvidenceVariable", - /** ExampleScenario */ + /** The FHIR resource type defined in R4. */ ExampleScenario = "ExampleScenario", - /** ExpansionProfile */ + /** The FHIR resource type defined in STU3. */ ExpansionProfile = "ExpansionProfile", - /** ExplanationOfBenefit */ + /** The FHIR resource type defined in STU3 and R4. */ ExplanationOfBenefit = "ExplanationOfBenefit", - /** FamilyMemberHistory */ + /** The FHIR resource type defined in STU3 and R4. */ FamilyMemberHistory = "FamilyMemberHistory", - /** Flag */ + /** The FHIR resource type defined in STU3 and R4. */ Flag = "Flag", - /** Goal */ + /** The FHIR resource type defined in STU3 and R4. */ Goal = "Goal", - /** GraphDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ GraphDefinition = "GraphDefinition", - /** Group */ + /** The FHIR resource type defined in STU3 and R4. */ Group = "Group", - /** GuidanceResponse */ + /** The FHIR resource type defined in STU3 and R4. */ GuidanceResponse = "GuidanceResponse", - /** HealthcareService */ + /** The FHIR resource type defined in STU3 and R4. */ HealthcareService = "HealthcareService", - /** ImagingManifest */ + /** The FHIR resource type defined in STU3. */ ImagingManifest = "ImagingManifest", - /** ImagingStudy */ + /** The FHIR resource type defined in STU3 and R4. */ ImagingStudy = "ImagingStudy", - /** Immunization */ + /** The FHIR resource type defined in STU3 and R4. */ Immunization = "Immunization", - /** ImmunizationEvaluation */ + /** The FHIR resource type defined in R4. */ ImmunizationEvaluation = "ImmunizationEvaluation", - /** ImmunizationRecommendation */ + /** The FHIR resource type defined in STU3 and R4. */ ImmunizationRecommendation = "ImmunizationRecommendation", - /** ImplementationGuide */ + /** The FHIR resource type defined in STU3 and R4. */ ImplementationGuide = "ImplementationGuide", - /** InsurancePlan */ + /** The FHIR resource type defined in R4. */ InsurancePlan = "InsurancePlan", - /** Invoice */ + /** The FHIR resource type defined in R4. */ Invoice = "Invoice", - /** Library */ + /** The FHIR resource type defined in STU3 and R4. */ Library = "Library", - /** Linkage */ + /** The FHIR resource type defined in STU3 and R4. */ Linkage = "Linkage", - /** List */ + /** The FHIR resource type defined in STU3 and R4. */ List = "List", - /** Location */ + /** The FHIR resource type defined in STU3 and R4. */ Location = "Location", - /** Measure */ + /** The FHIR resource type defined in STU3 and R4. */ Measure = "Measure", - /** MeasureReport */ + /** The FHIR resource type defined in STU3 and R4. */ MeasureReport = "MeasureReport", - /** Media */ + /** The FHIR resource type defined in STU3 and R4. */ Media = "Media", - /** Medication */ + /** The FHIR resource type defined in STU3 and R4. */ Medication = "Medication", - /** MedicationAdministration */ + /** The FHIR resource type defined in STU3 and R4. */ MedicationAdministration = "MedicationAdministration", - /** MedicationDispense */ + /** The FHIR resource type defined in STU3 and R4. */ MedicationDispense = "MedicationDispense", - /** MedicationKnowledge */ + /** The FHIR resource type defined in R4. */ MedicationKnowledge = "MedicationKnowledge", - /** MedicationRequest */ + /** The FHIR resource type defined in STU3 and R4. */ MedicationRequest = "MedicationRequest", - /** MedicationStatement */ + /** The FHIR resource type defined in STU3 and R4. */ MedicationStatement = "MedicationStatement", - /** MedicinalProduct */ + /** The FHIR resource type defined in R4. */ MedicinalProduct = "MedicinalProduct", - /** MedicinalProductAuthorization */ + /** The FHIR resource type defined in R4. */ MedicinalProductAuthorization = "MedicinalProductAuthorization", - /** MedicinalProductContraindication */ + /** The FHIR resource type defined in R4. */ MedicinalProductContraindication = "MedicinalProductContraindication", - /** MedicinalProductIndication */ + /** The FHIR resource type defined in R4. */ MedicinalProductIndication = "MedicinalProductIndication", - /** MedicinalProductIngredient */ + /** The FHIR resource type defined in R4. */ MedicinalProductIngredient = "MedicinalProductIngredient", - /** MedicinalProductInteraction */ + /** The FHIR resource type defined in R4. */ MedicinalProductInteraction = "MedicinalProductInteraction", - /** MedicinalProductManufactured */ + /** The FHIR resource type defined in R4. */ MedicinalProductManufactured = "MedicinalProductManufactured", - /** MedicinalProductPackaged */ + /** The FHIR resource type defined in R4. */ MedicinalProductPackaged = "MedicinalProductPackaged", - /** MedicinalProductPharmaceutical */ + /** The FHIR resource type defined in R4. */ MedicinalProductPharmaceutical = "MedicinalProductPharmaceutical", - /** MedicinalProductUndesirableEffect */ + /** The FHIR resource type defined in R4. */ MedicinalProductUndesirableEffect = "MedicinalProductUndesirableEffect", - /** MessageDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ MessageDefinition = "MessageDefinition", - /** MessageHeader */ + /** The FHIR resource type defined in STU3 and R4. */ MessageHeader = "MessageHeader", - /** MolecularSequence */ + /** The FHIR resource type defined in R4. */ MolecularSequence = "MolecularSequence", - /** NamingSystem */ + /** The FHIR resource type defined in STU3 and R4. */ NamingSystem = "NamingSystem", - /** NutritionOrder */ + /** The FHIR resource type defined in STU3 and R4. */ NutritionOrder = "NutritionOrder", - /** Observation */ + /** The FHIR resource type defined in STU3 and R4. */ Observation = "Observation", - /** ObservationDefinition */ + /** The FHIR resource type defined in R4. */ ObservationDefinition = "ObservationDefinition", - /** OperationDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ OperationDefinition = "OperationDefinition", - /** OperationOutcome */ + /** The FHIR resource type defined in STU3 and R4. */ OperationOutcome = "OperationOutcome", - /** Organization */ + /** The FHIR resource type defined in STU3 and R4. */ Organization = "Organization", - /** OrganizationAffiliation */ + /** The FHIR resource type defined in R4. */ OrganizationAffiliation = "OrganizationAffiliation", - /** Parameters */ + /** The FHIR resource type defined in STU3 and R4. */ Parameters = "Parameters", - /** Patient */ + /** The FHIR resource type defined in STU3 and R4. */ Patient = "Patient", - /** PaymentNotice */ + /** The FHIR resource type defined in STU3 and R4. */ PaymentNotice = "PaymentNotice", - /** PaymentReconciliation */ + /** The FHIR resource type defined in STU3 and R4. */ PaymentReconciliation = "PaymentReconciliation", - /** Person */ + /** The FHIR resource type defined in STU3 and R4. */ Person = "Person", - /** PlanDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ PlanDefinition = "PlanDefinition", - /** Practitioner */ + /** The FHIR resource type defined in STU3 and R4. */ Practitioner = "Practitioner", - /** PractitionerRole */ + /** The FHIR resource type defined in STU3 and R4. */ PractitionerRole = "PractitionerRole", - /** Procedure */ + /** The FHIR resource type defined in STU3 and R4. */ Procedure = "Procedure", - /** ProcedureRequest */ + /** The FHIR resource type defined in STU3. */ ProcedureRequest = "ProcedureRequest", - /** ProcessRequest */ + /** The FHIR resource type defined in STU3. */ ProcessRequest = "ProcessRequest", - /** ProcessResponse */ + /** The FHIR resource type defined in STU3. */ ProcessResponse = "ProcessResponse", - /** Provenance */ + /** The FHIR resource type defined in STU3 and R4. */ Provenance = "Provenance", - /** Questionnaire */ + /** The FHIR resource type defined in STU3 and R4. */ Questionnaire = "Questionnaire", - /** QuestionnaireResponse */ + /** The FHIR resource type defined in STU3 and R4. */ QuestionnaireResponse = "QuestionnaireResponse", - /** ReferralRequest */ + /** The FHIR resource type defined in STU3. */ ReferralRequest = "ReferralRequest", - /** RelatedPerson */ + /** The FHIR resource type defined in STU3 and R4. */ RelatedPerson = "RelatedPerson", - /** RequestGroup */ + /** The FHIR resource type defined in STU3 and R4. */ RequestGroup = "RequestGroup", - /** ResearchDefinition */ + /** The FHIR resource type defined in R4. */ ResearchDefinition = "ResearchDefinition", - /** ResearchElementDefinition */ + /** The FHIR resource type defined in R4. */ ResearchElementDefinition = "ResearchElementDefinition", - /** ResearchStudy */ + /** The FHIR resource type defined in STU3 and R4. */ ResearchStudy = "ResearchStudy", - /** ResearchSubject */ + /** The FHIR resource type defined in STU3 and R4. */ ResearchSubject = "ResearchSubject", - /** Resource */ + /** The FHIR resource type defined in STU3 and R4. */ Resource = "Resource", - /** RiskAssessment */ + /** The FHIR resource type defined in STU3 and R4. */ RiskAssessment = "RiskAssessment", - /** RiskEvidenceSynthesis */ + /** The FHIR resource type defined in R4. */ RiskEvidenceSynthesis = "RiskEvidenceSynthesis", - /** Schedule */ + /** The FHIR resource type defined in STU3 and R4. */ Schedule = "Schedule", - /** SearchParameter */ + /** The FHIR resource type defined in STU3 and R4. */ SearchParameter = "SearchParameter", - /** Sequence */ + /** The FHIR resource type defined in STU3. */ Sequence = "Sequence", - /** ServiceDefinition */ + /** The FHIR resource type defined in STU3. */ ServiceDefinition = "ServiceDefinition", - /** ServiceRequest */ + /** The FHIR resource type defined in R4. */ ServiceRequest = "ServiceRequest", - /** Slot */ + /** The FHIR resource type defined in STU3 and R4. */ Slot = "Slot", - /** Specimen */ + /** The FHIR resource type defined in STU3 and R4. */ Specimen = "Specimen", - /** SpecimenDefinition */ + /** The FHIR resource type defined in R4. */ SpecimenDefinition = "SpecimenDefinition", - /** StructureDefinition */ + /** The FHIR resource type defined in STU3 and R4. */ StructureDefinition = "StructureDefinition", - /** StructureMap */ + /** The FHIR resource type defined in STU3 and R4. */ StructureMap = "StructureMap", - /** Subscription */ + /** The FHIR resource type defined in STU3 and R4. */ Subscription = "Subscription", - /** Substance */ + /** The FHIR resource type defined in STU3 and R4. */ Substance = "Substance", - /** SubstanceNucleicAcid */ + /** The FHIR resource type defined in R4. */ SubstanceNucleicAcid = "SubstanceNucleicAcid", - /** SubstancePolymer */ + /** The FHIR resource type defined in R4. */ SubstancePolymer = "SubstancePolymer", - /** SubstanceProtein */ + /** The FHIR resource type defined in R4. */ SubstanceProtein = "SubstanceProtein", - /** SubstanceReferenceInformation */ + /** The FHIR resource type defined in R4. */ SubstanceReferenceInformation = "SubstanceReferenceInformation", - /** SubstanceSourceMaterial */ + /** The FHIR resource type defined in R4. */ SubstanceSourceMaterial = "SubstanceSourceMaterial", - /** SubstanceSpecification */ + /** The FHIR resource type defined in R4. */ SubstanceSpecification = "SubstanceSpecification", - /** SupplyDelivery */ + /** The FHIR resource type defined in STU3 and R4. */ SupplyDelivery = "SupplyDelivery", - /** SupplyRequest */ + /** The FHIR resource type defined in STU3 and R4. */ SupplyRequest = "SupplyRequest", - /** Task */ + /** The FHIR resource type defined in STU3 and R4. */ Task = "Task", - /** TerminologyCapabilities */ + /** The FHIR resource type defined in R4. */ TerminologyCapabilities = "TerminologyCapabilities", - /** TestReport */ + /** The FHIR resource type defined in STU3 and R4. */ TestReport = "TestReport", - /** TestScript */ + /** The FHIR resource type defined in STU3 and R4. */ TestScript = "TestScript", - /** ValueSet */ + /** The FHIR resource type defined in STU3 and R4. */ ValueSet = "ValueSet", - /** VerificationResult */ + /** The FHIR resource type defined in R4. */ VerificationResult = "VerificationResult", - /** VisionPrescription */ + /** The FHIR resource type defined in STU3 and R4. */ VisionPrescription = "VisionPrescription", } /** - * Schema of FHIR resource type enumeration. + * Schema of FHIR resource type enumeration. \ * {@link KnownHealthcareFhirResourceType} can be used interchangeably with HealthcareFhirResourceType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Account** - * **ActivityDefinition** - * **AdverseEvent** - * **AllergyIntolerance** - * **Appointment** - * **AppointmentResponse** - * **AuditEvent** - * **Basic** - * **Binary** - * **BiologicallyDerivedProduct** - * **BodySite** - * **BodyStructure** - * **Bundle** - * **CapabilityStatement** - * **CarePlan** - * **CareTeam** - * **CatalogEntry** - * **ChargeItem** - * **ChargeItemDefinition** - * **Claim** - * **ClaimResponse** - * **ClinicalImpression** - * **CodeSystem** - * **Communication** - * **CommunicationRequest** - * **CompartmentDefinition** - * **Composition** - * **ConceptMap** - * **Condition** - * **Consent** - * **Contract** - * **Coverage** - * **CoverageEligibilityRequest** - * **CoverageEligibilityResponse** - * **DataElement** - * **DetectedIssue** - * **Device** - * **DeviceComponent** - * **DeviceDefinition** - * **DeviceMetric** - * **DeviceRequest** - * **DeviceUseStatement** - * **DiagnosticReport** - * **DocumentManifest** - * **DocumentReference** - * **DomainResource** - * **EffectEvidenceSynthesis** - * **EligibilityRequest** - * **EligibilityResponse** - * **Encounter** - * **Endpoint** - * **EnrollmentRequest** - * **EnrollmentResponse** - * **EpisodeOfCare** - * **EventDefinition** - * **Evidence** - * **EvidenceVariable** - * **ExampleScenario** - * **ExpansionProfile** - * **ExplanationOfBenefit** - * **FamilyMemberHistory** - * **Flag** - * **Goal** - * **GraphDefinition** - * **Group** - * **GuidanceResponse** - * **HealthcareService** - * **ImagingManifest** - * **ImagingStudy** - * **Immunization** - * **ImmunizationEvaluation** - * **ImmunizationRecommendation** - * **ImplementationGuide** - * **InsurancePlan** - * **Invoice** - * **Library** - * **Linkage** - * **List** - * **Location** - * **Measure** - * **MeasureReport** - * **Media** - * **Medication** - * **MedicationAdministration** - * **MedicationDispense** - * **MedicationKnowledge** - * **MedicationRequest** - * **MedicationStatement** - * **MedicinalProduct** - * **MedicinalProductAuthorization** - * **MedicinalProductContraindication** - * **MedicinalProductIndication** - * **MedicinalProductIngredient** - * **MedicinalProductInteraction** - * **MedicinalProductManufactured** - * **MedicinalProductPackaged** - * **MedicinalProductPharmaceutical** - * **MedicinalProductUndesirableEffect** - * **MessageDefinition** - * **MessageHeader** - * **MolecularSequence** - * **NamingSystem** - * **NutritionOrder** - * **Observation** - * **ObservationDefinition** - * **OperationDefinition** - * **OperationOutcome** - * **Organization** - * **OrganizationAffiliation** - * **Parameters** - * **Patient** - * **PaymentNotice** - * **PaymentReconciliation** - * **Person** - * **PlanDefinition** - * **Practitioner** - * **PractitionerRole** - * **Procedure** - * **ProcedureRequest** - * **ProcessRequest** - * **ProcessResponse** - * **Provenance** - * **Questionnaire** - * **QuestionnaireResponse** - * **ReferralRequest** - * **RelatedPerson** - * **RequestGroup** - * **ResearchDefinition** - * **ResearchElementDefinition** - * **ResearchStudy** - * **ResearchSubject** - * **Resource** - * **RiskAssessment** - * **RiskEvidenceSynthesis** - * **Schedule** - * **SearchParameter** - * **Sequence** - * **ServiceDefinition** - * **ServiceRequest** - * **Slot** - * **Specimen** - * **SpecimenDefinition** - * **StructureDefinition** - * **StructureMap** - * **Subscription** - * **Substance** - * **SubstanceNucleicAcid** - * **SubstancePolymer** - * **SubstanceProtein** - * **SubstanceReferenceInformation** - * **SubstanceSourceMaterial** - * **SubstanceSpecification** - * **SupplyDelivery** - * **SupplyRequest** - * **Task** - * **TerminologyCapabilities** - * **TestReport** - * **TestScript** - * **ValueSet** - * **VerificationResult** - * **VisionPrescription** + * **Account**: The FHIR resource type defined in STU3 and R4. \ + * **ActivityDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **AdverseEvent**: The FHIR resource type defined in STU3 and R4. \ + * **AllergyIntolerance**: The FHIR resource type defined in STU3 and R4. \ + * **Appointment**: The FHIR resource type defined in STU3 and R4. \ + * **AppointmentResponse**: The FHIR resource type defined in STU3 and R4. \ + * **AuditEvent**: The FHIR resource type defined in STU3 and R4. \ + * **Basic**: The FHIR resource type defined in STU3 and R4. \ + * **Binary**: The FHIR resource type defined in STU3 and R4. \ + * **BiologicallyDerivedProduct**: The FHIR resource type defined in R4. \ + * **BodySite**: The FHIR resource type defined in STU3. \ + * **BodyStructure**: The FHIR resource type defined in R4. \ + * **Bundle**: The FHIR resource type defined in STU3 and R4. \ + * **CapabilityStatement**: The FHIR resource type defined in STU3 and R4. \ + * **CarePlan**: The FHIR resource type defined in STU3 and R4. \ + * **CareTeam**: The FHIR resource type defined in STU3 and R4. \ + * **CatalogEntry**: The FHIR resource type defined in R4. \ + * **ChargeItem**: The FHIR resource type defined in STU3 and R4. \ + * **ChargeItemDefinition**: The FHIR resource type defined in R4. \ + * **Claim**: The FHIR resource type defined in STU3 and R4. \ + * **ClaimResponse**: The FHIR resource type defined in STU3 and R4. \ + * **ClinicalImpression**: The FHIR resource type defined in STU3 and R4. \ + * **CodeSystem**: The FHIR resource type defined in STU3 and R4. \ + * **Communication**: The FHIR resource type defined in STU3 and R4. \ + * **CommunicationRequest**: The FHIR resource type defined in STU3 and R4. \ + * **CompartmentDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **Composition**: The FHIR resource type defined in STU3 and R4. \ + * **ConceptMap**: The FHIR resource type defined in STU3 and R4. \ + * **Condition**: The FHIR resource type defined in STU3 and R4. \ + * **Consent**: The FHIR resource type defined in STU3 and R4. \ + * **Contract**: The FHIR resource type defined in STU3 and R4. \ + * **Coverage**: The FHIR resource type defined in STU3 and R4. \ + * **CoverageEligibilityRequest**: The FHIR resource type defined in R4. \ + * **CoverageEligibilityResponse**: The FHIR resource type defined in R4. \ + * **DataElement**: The FHIR resource type defined in STU3. \ + * **DetectedIssue**: The FHIR resource type defined in STU3 and R4. \ + * **Device**: The FHIR resource type defined in STU3 and R4. \ + * **DeviceComponent**: The FHIR resource type defined in STU3. \ + * **DeviceDefinition**: The FHIR resource type defined in R4. \ + * **DeviceMetric**: The FHIR resource type defined in STU3 and R4. \ + * **DeviceRequest**: The FHIR resource type defined in STU3 and R4. \ + * **DeviceUseStatement**: The FHIR resource type defined in STU3 and R4. \ + * **DiagnosticReport**: The FHIR resource type defined in STU3 and R4. \ + * **DocumentManifest**: The FHIR resource type defined in STU3 and R4. \ + * **DocumentReference**: The FHIR resource type defined in STU3 and R4. \ + * **DomainResource**: The FHIR resource type defined in STU3 and R4. \ + * **EffectEvidenceSynthesis**: The FHIR resource type defined in R4. \ + * **EligibilityRequest**: The FHIR resource type defined in STU3. \ + * **EligibilityResponse**: The FHIR resource type defined in STU3. \ + * **Encounter**: The FHIR resource type defined in STU3 and R4. \ + * **Endpoint**: The FHIR resource type defined in STU3 and R4. \ + * **EnrollmentRequest**: The FHIR resource type defined in STU3 and R4. \ + * **EnrollmentResponse**: The FHIR resource type defined in STU3 and R4. \ + * **EpisodeOfCare**: The FHIR resource type defined in STU3 and R4. \ + * **EventDefinition**: The FHIR resource type defined in R4. \ + * **Evidence**: The FHIR resource type defined in R4. \ + * **EvidenceVariable**: The FHIR resource type defined in R4. \ + * **ExampleScenario**: The FHIR resource type defined in R4. \ + * **ExpansionProfile**: The FHIR resource type defined in STU3. \ + * **ExplanationOfBenefit**: The FHIR resource type defined in STU3 and R4. \ + * **FamilyMemberHistory**: The FHIR resource type defined in STU3 and R4. \ + * **Flag**: The FHIR resource type defined in STU3 and R4. \ + * **Goal**: The FHIR resource type defined in STU3 and R4. \ + * **GraphDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **Group**: The FHIR resource type defined in STU3 and R4. \ + * **GuidanceResponse**: The FHIR resource type defined in STU3 and R4. \ + * **HealthcareService**: The FHIR resource type defined in STU3 and R4. \ + * **ImagingManifest**: The FHIR resource type defined in STU3. \ + * **ImagingStudy**: The FHIR resource type defined in STU3 and R4. \ + * **Immunization**: The FHIR resource type defined in STU3 and R4. \ + * **ImmunizationEvaluation**: The FHIR resource type defined in R4. \ + * **ImmunizationRecommendation**: The FHIR resource type defined in STU3 and R4. \ + * **ImplementationGuide**: The FHIR resource type defined in STU3 and R4. \ + * **InsurancePlan**: The FHIR resource type defined in R4. \ + * **Invoice**: The FHIR resource type defined in R4. \ + * **Library**: The FHIR resource type defined in STU3 and R4. \ + * **Linkage**: The FHIR resource type defined in STU3 and R4. \ + * **List**: The FHIR resource type defined in STU3 and R4. \ + * **Location**: The FHIR resource type defined in STU3 and R4. \ + * **Measure**: The FHIR resource type defined in STU3 and R4. \ + * **MeasureReport**: The FHIR resource type defined in STU3 and R4. \ + * **Media**: The FHIR resource type defined in STU3 and R4. \ + * **Medication**: The FHIR resource type defined in STU3 and R4. \ + * **MedicationAdministration**: The FHIR resource type defined in STU3 and R4. \ + * **MedicationDispense**: The FHIR resource type defined in STU3 and R4. \ + * **MedicationKnowledge**: The FHIR resource type defined in R4. \ + * **MedicationRequest**: The FHIR resource type defined in STU3 and R4. \ + * **MedicationStatement**: The FHIR resource type defined in STU3 and R4. \ + * **MedicinalProduct**: The FHIR resource type defined in R4. \ + * **MedicinalProductAuthorization**: The FHIR resource type defined in R4. \ + * **MedicinalProductContraindication**: The FHIR resource type defined in R4. \ + * **MedicinalProductIndication**: The FHIR resource type defined in R4. \ + * **MedicinalProductIngredient**: The FHIR resource type defined in R4. \ + * **MedicinalProductInteraction**: The FHIR resource type defined in R4. \ + * **MedicinalProductManufactured**: The FHIR resource type defined in R4. \ + * **MedicinalProductPackaged**: The FHIR resource type defined in R4. \ + * **MedicinalProductPharmaceutical**: The FHIR resource type defined in R4. \ + * **MedicinalProductUndesirableEffect**: The FHIR resource type defined in R4. \ + * **MessageDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **MessageHeader**: The FHIR resource type defined in STU3 and R4. \ + * **MolecularSequence**: The FHIR resource type defined in R4. \ + * **NamingSystem**: The FHIR resource type defined in STU3 and R4. \ + * **NutritionOrder**: The FHIR resource type defined in STU3 and R4. \ + * **Observation**: The FHIR resource type defined in STU3 and R4. \ + * **ObservationDefinition**: The FHIR resource type defined in R4. \ + * **OperationDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **OperationOutcome**: The FHIR resource type defined in STU3 and R4. \ + * **Organization**: The FHIR resource type defined in STU3 and R4. \ + * **OrganizationAffiliation**: The FHIR resource type defined in R4. \ + * **Parameters**: The FHIR resource type defined in STU3 and R4. \ + * **Patient**: The FHIR resource type defined in STU3 and R4. \ + * **PaymentNotice**: The FHIR resource type defined in STU3 and R4. \ + * **PaymentReconciliation**: The FHIR resource type defined in STU3 and R4. \ + * **Person**: The FHIR resource type defined in STU3 and R4. \ + * **PlanDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **Practitioner**: The FHIR resource type defined in STU3 and R4. \ + * **PractitionerRole**: The FHIR resource type defined in STU3 and R4. \ + * **Procedure**: The FHIR resource type defined in STU3 and R4. \ + * **ProcedureRequest**: The FHIR resource type defined in STU3. \ + * **ProcessRequest**: The FHIR resource type defined in STU3. \ + * **ProcessResponse**: The FHIR resource type defined in STU3. \ + * **Provenance**: The FHIR resource type defined in STU3 and R4. \ + * **Questionnaire**: The FHIR resource type defined in STU3 and R4. \ + * **QuestionnaireResponse**: The FHIR resource type defined in STU3 and R4. \ + * **ReferralRequest**: The FHIR resource type defined in STU3. \ + * **RelatedPerson**: The FHIR resource type defined in STU3 and R4. \ + * **RequestGroup**: The FHIR resource type defined in STU3 and R4. \ + * **ResearchDefinition**: The FHIR resource type defined in R4. \ + * **ResearchElementDefinition**: The FHIR resource type defined in R4. \ + * **ResearchStudy**: The FHIR resource type defined in STU3 and R4. \ + * **ResearchSubject**: The FHIR resource type defined in STU3 and R4. \ + * **Resource**: The FHIR resource type defined in STU3 and R4. \ + * **RiskAssessment**: The FHIR resource type defined in STU3 and R4. \ + * **RiskEvidenceSynthesis**: The FHIR resource type defined in R4. \ + * **Schedule**: The FHIR resource type defined in STU3 and R4. \ + * **SearchParameter**: The FHIR resource type defined in STU3 and R4. \ + * **Sequence**: The FHIR resource type defined in STU3. \ + * **ServiceDefinition**: The FHIR resource type defined in STU3. \ + * **ServiceRequest**: The FHIR resource type defined in R4. \ + * **Slot**: The FHIR resource type defined in STU3 and R4. \ + * **Specimen**: The FHIR resource type defined in STU3 and R4. \ + * **SpecimenDefinition**: The FHIR resource type defined in R4. \ + * **StructureDefinition**: The FHIR resource type defined in STU3 and R4. \ + * **StructureMap**: The FHIR resource type defined in STU3 and R4. \ + * **Subscription**: The FHIR resource type defined in STU3 and R4. \ + * **Substance**: The FHIR resource type defined in STU3 and R4. \ + * **SubstanceNucleicAcid**: The FHIR resource type defined in R4. \ + * **SubstancePolymer**: The FHIR resource type defined in R4. \ + * **SubstanceProtein**: The FHIR resource type defined in R4. \ + * **SubstanceReferenceInformation**: The FHIR resource type defined in R4. \ + * **SubstanceSourceMaterial**: The FHIR resource type defined in R4. \ + * **SubstanceSpecification**: The FHIR resource type defined in R4. \ + * **SupplyDelivery**: The FHIR resource type defined in STU3 and R4. \ + * **SupplyRequest**: The FHIR resource type defined in STU3 and R4. \ + * **Task**: The FHIR resource type defined in STU3 and R4. \ + * **TerminologyCapabilities**: The FHIR resource type defined in R4. \ + * **TestReport**: The FHIR resource type defined in STU3 and R4. \ + * **TestScript**: The FHIR resource type defined in STU3 and R4. \ + * **ValueSet**: The FHIR resource type defined in STU3 and R4. \ + * **VerificationResult**: The FHIR resource type defined in R4. \ + * **VisionPrescription**: The FHIR resource type defined in STU3 and R4. */ export type HealthcareFhirResourceType = string; @@ -2403,6 +4549,17 @@ export interface HealthcareFhirResourceUpdatedEventData { resourceVersionId: number; } +export function healthcareFhirResourceUpdatedEventDataDeserializer( + item: any, +): HealthcareFhirResourceUpdatedEventData { + return { + resourceType: item["resourceType"], + resourceFhirAccount: item["resourceFhirAccount"], + resourceFhirId: item["resourceFhirId"], + resourceVersionId: item["resourceVersionId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.FhirResourceDeleted event. */ export interface HealthcareFhirResourceDeletedEventData { /** Type of HL7 FHIR resource. */ @@ -2415,6 +4572,17 @@ export interface HealthcareFhirResourceDeletedEventData { resourceVersionId: number; } +export function healthcareFhirResourceDeletedEventDataDeserializer( + item: any, +): HealthcareFhirResourceDeletedEventData { + return { + resourceType: item["resourceType"], + resourceFhirAccount: item["resourceFhirAccount"], + resourceFhirId: item["resourceFhirId"], + resourceVersionId: item["resourceVersionId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.DicomImageCreated event. */ export interface HealthcareDicomImageCreatedEventData { /** Data partition name */ @@ -2431,6 +4599,19 @@ export interface HealthcareDicomImageCreatedEventData { sequenceNumber: number; } +export function healthcareDicomImageCreatedEventDataDeserializer( + item: any, +): HealthcareDicomImageCreatedEventData { + return { + partitionName: item["partitionName"], + imageStudyInstanceUid: item["imageStudyInstanceUid"], + imageSeriesInstanceUid: item["imageSeriesInstanceUid"], + imageSopInstanceUid: item["imageSopInstanceUid"], + serviceHostName: item["serviceHostName"], + sequenceNumber: item["sequenceNumber"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.DicomImageDeleted event. */ export interface HealthcareDicomImageDeletedEventData { /** Data partition name */ @@ -2447,6 +4628,19 @@ export interface HealthcareDicomImageDeletedEventData { sequenceNumber: number; } +export function healthcareDicomImageDeletedEventDataDeserializer( + item: any, +): HealthcareDicomImageDeletedEventData { + return { + partitionName: item["partitionName"], + imageStudyInstanceUid: item["imageStudyInstanceUid"], + imageSeriesInstanceUid: item["imageSeriesInstanceUid"], + imageSopInstanceUid: item["imageSopInstanceUid"], + serviceHostName: item["serviceHostName"], + sequenceNumber: item["sequenceNumber"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.HealthcareApis.DicomImageUpdated event. */ export interface HealthcareDicomImageUpdatedEventData { /** Data partition name */ @@ -2463,6 +4657,19 @@ export interface HealthcareDicomImageUpdatedEventData { sequenceNumber: number; } +export function healthcareDicomImageUpdatedEventDataDeserializer( + item: any, +): HealthcareDicomImageUpdatedEventData { + return { + partitionName: item["partitionName"], + imageStudyInstanceUid: item["imageStudyInstanceUid"], + imageSeriesInstanceUid: item["imageSeriesInstanceUid"], + imageSopInstanceUid: item["imageSopInstanceUid"], + serviceHostName: item["serviceHostName"], + sequenceNumber: item["sequenceNumber"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateNewVersionCreated event. */ export interface KeyVaultCertificateNewVersionCreatedEventData { /** The id of the object that triggered this event. */ @@ -2476,9 +4683,23 @@ export interface KeyVaultCertificateNewVersionCreatedEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultCertificateNewVersionCreatedEventDataDeserializer( + item: any, +): KeyVaultCertificateNewVersionCreatedEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateNearExpiry event. */ @@ -2494,9 +4715,23 @@ export interface KeyVaultCertificateNearExpiryEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultCertificateNearExpiryEventDataDeserializer( + item: any, +): KeyVaultCertificateNearExpiryEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateExpired event. */ @@ -2512,9 +4747,23 @@ export interface KeyVaultCertificateExpiredEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultCertificateExpiredEventDataDeserializer( + item: any, +): KeyVaultCertificateExpiredEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyNewVersionCreated event. */ @@ -2530,9 +4779,23 @@ export interface KeyVaultKeyNewVersionCreatedEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultKeyNewVersionCreatedEventDataDeserializer( + item: any, +): KeyVaultKeyNewVersionCreatedEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyNearExpiry event. */ @@ -2548,9 +4811,23 @@ export interface KeyVaultKeyNearExpiryEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultKeyNearExpiryEventDataDeserializer( + item: any, +): KeyVaultKeyNearExpiryEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyExpired event. */ @@ -2566,9 +4843,21 @@ export interface KeyVaultKeyExpiredEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultKeyExpiredEventDataDeserializer(item: any): KeyVaultKeyExpiredEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretNewVersionCreated event. */ @@ -2584,9 +4873,23 @@ export interface KeyVaultSecretNewVersionCreatedEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultSecretNewVersionCreatedEventDataDeserializer( + item: any, +): KeyVaultSecretNewVersionCreatedEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretNearExpiry event. */ @@ -2602,9 +4905,23 @@ export interface KeyVaultSecretNearExpiryEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultSecretNearExpiryEventDataDeserializer( + item: any, +): KeyVaultSecretNearExpiryEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretExpired event. */ @@ -2620,9 +4937,23 @@ export interface KeyVaultSecretExpiredEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultSecretExpiredEventDataDeserializer( + item: any, +): KeyVaultSecretExpiredEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.VaultAccessPolicyChanged event. */ @@ -2638,9 +4969,23 @@ export interface KeyVaultAccessPolicyChangedEventData { /** The version of the object that triggered this event */ version: string; /** Not before date of the object that triggered this event */ - nBF: number; + nbf: number; /** The expiration date of the object that triggered this event */ - eXP: number; + exp: number; +} + +export function keyVaultAccessPolicyChangedEventDataDeserializer( + item: any, +): KeyVaultAccessPolicyChangedEventData { + return { + id: item["Id"], + vaultName: item["VaultName"], + objectType: item["ObjectType"], + objectName: item["ObjectName"], + version: item["Version"], + nbf: item["NBF"], + exp: item["EXP"], + }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.ModelRegistered event. */ @@ -2655,6 +5000,17 @@ export interface MachineLearningServicesModelRegisteredEventData { modelProperties: Record; } +export function machineLearningServicesModelRegisteredEventDataDeserializer( + item: any, +): MachineLearningServicesModelRegisteredEventData { + return { + modelName: item["modelName"], + modelVersion: item["modelVersion"], + modelTags: item["modelTags"], + modelProperties: item["modelProperties"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.ModelDeployed event. */ export interface MachineLearningServicesModelDeployedEventData { /** The name of the deployed service. */ @@ -2669,6 +5025,18 @@ export interface MachineLearningServicesModelDeployedEventData { serviceProperties: Record; } +export function machineLearningServicesModelDeployedEventDataDeserializer( + item: any, +): MachineLearningServicesModelDeployedEventData { + return { + serviceName: item["serviceName"], + serviceComputeType: item["serviceComputeType"], + modelIds: item["modelIds"], + serviceTags: item["serviceTags"], + serviceProperties: item["serviceProperties"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.RunCompleted event. */ export interface MachineLearningServicesRunCompletedEventData { /** The ID of the experiment that the run belongs to. */ @@ -2685,6 +5053,19 @@ export interface MachineLearningServicesRunCompletedEventData { runProperties: Record; } +export function machineLearningServicesRunCompletedEventDataDeserializer( + item: any, +): MachineLearningServicesRunCompletedEventData { + return { + experimentId: item["experimentId"], + experimentName: item["experimentName"], + runId: item["runId"], + runType: item["runType"], + runTags: item["runTags"], + runProperties: item["runProperties"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.DatasetDriftDetected event. */ export interface MachineLearningServicesDatasetDriftDetectedEventData { /** The ID of the data drift monitor that triggered the event. */ @@ -2705,6 +5086,21 @@ export interface MachineLearningServicesDatasetDriftDetectedEventData { endTime: Date; } +export function machineLearningServicesDatasetDriftDetectedEventDataDeserializer( + item: any, +): MachineLearningServicesDatasetDriftDetectedEventData { + return { + dataDriftId: item["dataDriftId"], + dataDriftName: item["dataDriftName"], + runId: item["runId"], + baseDatasetId: item["baseDatasetId"], + targetDatasetId: item["targetDatasetId"], + driftCoefficient: item["driftCoefficient"], + startTime: new Date(item["startTime"]), + endTime: new Date(item["endTime"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.RunStatusChanged event. */ export interface MachineLearningServicesRunStatusChangedEventData { /** The ID of the experiment that the Machine Learning Run belongs to. */ @@ -2723,6 +5119,20 @@ export interface MachineLearningServicesRunStatusChangedEventData { runStatus?: string; } +export function machineLearningServicesRunStatusChangedEventDataDeserializer( + item: any, +): MachineLearningServicesRunStatusChangedEventData { + return { + experimentId: item["experimentId"], + experimentName: item["experimentName"], + runId: item["runId"], + runType: item["runType"], + runTags: item["runTags"], + runProperties: item["runProperties"], + runStatus: item["runStatus"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateCreated event. */ export interface PolicyInsightsPolicyStateCreatedEventData { /** The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. */ @@ -2741,6 +5151,20 @@ export interface PolicyInsightsPolicyStateCreatedEventData { complianceReasonCode: string; } +export function policyInsightsPolicyStateCreatedEventDataDeserializer( + item: any, +): PolicyInsightsPolicyStateCreatedEventData { + return { + timestamp: new Date(item["timestamp"]), + policyAssignmentId: item["policyAssignmentId"], + policyDefinitionId: item["policyDefinitionId"], + policyDefinitionReferenceId: item["policyDefinitionReferenceId"], + complianceState: item["complianceState"], + subscriptionId: item["subscriptionId"], + complianceReasonCode: item["complianceReasonCode"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateChanged event. */ export interface PolicyInsightsPolicyStateChangedEventData { /** The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. */ @@ -2759,6 +5183,20 @@ export interface PolicyInsightsPolicyStateChangedEventData { complianceReasonCode: string; } +export function policyInsightsPolicyStateChangedEventDataDeserializer( + item: any, +): PolicyInsightsPolicyStateChangedEventData { + return { + timestamp: new Date(item["timestamp"]), + policyAssignmentId: item["policyAssignmentId"], + policyDefinitionId: item["policyDefinitionId"], + policyDefinitionReferenceId: item["policyDefinitionReferenceId"], + complianceState: item["complianceState"], + subscriptionId: item["subscriptionId"], + complianceReasonCode: item["complianceReasonCode"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.PolicyInsights.PolicyStateDeleted event. */ export interface PolicyInsightsPolicyStateDeletedEventData { /** The time that the resource was scanned by Azure Policy in the Universal ISO 8601 DateTime format yyyy-MM-ddTHH:mm:ss.fffffffZ. */ @@ -2777,6 +5215,20 @@ export interface PolicyInsightsPolicyStateDeletedEventData { complianceReasonCode: string; } +export function policyInsightsPolicyStateDeletedEventDataDeserializer( + item: any, +): PolicyInsightsPolicyStateDeletedEventData { + return { + timestamp: new Date(item["timestamp"]), + policyAssignmentId: item["policyAssignmentId"], + policyDefinitionId: item["policyDefinitionId"], + policyDefinitionReferenceId: item["policyDefinitionReferenceId"], + complianceState: item["complianceState"], + subscriptionId: item["subscriptionId"], + complianceReasonCode: item["complianceReasonCode"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.PatchingCompleted event. */ export interface RedisPatchingCompletedEventData { /** The time at which the event occurred. */ @@ -2787,6 +5239,16 @@ export interface RedisPatchingCompletedEventData { status?: string; } +export function redisPatchingCompletedEventDataDeserializer( + item: any, +): RedisPatchingCompletedEventData { + return { + timestamp: !item["timestamp"] ? item["timestamp"] : new Date(item["timestamp"]), + name: item["name"], + status: item["status"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ScalingCompleted event. */ export interface RedisScalingCompletedEventData { /** The time at which the event occurred. */ @@ -2797,6 +5259,16 @@ export interface RedisScalingCompletedEventData { status?: string; } +export function redisScalingCompletedEventDataDeserializer( + item: any, +): RedisScalingCompletedEventData { + return { + timestamp: !item["timestamp"] ? item["timestamp"] : new Date(item["timestamp"]), + name: item["name"], + status: item["status"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ExportRDBCompleted event. */ export interface RedisExportRDBCompletedEventData { /** The time at which the event occurred. */ @@ -2807,6 +5279,16 @@ export interface RedisExportRDBCompletedEventData { status?: string; } +export function redisExportRDBCompletedEventDataDeserializer( + item: any, +): RedisExportRDBCompletedEventData { + return { + timestamp: !item["timestamp"] ? item["timestamp"] : new Date(item["timestamp"]), + name: item["name"], + status: item["status"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ImportRDBCompleted event. */ export interface RedisImportRDBCompletedEventData { /** The time at which the event occurred. */ @@ -2817,6 +5299,16 @@ export interface RedisImportRDBCompletedEventData { status?: string; } +export function redisImportRDBCompletedEventDataDeserializer( + item: any, +): RedisImportRDBCompletedEventData { + return { + timestamp: !item["timestamp"] ? item["timestamp"] : new Date(item["timestamp"]), + name: item["name"], + status: item["status"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteSuccess event. This is raised when a resource create or update operation succeeds. */ export interface ResourceWriteSuccessEventData { /** The tenant ID of the resource. */ @@ -2843,6 +5335,24 @@ export interface ResourceWriteSuccessEventData { httpRequest: ResourceHttpRequest; } +export function resourceWriteSuccessEventDataDeserializer( + item: any, +): ResourceWriteSuccessEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** The details of the authorization for the resource. */ export interface ResourceAuthorization { /** The scope of the authorization. */ @@ -2853,6 +5363,14 @@ export interface ResourceAuthorization { evidence: Record; } +export function resourceAuthorizationDeserializer(item: any): ResourceAuthorization { + return { + scope: item["scope"], + action: item["action"], + evidence: item["evidence"], + }; +} + /** The details of the HTTP request. */ export interface ResourceHttpRequest { /** The client request ID. */ @@ -2865,6 +5383,15 @@ export interface ResourceHttpRequest { url?: string; } +export function resourceHttpRequestDeserializer(item: any): ResourceHttpRequest { + return { + clientRequestId: item["clientRequestId"], + clientIpAddress: item["clientIpAddress"], + method: item["method"], + url: item["url"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteFailure event. This is raised when a resource create or update operation fails. */ export interface ResourceWriteFailureEventData { /** The tenant ID of the resource. */ @@ -2891,6 +5418,24 @@ export interface ResourceWriteFailureEventData { httpRequest: ResourceHttpRequest; } +export function resourceWriteFailureEventDataDeserializer( + item: any, +): ResourceWriteFailureEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceWriteCancel event. This is raised when a resource create or update operation is canceled. */ export interface ResourceWriteCancelEventData { /** The tenant ID of the resource. */ @@ -2917,6 +5462,22 @@ export interface ResourceWriteCancelEventData { httpRequest: ResourceHttpRequest; } +export function resourceWriteCancelEventDataDeserializer(item: any): ResourceWriteCancelEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteSuccess event. This is raised when a resource delete operation succeeds. */ export interface ResourceDeleteSuccessEventData { /** The tenant ID of the resource. */ @@ -2943,6 +5504,24 @@ export interface ResourceDeleteSuccessEventData { httpRequest: ResourceHttpRequest; } +export function resourceDeleteSuccessEventDataDeserializer( + item: any, +): ResourceDeleteSuccessEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteFailure event. This is raised when a resource delete operation fails. */ export interface ResourceDeleteFailureEventData { /** The tenant ID of the resource. */ @@ -2969,6 +5548,24 @@ export interface ResourceDeleteFailureEventData { httpRequest: ResourceHttpRequest; } +export function resourceDeleteFailureEventDataDeserializer( + item: any, +): ResourceDeleteFailureEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceDeleteCancel event. This is raised when a resource delete operation is canceled. */ export interface ResourceDeleteCancelEventData { /** The tenant ID of the resource. */ @@ -2995,6 +5592,24 @@ export interface ResourceDeleteCancelEventData { httpRequest: ResourceHttpRequest; } +export function resourceDeleteCancelEventDataDeserializer( + item: any, +): ResourceDeleteCancelEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionSuccess event. This is raised when a resource action operation succeeds. */ export interface ResourceActionSuccessEventData { /** The tenant ID of the resource. */ @@ -3021,6 +5636,24 @@ export interface ResourceActionSuccessEventData { httpRequest: ResourceHttpRequest; } +export function resourceActionSuccessEventDataDeserializer( + item: any, +): ResourceActionSuccessEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionFailure event. This is raised when a resource action operation fails. */ export interface ResourceActionFailureEventData { /** The tenant ID of the resource. */ @@ -3047,6 +5680,24 @@ export interface ResourceActionFailureEventData { httpRequest: ResourceHttpRequest; } +export function resourceActionFailureEventDataDeserializer( + item: any, +): ResourceActionFailureEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionCancel event. This is raised when a resource action operation is canceled. */ export interface ResourceActionCancelEventData { /** The tenant ID of the resource. */ @@ -3073,6 +5724,24 @@ export interface ResourceActionCancelEventData { httpRequest: ResourceHttpRequest; } +export function resourceActionCancelEventDataDeserializer( + item: any, +): ResourceActionCancelEventData { + return { + tenantId: item["tenantId"], + subscriptionId: item["subscriptionId"], + resourceGroup: item["resourceGroup"], + resourceProvider: item["resourceProvider"], + resourceUri: item["resourceUri"], + operationName: item["operationName"], + status: item["status"], + authorization: resourceAuthorizationDeserializer(item["authorization"]), + claims: item["claims"], + correlationId: item["correlationId"], + httpRequest: resourceHttpRequestDeserializer(item["httpRequest"]), + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. */ export interface ServiceBusActiveMessagesAvailableWithNoListenersEventData { /** The namespace name of the Microsoft.ServiceBus resource. */ @@ -3089,6 +5758,19 @@ export interface ServiceBusActiveMessagesAvailableWithNoListenersEventData { subscriptionName: string | null; } +export function serviceBusActiveMessagesAvailableWithNoListenersEventDataDeserializer( + item: any, +): ServiceBusActiveMessagesAvailableWithNoListenersEventData { + return { + namespaceName: item["namespaceName"], + requestUri: item["requestUri"], + entityType: item["entityType"], + queueName: item["queueName"], + topicName: item["topicName"], + subscriptionName: item["subscriptionName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners event. */ export interface ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { /** The namespace name of the Microsoft.ServiceBus resource. */ @@ -3105,6 +5787,19 @@ export interface ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { subscriptionName: string | null; } +export function serviceBusDeadletterMessagesAvailableWithNoListenersEventDataDeserializer( + item: any, +): ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { + return { + namespaceName: item["namespaceName"], + requestUri: item["requestUri"], + entityType: item["entityType"], + queueName: item["queueName"], + topicName: item["topicName"], + subscriptionName: item["subscriptionName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.ActiveMessagesAvailablePeriodicNotifications event. */ export interface ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData { /** The namespace name of the Microsoft.ServiceBus resource. */ @@ -3121,6 +5816,19 @@ export interface ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData subscriptionName: string | null; } +export function serviceBusActiveMessagesAvailablePeriodicNotificationsEventDataDeserializer( + item: any, +): ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData { + return { + namespaceName: item["namespaceName"], + requestUri: item["requestUri"], + entityType: item["entityType"], + queueName: item["queueName"], + topicName: item["topicName"], + subscriptionName: item["subscriptionName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.ServiceBus.DeadletterMessagesAvailablePeriodicNotifications event. */ export interface ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData { /** The namespace name of the Microsoft.ServiceBus resource. */ @@ -3137,6 +5845,19 @@ export interface ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEvent subscriptionName: string | null; } +export function serviceBusDeadletterMessagesAvailablePeriodicNotificationsEventDataDeserializer( + item: any, +): ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData { + return { + namespaceName: item["namespaceName"], + requestUri: item["requestUri"], + entityType: item["entityType"], + queueName: item["queueName"], + topicName: item["topicName"], + subscriptionName: item["subscriptionName"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionConnected event. */ export interface SignalRServiceClientConnectionConnectedEventData { /** The time at which the event occurred. */ @@ -3149,6 +5870,17 @@ export interface SignalRServiceClientConnectionConnectedEventData { userId?: string; } +export function signalRServiceClientConnectionConnectedEventDataDeserializer( + item: any, +): SignalRServiceClientConnectionConnectedEventData { + return { + timestamp: new Date(item["timestamp"]), + hubName: item["hubName"], + connectionId: item["connectionId"], + userId: item["userId"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionDisconnected event. */ export interface SignalRServiceClientConnectionDisconnectedEventData { /** The time at which the event occurred. */ @@ -3163,6 +5895,18 @@ export interface SignalRServiceClientConnectionDisconnectedEventData { errorMessage?: string; } +export function signalRServiceClientConnectionDisconnectedEventDataDeserializer( + item: any, +): SignalRServiceClientConnectionDisconnectedEventData { + return { + timestamp: new Date(item["timestamp"]), + hubName: item["hubName"], + connectionId: item["connectionId"], + userId: item["userId"], + errorMessage: item["errorMessage"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobCreated event. */ export interface StorageBlobCreatedEventData { /** The name of the API/operation that triggered this event. */ @@ -3193,30 +5937,48 @@ export interface StorageBlobCreatedEventData { storageDiagnostics: Record; } -/** Known values of {@link StorageBlobAccessTier} that the service accepts. */ +export function storageBlobCreatedEventDataDeserializer(item: any): StorageBlobCreatedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + eTag: item["eTag"], + contentType: item["contentType"], + contentLength: item["contentLength"], + contentOffset: item["contentOffset"], + blobType: item["blobType"], + accessTier: item["accessTier"], + url: item["url"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + +/** The access tier of the blob. */ export enum KnownStorageBlobAccessTier { - /** Hot */ + /** The blob is in access tier Hot */ Hot = "Hot", - /** Cool */ + /** The blob is in access tier Cool */ Cool = "Cool", - /** Cold */ + /** The blob is in access tier Cold */ Cold = "Cold", - /** Archive */ + /** The blob is in access tier Archive */ Archive = "Archive", - /** Default */ + /** The blob is in access tier Default(Inferred) */ Default = "Default", } /** - * The access tier of the blob. + * The access tier of the blob. \ * {@link KnownStorageBlobAccessTier} can be used interchangeably with StorageBlobAccessTier, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Hot** - * **Cool** - * **Cold** - * **Archive** - * **Default** + * **Hot**: The blob is in access tier Hot \ + * **Cool**: The blob is in access tier Cool \ + * **Cold**: The blob is in access tier Cold \ + * **Archive**: The blob is in access tier Archive \ + * **Default**: The blob is in access tier Default(Inferred) */ export type StorageBlobAccessTier = string; @@ -3242,6 +6004,20 @@ export interface StorageBlobDeletedEventData { storageDiagnostics: Record; } +export function storageBlobDeletedEventDataDeserializer(item: any): StorageBlobDeletedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + contentType: item["contentType"], + blobType: item["blobType"], + url: item["url"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.DirectoryCreated event. */ export interface StorageDirectoryCreatedEventData { /** The name of the API/operation that triggered this event. */ @@ -3262,6 +6038,21 @@ export interface StorageDirectoryCreatedEventData { storageDiagnostics: Record; } +export function storageDirectoryCreatedEventDataDeserializer( + item: any, +): StorageDirectoryCreatedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + eTag: item["eTag"], + url: item["url"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.DirectoryDeleted event. */ export interface StorageDirectoryDeletedEventData { /** The name of the API/operation that triggered this event. */ @@ -3282,6 +6073,21 @@ export interface StorageDirectoryDeletedEventData { storageDiagnostics: Record; } +export function storageDirectoryDeletedEventDataDeserializer( + item: any, +): StorageDirectoryDeletedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + url: item["url"], + recursive: item["recursive"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobRenamed event. */ export interface StorageBlobRenamedEventData { /** The name of the API/operation that triggered this event. */ @@ -3302,6 +6108,19 @@ export interface StorageBlobRenamedEventData { storageDiagnostics: Record; } +export function storageBlobRenamedEventDataDeserializer(item: any): StorageBlobRenamedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + sourceUrl: item["sourceUrl"], + destinationUrl: item["destinationUrl"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.DirectoryRenamed event. */ export interface StorageDirectoryRenamedEventData { /** The name of the API/operation that triggered this event. */ @@ -3322,6 +6141,21 @@ export interface StorageDirectoryRenamedEventData { storageDiagnostics: Record; } +export function storageDirectoryRenamedEventDataDeserializer( + item: any, +): StorageDirectoryRenamedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + sourceUrl: item["sourceUrl"], + destinationUrl: item["destinationUrl"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.LifecyclePolicyCompleted event. */ export interface StorageLifecyclePolicyCompletedEventData { /** The time the policy task was scheduled. */ @@ -3338,13 +6172,40 @@ export interface StorageLifecyclePolicyCompletedEventData { tierToColdSummary: StorageLifecyclePolicyActionSummaryDetail; } +export function storageLifecyclePolicyCompletedEventDataDeserializer( + item: any, +): StorageLifecyclePolicyCompletedEventData { + return { + scheduleTime: item["scheduleTime"], + policyRunSummary: storageLifecyclePolicyRunSummaryDeserializer(item["policyRunSummary"]), + deleteSummary: storageLifecyclePolicyActionSummaryDetailDeserializer(item["deleteSummary"]), + tierToCoolSummary: storageLifecyclePolicyActionSummaryDetailDeserializer( + item["tierToCoolSummary"], + ), + tierToArchiveSummary: storageLifecyclePolicyActionSummaryDetailDeserializer( + item["tierToArchiveSummary"], + ), + tierToColdSummary: storageLifecyclePolicyActionSummaryDetailDeserializer( + item["tierToColdSummary"], + ), + }; +} + /** Policy run status of an account in a Blob Management cycle. */ export interface StorageLifecyclePolicyRunSummary { /** Policy status can be Completed/CompletedWithError/Incomplete. */ completionStatus: StorageLifecycleCompletionStatus; } -/** Known values of {@link StorageLifecycleCompletionStatus} that the service accepts. */ +export function storageLifecyclePolicyRunSummaryDeserializer( + item: any, +): StorageLifecyclePolicyRunSummary { + return { + completionStatus: item["completionStatus"], + }; +} + +/** The status for a LCM policy. */ export enum KnownStorageLifecycleCompletionStatus { /** Completed */ Completed = "Completed", @@ -3355,13 +6216,13 @@ export enum KnownStorageLifecycleCompletionStatus { } /** - * The status for a LCM policy. + * The status for a LCM policy. \ * {@link KnownStorageLifecycleCompletionStatus} can be used interchangeably with StorageLifecycleCompletionStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Completed** - * **CompletedWithError** - * **Incomplete** + * **Completed**: Completed \ + * **CompletedWithError**: CompletedWithError \ + * **Incomplete**: Incomplete */ export type StorageLifecycleCompletionStatus = string; @@ -3375,6 +6236,16 @@ export interface StorageLifecyclePolicyActionSummaryDetail { errorList?: string; } +export function storageLifecyclePolicyActionSummaryDetailDeserializer( + item: any, +): StorageLifecyclePolicyActionSummaryDetail { + return { + totalObjectsCount: item["totalObjectsCount"], + successCount: item["successCount"], + errorList: item["errorList"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobTierChanged event. */ export interface StorageBlobTierChangedEventData { /** The name of the API/operation that triggered this event. */ @@ -3403,6 +6274,25 @@ export interface StorageBlobTierChangedEventData { storageDiagnostics: Record; } +export function storageBlobTierChangedEventDataDeserializer( + item: any, +): StorageBlobTierChangedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + contentType: item["contentType"], + contentLength: item["contentLength"], + blobType: item["blobType"], + accessTier: item["accessTier"], + previousTier: item["previousTier"], + url: item["url"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.AsyncOperationInitiated event. */ export interface StorageAsyncOperationInitiatedEventData { /** The name of the API/operation that triggered this event. */ @@ -3427,6 +6317,23 @@ export interface StorageAsyncOperationInitiatedEventData { storageDiagnostics: Record; } +export function storageAsyncOperationInitiatedEventDataDeserializer( + item: any, +): StorageAsyncOperationInitiatedEventData { + return { + api: item["api"], + clientRequestId: item["clientRequestId"], + requestId: item["requestId"], + contentType: item["contentType"], + contentLength: item["contentLength"], + blobType: item["blobType"], + url: item["url"], + sequencer: item["sequencer"], + identity: item["identity"], + storageDiagnostics: item["storageDiagnostics"], + }; +} + /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.BlobInventoryPolicyCompleted event. */ export interface StorageBlobInventoryPolicyCompletedEventData { /** The time at which inventory policy was scheduled. */ @@ -3445,6 +6352,20 @@ export interface StorageBlobInventoryPolicyCompletedEventData { manifestBlobUrl?: string; } +export function storageBlobInventoryPolicyCompletedEventDataDeserializer( + item: any, +): StorageBlobInventoryPolicyCompletedEventData { + return { + scheduleDateTime: new Date(item["scheduleDateTime"]), + accountName: item["accountName"], + ruleName: item["ruleName"], + policyRunStatus: item["policyRunStatus"], + policyRunStatusMessage: item["policyRunStatusMessage"], + policyRunId: item["policyRunId"], + manifestBlobUrl: item["manifestBlobUrl"], + }; +} + /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskCompleted event. */ export interface StorageTaskCompletedEventData { /** The status for a storage task. */ @@ -3459,7 +6380,19 @@ export interface StorageTaskCompletedEventData { summaryReportBlobUrl: string; } -/** Known values of {@link StorageTaskCompletedStatus} that the service accepts. */ +export function storageTaskCompletedEventDataDeserializer( + item: any, +): StorageTaskCompletedEventData { + return { + status: item["status"], + completedDateTime: new Date(item["completedDateTime"]), + taskExecutionId: item["taskExecutionId"], + taskName: item["taskName"], + summaryReportBlobUrl: item["summaryReportBlobUrl"], + }; +} + +/** The status for a storage task. */ export enum KnownStorageTaskCompletedStatus { /** Succeeded */ Succeeded = "Succeeded", @@ -3468,12 +6401,12 @@ export enum KnownStorageTaskCompletedStatus { } /** - * The status for a storage task. + * The status for a storage task. \ * {@link KnownStorageTaskCompletedStatus} can be used interchangeably with StorageTaskCompletedStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** - * **Failed** + * **Succeeded**: Succeeded \ + * **Failed**: Failed */ export type StorageTaskCompletedStatus = string; @@ -3485,6 +6418,13 @@ export interface StorageTaskQueuedEventData { taskExecutionId?: string; } +export function storageTaskQueuedEventDataDeserializer(item: any): StorageTaskQueuedEventData { + return { + queuedDateTime: new Date(item["queuedDateTime"]), + taskExecutionId: item["taskExecutionId"], + }; +} + /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentQueued event. */ export interface StorageTaskAssignmentQueuedEventData { /** The time at which a storage task was queued. */ @@ -3493,6 +6433,15 @@ export interface StorageTaskAssignmentQueuedEventData { taskExecutionId?: string; } +export function storageTaskAssignmentQueuedEventDataDeserializer( + item: any, +): StorageTaskAssignmentQueuedEventData { + return { + queuedOn: new Date(item["queuedDateTime"]), + taskExecutionId: item["taskExecutionId"], + }; +} + /** Schema of the Data property of an EventGridEvent for an Microsoft.Storage.StorageTaskAssignmentCompleted event. */ export interface StorageTaskAssignmentCompletedEventData { /** The status for a storage task. */ @@ -3507,7 +6456,19 @@ export interface StorageTaskAssignmentCompletedEventData { summaryReportBlobUri: string; } -/** Known values of {@link StorageTaskAssignmentCompletedStatus} that the service accepts. */ +export function storageTaskAssignmentCompletedEventDataDeserializer( + item: any, +): StorageTaskAssignmentCompletedEventData { + return { + status: item["status"], + completedOn: new Date(item["completedDateTime"]), + taskExecutionId: item["taskExecutionId"], + taskName: item["taskName"], + summaryReportBlobUri: item["summaryReportBlobUrl"], + }; +} + +/** The status for a storage task. */ export enum KnownStorageTaskAssignmentCompletedStatus { /** Succeeded */ Succeeded = "Succeeded", @@ -3516,12 +6477,12 @@ export enum KnownStorageTaskAssignmentCompletedStatus { } /** - * The status for a storage task. + * The status for a storage task. \ * {@link KnownStorageTaskAssignmentCompletedStatus} can be used interchangeably with StorageTaskAssignmentCompletedStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** - * **Failed** + * **Succeeded**: Succeeded \ + * **Failed**: Failed */ export type StorageTaskAssignmentCompletedStatus = string; @@ -3531,33 +6492,39 @@ export interface AppEventTypeDetail { action: AppAction; } -/** Known values of {@link AppAction} that the service accepts. */ +export function appEventTypeDetailDeserializer(item: any): AppEventTypeDetail { + return { + action: item["action"], + }; +} + +/** Type of action of the operation */ export enum KnownAppAction { - /** Restarted */ + /** Web app was restarted. */ Restarted = "Restarted", - /** Stopped */ + /** Web app was stopped. */ Stopped = "Stopped", - /** ChangedAppSettings */ + /** There was an operation to change app setting on the web app. */ ChangedAppSettings = "ChangedAppSettings", - /** Started */ + /** The job has started. */ Started = "Started", - /** Completed */ + /** The job has completed. */ Completed = "Completed", - /** Failed */ + /** The job has failed to complete. */ Failed = "Failed", } /** - * Type of action of the operation + * Type of action of the operation \ * {@link KnownAppAction} can be used interchangeably with AppAction, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Restarted** - * **Stopped** - * **ChangedAppSettings** - * **Started** - * **Completed** - * **Failed** + * **Restarted**: Web app was restarted. \ + * **Stopped**: Web app was stopped. \ + * **ChangedAppSettings**: There was an operation to change app setting on the web app. \ + * **Started**: The job has started. \ + * **Completed**: The job has completed. \ + * **Failed**: The job has failed to complete. */ export type AppAction = string; @@ -3579,6 +6546,18 @@ export interface WebAppUpdatedEventData { verb?: string; } +export function webAppUpdatedEventDataDeserializer(item: any): WebAppUpdatedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationStarted event. */ export interface WebBackupOperationStartedEventData { /** Detail of action on the app. */ @@ -3597,6 +6576,20 @@ export interface WebBackupOperationStartedEventData { verb?: string; } +export function webBackupOperationStartedEventDataDeserializer( + item: any, +): WebBackupOperationStartedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationCompleted event. */ export interface WebBackupOperationCompletedEventData { /** Detail of action on the app. */ @@ -3615,6 +6608,20 @@ export interface WebBackupOperationCompletedEventData { verb?: string; } +export function webBackupOperationCompletedEventDataDeserializer( + item: any, +): WebBackupOperationCompletedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationFailed event. */ export interface WebBackupOperationFailedEventData { /** Detail of action on the app. */ @@ -3633,6 +6640,20 @@ export interface WebBackupOperationFailedEventData { verb?: string; } +export function webBackupOperationFailedEventDataDeserializer( + item: any, +): WebBackupOperationFailedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationStarted event. */ export interface WebRestoreOperationStartedEventData { /** Detail of action on the app. */ @@ -3651,6 +6672,20 @@ export interface WebRestoreOperationStartedEventData { verb?: string; } +export function webRestoreOperationStartedEventDataDeserializer( + item: any, +): WebRestoreOperationStartedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationCompleted event. */ export interface WebRestoreOperationCompletedEventData { /** Detail of action on the app. */ @@ -3669,6 +6704,20 @@ export interface WebRestoreOperationCompletedEventData { verb?: string; } +export function webRestoreOperationCompletedEventDataDeserializer( + item: any, +): WebRestoreOperationCompletedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationFailed event. */ export interface WebRestoreOperationFailedEventData { /** Detail of action on the app. */ @@ -3687,6 +6736,20 @@ export interface WebRestoreOperationFailedEventData { verb?: string; } +export function webRestoreOperationFailedEventDataDeserializer( + item: any, +): WebRestoreOperationFailedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapStarted event. */ export interface WebSlotSwapStartedEventData { /** Detail of action on the app. */ @@ -3705,6 +6768,18 @@ export interface WebSlotSwapStartedEventData { verb?: string; } +export function webSlotSwapStartedEventDataDeserializer(item: any): WebSlotSwapStartedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapCompleted event. */ export interface WebSlotSwapCompletedEventData { /** Detail of action on the app. */ @@ -3723,6 +6798,20 @@ export interface WebSlotSwapCompletedEventData { verb?: string; } +export function webSlotSwapCompletedEventDataDeserializer( + item: any, +): WebSlotSwapCompletedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapFailed event. */ export interface WebSlotSwapFailedEventData { /** Detail of action on the app. */ @@ -3741,6 +6830,18 @@ export interface WebSlotSwapFailedEventData { verb?: string; } +export function webSlotSwapFailedEventDataDeserializer(item: any): WebSlotSwapFailedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapWithPreviewStarted event. */ export interface WebSlotSwapWithPreviewStartedEventData { /** Detail of action on the app. */ @@ -3759,6 +6860,20 @@ export interface WebSlotSwapWithPreviewStartedEventData { verb?: string; } +export function webSlotSwapWithPreviewStartedEventDataDeserializer( + item: any, +): WebSlotSwapWithPreviewStartedEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapWithPreviewCancelled event. */ export interface WebSlotSwapWithPreviewCancelledEventData { /** Detail of action on the app. */ @@ -3777,6 +6892,20 @@ export interface WebSlotSwapWithPreviewCancelledEventData { verb?: string; } +export function webSlotSwapWithPreviewCancelledEventDataDeserializer( + item: any, +): WebSlotSwapWithPreviewCancelledEventData { + return { + appEventTypeDetail: appEventTypeDetailDeserializer(item["appEventTypeDetail"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.AppServicePlanUpdated event. */ export interface WebAppServicePlanUpdatedEventData { /** Detail of action on the app service plan. */ @@ -3797,6 +6926,23 @@ export interface WebAppServicePlanUpdatedEventData { verb?: string; } +export function webAppServicePlanUpdatedEventDataDeserializer( + item: any, +): WebAppServicePlanUpdatedEventData { + return { + appServicePlanEventTypeDetail: appServicePlanEventTypeDetailDeserializer( + item["appServicePlanEventTypeDetail"], + ), + sku: webAppServicePlanUpdatedEventDataSkuDeserializer(item["sku"]), + name: item["name"], + clientRequestId: item["clientRequestId"], + correlationRequestId: item["correlationRequestId"], + requestId: item["requestId"], + address: item["address"], + verb: item["verb"], + }; +} + /** Detail of action on the app service plan. */ export interface AppServicePlanEventTypeDetail { /** Kind of environment where app service plan is. */ @@ -3807,60 +6953,70 @@ export interface AppServicePlanEventTypeDetail { status: AsyncStatus; } -/** Known values of {@link StampKind} that the service accepts. */ +export function appServicePlanEventTypeDetailDeserializer( + item: any, +): AppServicePlanEventTypeDetail { + return { + stampKind: item["stampKind"], + action: item["action"], + status: item["status"], + }; +} + +/** Kind of environment where app service plan is. */ export enum KnownStampKind { - /** Public */ + /** App Service Plan is running on a public stamp. */ Public = "Public", - /** AseV1 */ + /** App Service Plan is running on an App Service Environment V1. */ AseV1 = "AseV1", - /** AseV2 */ + /** App Service Plan is running on an App Service Environment V2. */ AseV2 = "AseV2", } /** - * Kind of environment where app service plan is. + * Kind of environment where app service plan is. \ * {@link KnownStampKind} can be used interchangeably with StampKind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Public** - * **AseV1** - * **AseV2** + * **Public**: App Service Plan is running on a public stamp. \ + * **AseV1**: App Service Plan is running on an App Service Environment V1. \ + * **AseV2**: App Service Plan is running on an App Service Environment V2. */ export type StampKind = string; -/** Known values of {@link AppServicePlanAction} that the service accepts. */ +/** Type of action on the app service plan. */ export enum KnownAppServicePlanAction { - /** Updated */ + /** App Service plan is being updated. */ Updated = "Updated", } /** - * Type of action on the app service plan. + * Type of action on the app service plan. \ * {@link KnownAppServicePlanAction} can be used interchangeably with AppServicePlanAction, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Updated** + * **Updated**: App Service plan is being updated. */ export type AppServicePlanAction = string; -/** Known values of {@link AsyncStatus} that the service accepts. */ +/** Asynchronous operation status of the operation on the app service plan. */ export enum KnownAsyncStatus { - /** Started */ + /** Async operation has started. */ Started = "Started", - /** Completed */ + /** Async operation has completed. */ Completed = "Completed", - /** Failed */ + /** Async operation failed to complete. */ Failed = "Failed", } /** - * Asynchronous operation status of the operation on the app service plan. + * Asynchronous operation status of the operation on the app service plan. \ * {@link KnownAsyncStatus} can be used interchangeably with AsyncStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Started** - * **Completed** - * **Failed** + * **Started**: Async operation has started. \ + * **Completed**: Async operation has completed. \ + * **Failed**: Async operation failed to complete. */ export type AsyncStatus = string; @@ -3878,6 +7034,18 @@ export interface WebAppServicePlanUpdatedEventDataSku { capacity?: string; } +export function webAppServicePlanUpdatedEventDataSkuDeserializer( + item: any, +): WebAppServicePlanUpdatedEventDataSku { + return { + name: item["name"], + tier: item["Tier"], + size: item["Size"], + family: item["Family"], + capacity: item["Capacity"], + }; +} + /** Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event. */ export interface SubscriptionValidationEventData { /** @@ -3894,6 +7062,15 @@ export interface SubscriptionValidationEventData { validationUrl: string; } +export function subscriptionValidationEventDataDeserializer( + item: any, +): SubscriptionValidationEventData { + return { + validationCode: item["validationCode"], + validationUrl: item["validationUrl"], + }; +} + /** * To complete an event subscription validation handshake, a subscriber can use * either the validationCode or the validationUrl received in a @@ -3905,6 +7082,14 @@ export interface SubscriptionValidationResponse { validationResponse: string; } +export function subscriptionValidationResponseDeserializer( + item: any, +): SubscriptionValidationResponse { + return { + validationResponse: item["validationResponse"], + }; +} + /** * Schema of the Data property of an EventGridEvent for a * Microsoft.EventGrid.SubscriptionDeletedEvent event. @@ -3914,6 +7099,12 @@ export interface SubscriptionDeletedEventData { eventSubscriptionId: string; } +export function subscriptionDeletedEventDataDeserializer(item: any): SubscriptionDeletedEventData { + return { + eventSubscriptionId: item["eventSubscriptionId"], + }; +} + /** Schema of the Data property of an EventGridEvent for MQTT Client state changes. */ export interface EventGridMqttClientEventData { /** @@ -3928,6 +7119,14 @@ export interface EventGridMqttClientEventData { namespaceName: string; } +export function eventGridMqttClientEventDataDeserializer(item: any): EventGridMqttClientEventData { + return { + clientAuthenticationName: item["clientAuthenticationName"], + clientName: item["clientName"], + namespaceName: item["namespaceName"], + }; +} + /** Event data for Microsoft.EventGrid.MQTTClientCreatedOrUpdated event. */ export interface EventGridMqttClientCreatedOrUpdatedEventData extends EventGridMqttClientEventData { /** Configured state of the client. The value could be Enabled or Disabled */ @@ -3944,7 +7143,21 @@ export interface EventGridMqttClientCreatedOrUpdatedEventData extends EventGridM attributes: Record; } -/** Known values of {@link EventGridMqttClientState} that the service accepts. */ +export function eventGridMqttClientCreatedOrUpdatedEventDataDeserializer( + item: any, +): EventGridMqttClientCreatedOrUpdatedEventData { + return { + clientAuthenticationName: item["clientAuthenticationName"], + clientName: item["clientName"], + namespaceName: item["namespaceName"], + state: item["state"], + createdOn: new Date(item["createdOn"]), + updatedOn: new Date(item["updatedOn"]), + attributes: item["attributes"], + }; +} + +/** EventGrid MQTT Client State */ export enum KnownEventGridMqttClientState { /** Enabled */ Enabled = "Enabled", @@ -3953,18 +7166,28 @@ export enum KnownEventGridMqttClientState { } /** - * EventGrid MQTT Client State + * EventGrid MQTT Client State \ * {@link KnownEventGridMqttClientState} can be used interchangeably with EventGridMqttClientState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Enabled** - * **Disabled** + * **Enabled**: Enabled \ + * **Disabled**: Disabled */ export type EventGridMqttClientState = string; /** Event data for Microsoft.EventGrid.MQTTClientDeleted event. */ export interface EventGridMqttClientDeletedEventData extends EventGridMqttClientEventData {} +export function eventGridMqttClientDeletedEventDataDeserializer( + item: any, +): EventGridMqttClientDeletedEventData { + return { + clientAuthenticationName: item["clientAuthenticationName"], + clientName: item["clientName"], + namespaceName: item["namespaceName"], + }; +} + /** Event data for Microsoft.EventGrid.MQTTClientSessionConnected event. */ export interface EventGridMqttClientSessionConnectedEventData extends EventGridMqttClientEventData { /** @@ -3980,6 +7203,18 @@ export interface EventGridMqttClientSessionConnectedEventData extends EventGridM sequenceNumber: number; } +export function eventGridMqttClientSessionConnectedEventDataDeserializer( + item: any, +): EventGridMqttClientSessionConnectedEventData { + return { + clientAuthenticationName: item["clientAuthenticationName"], + clientName: item["clientName"], + namespaceName: item["namespaceName"], + clientSessionName: item["clientSessionName"], + sequenceNumber: item["sequenceNumber"], + }; +} + /** Event data for Microsoft.EventGrid.MQTTClientSessionDisconnected event. */ export interface EventGridMqttClientSessionDisconnectedEventData extends EventGridMqttClientEventData { @@ -4001,48 +7236,61 @@ export interface EventGridMqttClientSessionDisconnectedEventData disconnectionReason: EventGridMqttClientDisconnectionReason; } -/** Known values of {@link EventGridMqttClientDisconnectionReason} that the service accepts. */ +export function eventGridMqttClientSessionDisconnectedEventDataDeserializer( + item: any, +): EventGridMqttClientSessionDisconnectedEventData { + return { + clientAuthenticationName: item["clientAuthenticationName"], + clientName: item["clientName"], + namespaceName: item["namespaceName"], + clientSessionName: item["clientSessionName"], + sequenceNumber: item["sequenceNumber"], + disconnectionReason: item["disconnectionReason"], + }; +} + +/** EventGrid MQTT Client Disconnection Reason */ export enum KnownEventGridMqttClientDisconnectionReason { - /** ClientAuthenticationError */ + /** The client got disconnected for any authentication reasons (for example, certificate expired, client got disabled, or client configuration changed). */ ClientAuthenticationError = "ClientAuthenticationError", - /** ClientAuthorizationError */ + /** The client got disconnected for any authorization reasons (for example, because of a change in the configuration of topic spaces, permission bindings, or client groups). */ ClientAuthorizationError = "ClientAuthorizationError", - /** ClientError */ + /** The client sent a bad request or used one of the unsupported features that resulted in a connection termination by the service. */ ClientError = "ClientError", - /** ClientInitiatedDisconnect */ + /** The client initiated a graceful disconnect through a DISCONNECT packet for MQTT or a close frame for MQTT over WebSocket. */ ClientInitiatedDisconnect = "ClientInitiatedDisconnect", - /** ConnectionLost */ + /** The client-server connection is lost. (EXCHANGE ONLINE PROTECTION). */ ConnectionLost = "ConnectionLost", - /** IpForbidden */ + /** The client's IP address is blocked by IP filter or Private links configuration. */ IpForbidden = "IpForbidden", - /** QuotaExceeded */ + /** The client exceeded one or more of the throttling limits that resulted in a connection termination by the service. */ QuotaExceeded = "QuotaExceeded", - /** ServerError */ + /** The connection got terminated due to an unexpected server error. */ ServerError = "ServerError", - /** ServerInitiatedDisconnect */ + /** The server initiates a graceful disconnect for any operational reason. */ ServerInitiatedDisconnect = "ServerInitiatedDisconnect", - /** SessionOverflow */ + /** The client's queue for unacknowledged QoS1 messages reached its limit, which resulted in a connection termination by the server. */ SessionOverflow = "SessionOverflow", - /** SessionTakenOver */ + /** The client reconnected with the same authentication name, which resulted in the termination of the previous connection. */ SessionTakenOver = "SessionTakenOver", } /** - * EventGrid MQTT Client Disconnection Reason + * EventGrid MQTT Client Disconnection Reason \ * {@link KnownEventGridMqttClientDisconnectionReason} can be used interchangeably with EventGridMqttClientDisconnectionReason, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ClientAuthenticationError** - * **ClientAuthorizationError** - * **ClientError** - * **ClientInitiatedDisconnect** - * **ConnectionLost** - * **IpForbidden** - * **QuotaExceeded** - * **ServerError** - * **ServerInitiatedDisconnect** - * **SessionOverflow** - * **SessionTakenOver** + * **ClientAuthenticationError**: The client got disconnected for any authentication reasons (for example, certificate expired, client got disabled, or client configuration changed). \ + * **ClientAuthorizationError**: The client got disconnected for any authorization reasons (for example, because of a change in the configuration of topic spaces, permission bindings, or client groups). \ + * **ClientError**: The client sent a bad request or used one of the unsupported features that resulted in a connection termination by the service. \ + * **ClientInitiatedDisconnect**: The client initiated a graceful disconnect through a DISCONNECT packet for MQTT or a close frame for MQTT over WebSocket. \ + * **ConnectionLost**: The client-server connection is lost. (EXCHANGE ONLINE PROTECTION). \ + * **IpForbidden**: The client's IP address is blocked by IP filter or Private links configuration. \ + * **QuotaExceeded**: The client exceeded one or more of the throttling limits that resulted in a connection termination by the service. \ + * **ServerError**: The connection got terminated due to an unexpected server error. \ + * **ServerInitiatedDisconnect**: The server initiates a graceful disconnect for any operational reason. \ + * **SessionOverflow**: The client's queue for unacknowledged QoS1 messages reached its limit, which resulted in a connection termination by the server. \ + * **SessionTakenOver**: The client reconnected with the same authentication name, which resulted in the termination of the previous connection. */ export type EventGridMqttClientDisconnectionReason = string; @@ -4056,6 +7304,18 @@ export interface ResourceNotificationsResourceUpdatedEventData { apiVersion: string; } +export function resourceNotificationsResourceUpdatedEventDataDeserializer( + item: any, +): ResourceNotificationsResourceUpdatedEventData { + return { + resourceDetails: resourceNotificationsResourceUpdatedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + apiVersion: item["apiVersion"], + }; +} + /** * Describes the schema of the properties under resource info which are common * across all ARN system topic events @@ -4075,12 +7335,33 @@ export interface ResourceNotificationsResourceUpdatedDetails { properties?: Record; } +export function resourceNotificationsResourceUpdatedDetailsDeserializer( + item: any, +): ResourceNotificationsResourceUpdatedDetails { + return { + id: item["id"], + name: item["name"], + type: item["type"], + location: item["location"], + tags: item["tags"], + properties: item["properties"], + }; +} + /** details of operational info */ export interface ResourceNotificationsOperationalDetails { /** Date and Time when resource was updated */ resourceEventTime: Date; } +export function resourceNotificationsOperationalDetailsDeserializer( + item: any, +): ResourceNotificationsOperationalDetails { + return { + resourceEventTime: new Date(item["resourceEventTime"]), + }; +} + /** * Schema of the Data property of an EventGridEvent for a * Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged @@ -4089,6 +7370,18 @@ export interface ResourceNotificationsOperationalDetails { export interface ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData extends ResourceNotificationsResourceUpdatedEventData {} +export function resourceNotificationsHealthResourcesAvailabilityStatusChangedEventDataDeserializer( + item: any, +): ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData { + return { + resourceDetails: resourceNotificationsResourceUpdatedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + apiVersion: item["apiVersion"], + }; +} + /** * Schema of the Data property of an EventGridEvent for a * Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated event. @@ -4096,6 +7389,18 @@ export interface ResourceNotificationsHealthResourcesAvailabilityStatusChangedEv export interface ResourceNotificationsHealthResourcesAnnotatedEventData extends ResourceNotificationsResourceUpdatedEventData {} +export function resourceNotificationsHealthResourcesAnnotatedEventDataDeserializer( + item: any, +): ResourceNotificationsHealthResourcesAnnotatedEventData { + return { + resourceDetails: resourceNotificationsResourceUpdatedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + apiVersion: item["apiVersion"], + }; +} + /** * Describes the schema of the properties under resource info which are common * across all ARN system topic delete events @@ -4109,6 +7414,16 @@ export interface ResourceNotificationsResourceDeletedDetails { type: string; } +export function resourceNotificationsResourceDeletedDetailsDeserializer( + item: any, +): ResourceNotificationsResourceDeletedDetails { + return { + id: item["id"], + name: item["name"], + type: item["type"], + }; +} + /** * Describes the schema of the common properties across all ARN system topic * delete events @@ -4120,6 +7435,17 @@ export interface ResourceNotificationsResourceDeletedEventData { operationalDetails: ResourceNotificationsOperationalDetails; } +export function resourceNotificationsResourceDeletedEventDataDeserializer( + item: any, +): ResourceNotificationsResourceDeletedEventData { + return { + resourceDetails: resourceNotificationsResourceDeletedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + }; +} + /** * Schema of the Data property of an EventGridEvent for a * Microsoft.ResourceNotifications.Resources.CreatedOrUpdated event. @@ -4127,6 +7453,18 @@ export interface ResourceNotificationsResourceDeletedEventData { export interface ResourceNotificationsResourceManagementCreatedOrUpdatedEventData extends ResourceNotificationsResourceUpdatedEventData {} +export function resourceNotificationsResourceManagementCreatedOrUpdatedEventDataDeserializer( + item: any, +): ResourceNotificationsResourceManagementCreatedOrUpdatedEventData { + return { + resourceDetails: resourceNotificationsResourceUpdatedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + apiVersion: item["apiVersion"], + }; +} + /** * Schema of the Data property of an EventGridEvent for a * Microsoft.ResourceNotifications.Resources.Deleted event. @@ -4134,9 +7472,35 @@ export interface ResourceNotificationsResourceManagementCreatedOrUpdatedEventDat export interface ResourceNotificationsResourceManagementDeletedEventData extends ResourceNotificationsResourceDeletedEventData {} +export function resourceNotificationsResourceManagementDeletedEventDataDeserializer( + item: any, +): ResourceNotificationsResourceManagementDeletedEventData { + return { + resourceDetails: resourceNotificationsResourceDeletedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + }; +} + /** Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. */ export interface ResourceNotificationsContainerServiceEventResourcesScheduledEventData extends ResourceNotificationsResourceUpdatedEventData {} -/** Type of ServiceApiVersions */ -export type ServiceApiVersions = "2018-01-01" | "2024-01-01"; +export function resourceNotificationsContainerServiceEventResourcesScheduledEventDataDeserializer( + item: any, +): ResourceNotificationsContainerServiceEventResourcesScheduledEventData { + return { + resourceDetails: resourceNotificationsResourceUpdatedDetailsDeserializer(item["resourceInfo"]), + operationalDetails: resourceNotificationsOperationalDetailsDeserializer( + item["operationalInfo"], + ), + apiVersion: item["apiVersion"], + }; +} + +/** Known values of {@link ServiceApiVersions} that the service accepts. */ +export enum KnownServiceApiVersions { + v2018_01_01 = "2018-01-01", + v2024_01_01 = "2024-01-01", +} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/predicates.ts b/sdk/eventgrid/eventgrid-systemevents/src/predicates.ts deleted file mode 100644 index 5c11b430ba85..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/src/predicates.ts +++ /dev/null @@ -1,618 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { - KeyVaultCertificateNewVersionCreatedEventData, - KeyVaultCertificateNearExpiryEventData, - KeyVaultCertificateExpiredEventData, - KeyVaultKeyNewVersionCreatedEventData, - KeyVaultKeyNearExpiryEventData, - KeyVaultKeyExpiredEventData, - KeyVaultSecretNewVersionCreatedEventData, - KeyVaultSecretNearExpiryEventData, - KeyVaultAccessPolicyChangedEventData, - KeyVaultSecretExpiredEventData, -} from "./models.js"; - -import type { - AcsChatMessageDeletedEventData, - AcsChatMessageDeletedInThreadEventData, - AcsChatMessageEditedEventData, - AcsChatMessageEditedInThreadEventData, - AcsChatMessageReceivedEventData, - AcsChatMessageReceivedInThreadEventData, - AcsChatParticipantAddedToThreadEventData, - AcsChatParticipantAddedToThreadWithUserEventData, - AcsChatParticipantRemovedFromThreadEventData, - AcsChatParticipantRemovedFromThreadWithUserEventData, - AcsChatThreadCreatedWithUserEventData, - AcsChatThreadPropertiesUpdatedPerUserEventData, - AcsChatThreadWithUserDeletedEventData, - AcsRecordingFileStatusUpdatedEventData, - AcsSmsDeliveryReportReceivedEventData, - AcsSmsReceivedEventData, - AcsUserDisconnectedEventData, - ApiManagementApiCreatedEventData, - ApiManagementApiDeletedEventData, - ApiManagementApiReleaseCreatedEventData, - ApiManagementApiReleaseDeletedEventData, - ApiManagementApiReleaseUpdatedEventData, - ApiManagementApiUpdatedEventData, - ApiManagementProductCreatedEventData, - ApiManagementProductDeletedEventData, - ApiManagementProductUpdatedEventData, - ApiManagementSubscriptionCreatedEventData, - ApiManagementSubscriptionDeletedEventData, - ApiManagementSubscriptionUpdatedEventData, - ApiManagementUserCreatedEventData, - ApiManagementUserDeletedEventData, - ApiManagementUserUpdatedEventData, - AppConfigurationKeyValueDeletedEventData, - AppConfigurationKeyValueModifiedEventData, - ContainerRegistryChartDeletedEventData, - ContainerRegistryChartPushedEventData, - ContainerRegistryImageDeletedEventData, - ContainerRegistryImagePushedEventData, - ContainerServiceNewKubernetesVersionAvailableEventData, - EventHubCaptureFileCreatedEventData, - HealthcareDicomImageCreatedEventData, - HealthcareDicomImageDeletedEventData, - HealthcareFhirResourceCreatedEventData, - HealthcareFhirResourceDeletedEventData, - HealthcareFhirResourceUpdatedEventData, - IotHubDeviceConnectedEventData, - IotHubDeviceCreatedEventData, - IotHubDeviceDeletedEventData, - IotHubDeviceDisconnectedEventData, - IotHubDeviceTelemetryEventData, - MachineLearningServicesDatasetDriftDetectedEventData, - MachineLearningServicesModelDeployedEventData, - MachineLearningServicesModelRegisteredEventData, - MachineLearningServicesRunCompletedEventData, - MachineLearningServicesRunStatusChangedEventData, - MapsGeofenceEnteredEventData, - MapsGeofenceExitedEventData, - MapsGeofenceResultEventData, - PolicyInsightsPolicyStateChangedEventData, - PolicyInsightsPolicyStateCreatedEventData, - PolicyInsightsPolicyStateDeletedEventData, - ResourceActionCancelEventData, - ResourceActionFailureEventData, - ResourceActionSuccessEventData, - ResourceDeleteCancelEventData, - ResourceDeleteFailureEventData, - ResourceDeleteSuccessEventData, - ResourceWriteCancelEventData, - ResourceWriteFailureEventData, - ResourceWriteSuccessEventData, - ServiceBusActiveMessagesAvailableWithNoListenersEventData, - ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, - StorageAsyncOperationInitiatedEventData, - StorageBlobCreatedEventData, - StorageBlobDeletedEventData, - StorageBlobInventoryPolicyCompletedEventData, - StorageBlobRenamedEventData, - StorageBlobTierChangedEventData, - StorageDirectoryCreatedEventData, - StorageDirectoryDeletedEventData, - StorageDirectoryRenamedEventData, - StorageLifecyclePolicyCompletedEventData, - SubscriptionDeletedEventData, - SubscriptionValidationEventData, - WebAppServicePlanUpdatedEventData, - WebAppUpdatedEventData, - WebBackupOperationCompletedEventData, - WebBackupOperationFailedEventData, - WebBackupOperationStartedEventData, - WebRestoreOperationCompletedEventData, - WebRestoreOperationFailedEventData, - WebRestoreOperationStartedEventData, - WebSlotSwapCompletedEventData, - WebSlotSwapFailedEventData, - WebSlotSwapStartedEventData, - WebSlotSwapWithPreviewCancelledEventData, - WebSlotSwapWithPreviewStartedEventData, - StorageTaskQueuedEventData, - StorageTaskCompletedEventData, - DataBoxCopyStartedEventData, - DataBoxCopyCompletedEventData, - DataBoxOrderCompletedEventData, - AcsIncomingCallEventData, - AcsEmailDeliveryReportReceivedEventData, - AcsEmailEngagementTrackingReportReceivedEventData, - ApiManagementGatewayCreatedEventData, - ApiManagementGatewayUpdatedEventData, - ApiManagementGatewayDeletedEventData, - ApiManagementGatewayHostnameConfigurationCreatedEventData, - ApiManagementGatewayHostnameConfigurationUpdatedEventData, - ApiManagementGatewayHostnameConfigurationDeletedEventData, - ApiManagementGatewayCertificateAuthorityCreatedEventData, - ApiManagementGatewayCertificateAuthorityUpdatedEventData, - ApiManagementGatewayCertificateAuthorityDeletedEventData, - ApiManagementGatewayApiAddedEventData, - ApiManagementGatewayApiRemovedEventData, - HealthcareDicomImageUpdatedEventData, - ContainerServiceClusterSupportEndedEventData, - ContainerServiceClusterSupportEndingEventData, - ContainerServiceNodePoolRollingStartedEventData, - ContainerServiceNodePoolRollingSucceededEventData, - ContainerServiceNodePoolRollingFailedEventData, - EventGridMqttClientCreatedOrUpdatedEventData, - EventGridMqttClientDeletedEventData, - EventGridMqttClientSessionConnectedEventData, - EventGridMqttClientSessionDisconnectedEventData, - AppConfigurationSnapshotCreatedEventData, - AppConfigurationSnapshotModifiedEventData, - ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData, - ResourceNotificationsHealthResourcesAnnotatedEventData, - AcsRouterWorkerDeregisteredEventData, - AcsRouterWorkerRegisteredEventData, - AcsRouterJobCancelledEventData, - AcsRouterJobClassificationFailedEventData, - AcsRouterJobClassifiedEventData, - AcsRouterJobClosedEventData, - AcsRouterJobCompletedEventData, - AcsRouterJobDeletedEventData, - AcsRouterJobExceptionTriggeredEventData, - AcsRouterJobQueuedEventData, - AcsRouterJobReceivedEventData, - AcsRouterJobSchedulingFailedEventData, - AcsRouterJobUnassignedEventData, - AcsRouterJobWaitingForActivationEventData, - AcsRouterJobWorkerSelectorsExpiredEventData, - AcsRouterWorkerDeletedEventData, - AcsRouterWorkerOfferAcceptedEventData, - AcsRouterWorkerOfferDeclinedEventData, - AcsRouterWorkerOfferExpiredEventData, - AcsRouterWorkerOfferIssuedEventData, - AcsRouterWorkerOfferRevokedEventData, - ResourceNotificationsResourceManagementCreatedOrUpdatedEventData, - ResourceNotificationsResourceManagementDeletedEventData, - StorageTaskAssignmentQueuedEventData, - AvsScriptExecutionStartedEventData, - AvsScriptExecutionCancelledEventData, - AvsClusterCreatedEventData, - AvsPrivateCloudFailedEventData, - AvsPrivateCloudUpdatingEventData, - AvsPrivateCloudUpdatedEventData, - AvsClusterUpdatingEventData, - AvsClusterDeletedEventData, - AvsScriptExecutionFailedEventData, - AvsScriptExecutionFinishedEventData, - StorageTaskAssignmentCompletedEventData, - AvsClusterUpdatedEventData, - AvsClusterFailedEventData, - ApiCenterApiDefinitionAddedEventData, - ApiCenterApiDefinitionUpdatedEventData, - AcsMessageDeliveryStatusUpdatedEventData, - AcsMessageReceivedEventData, - AcsRouterWorkerUpdatedEventData, -} from "./cadl-generated/models/index.js"; - -import type { CloudEvent, EventGridEvent } from "./models.js"; - -/** - * The Event Types for all System Events. These may be used with `isSystemEvent` to determine if an - * event is a system event of a given type. - */ -export type KnownSystemEventTypes = keyof SystemEventNameToEventData; - -/** - * A mapping of event type names to event data type interfaces. - */ -export interface SystemEventNameToEventData { - /** An interface for the event data of a "Microsoft.ApiManagement.UserCreated" event. */ - "Microsoft.ApiManagement.UserCreated": ApiManagementUserCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.UserUpdated" event. */ - "Microsoft.ApiManagement.UserUpdated": ApiManagementUserUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.UserDeleted" event. */ - "Microsoft.ApiManagement.UserDeleted": ApiManagementUserDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.SubscriptionCreated" event. */ - "Microsoft.ApiManagement.SubscriptionCreated": ApiManagementSubscriptionCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.SubscriptionUpdated" event. */ - "Microsoft.ApiManagement.SubscriptionUpdated": ApiManagementSubscriptionUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.SubscriptionDeleted" event. */ - "Microsoft.ApiManagement.SubscriptionDeleted": ApiManagementSubscriptionDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.ProductCreated" event. */ - "Microsoft.ApiManagement.ProductCreated": ApiManagementProductCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.ProductUpdated" event. */ - "Microsoft.ApiManagement.ProductUpdated": ApiManagementProductUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.ProductDeleted" event. */ - "Microsoft.ApiManagement.ProductDeleted": ApiManagementProductDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.APICreated" event. */ - "Microsoft.ApiManagement.APICreated": ApiManagementApiCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.APIUpdated" event. */ - "Microsoft.ApiManagement.APIUpdated": ApiManagementApiUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.APIDeleted" event. */ - "Microsoft.ApiManagement.APIDeleted": ApiManagementApiDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.APIReleaseCreated" event. */ - "Microsoft.ApiManagement.APIReleaseCreated": ApiManagementApiReleaseCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.APIReleaseUpdated" event. */ - "Microsoft.ApiManagement.APIReleaseUpdated": ApiManagementApiReleaseUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.APIReleaseDeleted" event. */ - "Microsoft.ApiManagement.APIReleaseDeleted": ApiManagementApiReleaseDeletedEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatMessageReceived" event. */ - "Microsoft.Communication.ChatMessageReceived": AcsChatMessageReceivedEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatMessageReceivedInThread" event. */ - "Microsoft.Communication.ChatMessageReceivedInThread": AcsChatMessageReceivedInThreadEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatMessageEdited" event. */ - "Microsoft.Communication.ChatMessageEdited": AcsChatMessageEditedEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatMessageEditedInThread" event. */ - "Microsoft.Communication.ChatMessageEditedInThread": AcsChatMessageEditedInThreadEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatMessageDeleted" event. */ - "Microsoft.Communication.ChatMessageDeleted": AcsChatMessageDeletedEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatMessageDeletedInThread" event. */ - "Microsoft.Communication.ChatMessageDeletedInThread": AcsChatMessageDeletedInThreadEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatThreadCreatedWithUser" event. */ - "Microsoft.Communication.ChatThreadCreatedWithUser": AcsChatThreadCreatedWithUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatThreadWithUserDeleted" event. */ - "Microsoft.Communication.ChatThreadWithUserDeleted": AcsChatThreadWithUserDeletedEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser" event. */ - "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser": AcsChatThreadPropertiesUpdatedPerUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantAdded" event. */ - "Microsoft.Communication.ChatThreadParticipantAdded": AcsChatParticipantAddedToThreadEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatParticipantAddedToThreadWithUser" event. */ - "Microsoft.Communication.ChatParticipantAddedToThreadWithUser": AcsChatParticipantAddedToThreadWithUserEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatThreadParticipantRemoved" event. */ - "Microsoft.Communication.ChatThreadParticipantRemoved": AcsChatParticipantRemovedFromThreadEventData; - /** An interface for the event data of a "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser" event. */ - "Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser": AcsChatParticipantRemovedFromThreadWithUserEventData; - /** An interface for the event data of a "Microsoft.Communication.RecordingFileStatusUpdated" event. */ - "Microsoft.Communication.RecordingFileStatusUpdated": AcsRecordingFileStatusUpdatedEventData; - /** An interface for the event data of a "Microsoft.Communication.SMSDeliveryReportReceived" event. */ - "Microsoft.Communication.SMSDeliveryReportReceived": AcsSmsDeliveryReportReceivedEventData; - /** An interface for the event data of a "Microsoft.Communication.SMSReceived" event. */ - "Microsoft.Communication.SMSReceived": AcsSmsReceivedEventData; - /** An interface for the event data of a "Microsoft.Communication.UserDisconnected" event. */ - "Microsoft.Communication.UserDisconnected": AcsUserDisconnectedEventData; - /** An interface for the event data of a "Microsoft.ContainerService.NewKubernetesVersionAvailable" event. */ - "Microsoft.ContainerService.NewKubernetesVersionAvailable": ContainerServiceNewKubernetesVersionAvailableEventData; - /** An interface for the event data of a "Microsoft.AppConfiguration.KeyValueDeleted" event. */ - "Microsoft.AppConfiguration.KeyValueDeleted": AppConfigurationKeyValueDeletedEventData; - /** An interface for the event data of a "Microsoft.AppConfiguration.KeyValueModified" event. */ - "Microsoft.AppConfiguration.KeyValueModified": AppConfigurationKeyValueModifiedEventData; - /** An interface for the event data of a "Microsoft.ContainerRegistry.ImagePushed" event. */ - "Microsoft.ContainerRegistry.ImagePushed": ContainerRegistryImagePushedEventData; - /** An interface for the event data of a "Microsoft.ContainerRegistry.ImageDeleted" event. */ - "Microsoft.ContainerRegistry.ImageDeleted": ContainerRegistryImageDeletedEventData; - /** An interface for the event data of a "Microsoft.ContainerRegistry.ChartDeleted" event. */ - "Microsoft.ContainerRegistry.ChartDeleted": ContainerRegistryChartDeletedEventData; - /** An interface for the event data of a "Microsoft.ContainerRegistry.ChartPushed" event. */ - "Microsoft.ContainerRegistry.ChartPushed": ContainerRegistryChartPushedEventData; - /** An interface for the event data of a "Microsoft.Devices.DeviceCreated" event. */ - "Microsoft.Devices.DeviceCreated": IotHubDeviceCreatedEventData; - /** An interface for the event data of a "Microsoft.Devices.DeviceDeleted" event. */ - "Microsoft.Devices.DeviceDeleted": IotHubDeviceDeletedEventData; - /** An interface for the event data of a "Microsoft.Devices.DeviceConnected" event. */ - "Microsoft.Devices.DeviceConnected": IotHubDeviceConnectedEventData; - /** An interface for the event data of a "Microsoft.Devices.DeviceDisconnected" event. */ - "Microsoft.Devices.DeviceDisconnected": IotHubDeviceDisconnectedEventData; - /** An interface for the event data of a "Microsoft.Devices.DeviceTelemetry" event. */ - "Microsoft.Devices.DeviceTelemetry": IotHubDeviceTelemetryEventData; - /** An interface for the event data of a "Microsoft.EventGrid.SubscriptionValidationEvent" event. */ - "Microsoft.EventGrid.SubscriptionValidationEvent": SubscriptionValidationEventData; - /** An interface for the event data of a "Microsoft.EventGrid.SubscriptionDeletedEvent" event. */ - "Microsoft.EventGrid.SubscriptionDeletedEvent": SubscriptionDeletedEventData; - /** An interface for the event data of a "Microsoft.EventHub.CaptureFileCreated" event. */ - "Microsoft.EventHub.CaptureFileCreated": EventHubCaptureFileCreatedEventData; - /** An interface for the event data of a "Microsoft.HealthcareApis.DicomImageCreated" event. */ - "Microsoft.HealthcareApis.DicomImageCreated": HealthcareDicomImageCreatedEventData; - /** An interface for the event data of a "Microsoft.HealthcareApis.DicomImageDeleted" event. */ - "Microsoft.HealthcareApis.DicomImageDeleted": HealthcareDicomImageDeletedEventData; - /** An interface for the event data of a "Microsoft.HealthcareApis.FhirResourceCreated" event. */ - "Microsoft.HealthcareApis.FhirResourceCreated": HealthcareFhirResourceCreatedEventData; - /** An interface for the event data of a "Microsoft.HealthcareApis.FhirUpdatedCreated" event. */ - "Microsoft.HealthcareApis.FhirUpdatedCreated": HealthcareFhirResourceUpdatedEventData; - /** An interface for the event data of a "Microsoft.HealthcareApis.FhirDeletedCreated" event. */ - "Microsoft.HealthcareApis.FhirDeletedCreated": HealthcareFhirResourceDeletedEventData; - /** An interface for the event data of a "Microsoft.KeyVault.CertificateNewVersionCreated" event. */ - "Microsoft.KeyVault.CertificateNewVersionCreated": KeyVaultCertificateNewVersionCreatedEventData; - /** An interface for the event data of a "Microsoft.KeyVault.CertificateNearExpiry" event. */ - "Microsoft.KeyVault.CertificateNearExpiry": KeyVaultCertificateNearExpiryEventData; - /** An interface for the event data of a "Microsoft.KeyVault.CertificateExpired" event. */ - "Microsoft.KeyVault.CertificateExpired": KeyVaultCertificateExpiredEventData; - /** An interface for the event data of a "Microsoft.KeyVault.KeyNewVersionCreated" event. */ - "Microsoft.KeyVault.KeyNewVersionCreated": KeyVaultKeyNewVersionCreatedEventData; - /** An interface for the event data of a "Microsoft.KeyVault.KeyNearExpiry" event. */ - "Microsoft.KeyVault.KeyNearExpiry": KeyVaultKeyNearExpiryEventData; - /** An interface for the event data of a "Microsoft.KeyVault.KeyExpired" event. */ - "Microsoft.KeyVault.KeyExpired": KeyVaultKeyExpiredEventData; - /** An interface for the event data of a "Microsoft.KeyVault.SecretNewVersionCreated" event. */ - "Microsoft.KeyVault.SecretNewVersionCreated": KeyVaultSecretNewVersionCreatedEventData; - /** An interface for the event data of a "Microsoft.KeyVault.SecretNearExpiry" event. */ - "Microsoft.KeyVault.SecretNearExpiry": KeyVaultSecretNearExpiryEventData; - /** An interface for the event data of a "Microsoft.KeyVault.SecretExpired" event. */ - "Microsoft.KeyVault.SecretExpired": KeyVaultSecretExpiredEventData; - /** An interface for the event data of a "Microsoft.KeyVault.VaultAccessPolicyChanged" event. */ - "Microsoft.KeyVault.VaultAccessPolicyChanged": KeyVaultAccessPolicyChangedEventData; - /** An interface for the event data of a "Microsoft.MachineLearningServices.DatasetDriftDetected" event. */ - "Microsoft.MachineLearningServices.DatasetDriftDetected": MachineLearningServicesDatasetDriftDetectedEventData; - /** An interface for the event data of a "Microsoft.MachineLearningServices.ModelDeployed" event. */ - "Microsoft.MachineLearningServices.ModelDeployed": MachineLearningServicesModelDeployedEventData; - /** An interface for the event data of a "Microsoft.MachineLearningServices.ModelRegistered" event. */ - "Microsoft.MachineLearningServices.ModelRegistered": MachineLearningServicesModelRegisteredEventData; - /** An interface for the event data of a "Microsoft.MachineLearningServices.RunCompleted" event. */ - "Microsoft.MachineLearningServices.RunCompleted": MachineLearningServicesRunCompletedEventData; - /** An interface for the event data of a "Microsoft.MachineLearningServices.RunStatusChanged" event. */ - "Microsoft.MachineLearningServices.RunStatusChanged": MachineLearningServicesRunStatusChangedEventData; - /** An interface for the event data of a "Microsoft.Maps.GeofenceEntered" event. */ - "Microsoft.Maps.GeofenceEntered": MapsGeofenceEnteredEventData; - /** An interface for the event data of a "Microsoft.Maps.GeofenceExited" event. */ - "Microsoft.Maps.GeofenceExited": MapsGeofenceExitedEventData; - /** An interface for the event data of a "Microsoft.Maps.GeofenceResult" event. */ - "Microsoft.Maps.GeofenceResult": MapsGeofenceResultEventData; - /** An interface for the event data of a "Microsoft.PolicyInsights.PolicyStateChanged" event. */ - "Microsoft.PolicyInsights.PolicyStateChanged ": PolicyInsightsPolicyStateChangedEventData; - /** An interface for the event data of a " Microsoft.PolicyInsights.PolicyStateCreated" event. */ - "Microsoft.PolicyInsights.PolicyStateCreated": PolicyInsightsPolicyStateCreatedEventData; - /** An interface for the event data of a "Microsoft.PolicyInsights.PolicyStateDeleted" event. */ - "Microsoft.PolicyInsights.PolicyStateDeleted": PolicyInsightsPolicyStateDeletedEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceDeleteSuccess" event. */ - "Microsoft.Resources.ResourceWriteSuccess": ResourceWriteSuccessEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceWriteFailure" event. */ - "Microsoft.Resources.ResourceWriteFailure": ResourceWriteFailureEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceWriteCancel" event. */ - "Microsoft.Resources.ResourceWriteCancel": ResourceWriteCancelEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceDeleteSuccess" event. */ - "Microsoft.Resources.ResourceDeleteSuccess": ResourceDeleteSuccessEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceDeleteFailure" event. */ - "Microsoft.Resources.ResourceDeleteFailure": ResourceDeleteFailureEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceDeleteCancel" event. */ - "Microsoft.Resources.ResourceDeleteCancel": ResourceDeleteCancelEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceActionSuccess" event. */ - "Microsoft.Resources.ResourceActionSuccess": ResourceActionSuccessEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceActionFailure" event. */ - "Microsoft.Resources.ResourceActionFailure": ResourceActionFailureEventData; - /** An interface for the event data of a "Microsoft.Resources.ResourceActionCancel" event. */ - "Microsoft.Resources.ResourceActionCancel": ResourceActionCancelEventData; - /** An interface for the event data of a "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners" event. */ - "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners": ServiceBusActiveMessagesAvailableWithNoListenersEventData; - /** An interface for the event data of a "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners" event. */ - "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners": ServiceBusDeadletterMessagesAvailableWithNoListenersEventData; - /** An interface for the event data of a "Microsoft.Storage.AsyncOperationInitiated" event. */ - "Microsoft.Storage.AsyncOperationInitiated": StorageAsyncOperationInitiatedEventData; - /** An interface for the event data of a "Microsoft.Storage.BlobCreated" event. */ - "Microsoft.Storage.BlobCreated": StorageBlobCreatedEventData; - /** An interface for the event data of a "Microsoft.Storage.BlobDeleted" event. */ - "Microsoft.Storage.BlobDeleted": StorageBlobDeletedEventData; - /** An interface for the event data of a "Microsoft.Storage.BlobInventoryPolicyCompleted" event. */ - "Microsoft.Storage.BlobInventoryPolicyCompleted": StorageBlobInventoryPolicyCompletedEventData; - /** An interface for the event data of a "Microsoft.Storage.BlobTierChanged" event. */ - "Microsoft.Storage.BlobTierChanged": StorageBlobTierChangedEventData; - /** An interface for the event data of a "Microsoft.Storage.BlobRenamed" event. */ - "Microsoft.Storage.BlobRenamed": StorageBlobRenamedEventData; - /** An interface for the event data of a "Microsoft.Storage.DirectoryCreated" event. */ - "Microsoft.Storage.DirectoryCreated": StorageDirectoryCreatedEventData; - /** An interface for the event data of a "Microsoft.Storage.DirectoryDeleted" event. */ - "Microsoft.Storage.DirectoryDeleted": StorageDirectoryDeletedEventData; - /** An interface for the event data of a "Microsoft.Storage.DirectoryRenamed" event. */ - "Microsoft.Storage.DirectoryRenamed": StorageDirectoryRenamedEventData; - /** An interface for the event data of a "Microsoft.Storage.LifecyclePolicyCompleted" event. */ - "Microsoft.Storage.LifecyclePolicyCompleted": StorageLifecyclePolicyCompletedEventData; - /** An interface for the event data of a "Microsoft.Web.AppUpdated" event. */ - "Microsoft.Web.AppUpdated": WebAppUpdatedEventData; - /** An interface for the event data of a "Microsoft.Web.BackupOperationStarted" event. */ - "Microsoft.Web.BackupOperationStarted": WebBackupOperationStartedEventData; - /** An interface for the event data of a "Microsoft.Web.BackupOperationCompleted" event. */ - "Microsoft.Web.BackupOperationCompleted": WebBackupOperationCompletedEventData; - /** An interface for the event data of a "Microsoft.Web.BackupOperationFailed" event. */ - "Microsoft.Web.BackupOperationFailed": WebBackupOperationFailedEventData; - /** An interface for the event data of a "Microsoft.Web.RestoreOperationStarted" event. */ - "Microsoft.Web.RestoreOperationStarted": WebRestoreOperationStartedEventData; - /** An interface for the event data of a "Microsoft.Web.RestoreOperationCompleted" event. */ - "Microsoft.Web.RestoreOperationCompleted": WebRestoreOperationCompletedEventData; - /** An interface for the event data of a "Microsoft.Web.RestoreOperationFailed" event. */ - "Microsoft.Web.RestoreOperationFailed": WebRestoreOperationFailedEventData; - /** An interface for the event data of a "Microsoft.Web.SlotSwapStarted" event. */ - "Microsoft.Web.SlotSwapStarted": WebSlotSwapStartedEventData; - /** An interface for the event data of a "Microsoft.Web.SlotSwapCompleted" event. */ - "Microsoft.Web.SlotSwapCompleted": WebSlotSwapCompletedEventData; - /** An interface for the event data of a "Microsoft.Web.SlotSwapFailed" event. */ - "Microsoft.Web.SlotSwapFailed": WebSlotSwapFailedEventData; - /** An interface for the event data of a "Microsoft.Web.SlotSwapWithPreviewStarted" event. */ - "Microsoft.Web.SlotSwapWithPreviewStarted": WebSlotSwapWithPreviewStartedEventData; - /** An interface for the event data of a "Microsoft.Web.SlotSwapWithPreviewCancelled" event. */ - "Microsoft.Web.SlotSwapWithPreviewCancelled": WebSlotSwapWithPreviewCancelledEventData; - /** An interface for the event data of a "Microsoft.Web.AppServicePlanUpdated" event. */ - "Microsoft.Web.AppServicePlanUpdated": WebAppServicePlanUpdatedEventData; - /** An interface for the event data of a "Microsoft.Storage.StorageTaskQueued" event. */ - "Microsoft.Storage.StorageTaskQueued": StorageTaskQueuedEventData; - /** An interface for the event data of a "Microsoft.Storage.StorageTaskCompleted" event. */ - "Microsoft.Storage.StorageTaskCompleted": StorageTaskCompletedEventData; - /** An interface for the event data of a "Microsoft.DataBox.CopyStarted" event. */ - "Microsoft.DataBox.CopyStarted": DataBoxCopyStartedEventData; - /** An interface for the event data of a "Microsoft.DataBox.CopyCompleted" event. */ - "Microsoft.DataBox.CopyCompleted": DataBoxCopyCompletedEventData; - /** An interface for the event data of a "Microsoft.DataBox.OrderCompleted" event. */ - "Microsoft.DataBox.OrderCompleted": DataBoxOrderCompletedEventData; - /** An interface for the event data of a "Microsoft.Communication.IncomingCall" event. */ - "Microsoft.Communication.IncomingCall": AcsIncomingCallEventData; - /** An interface for the event data of a "Microsoft.Communication.EmailDeliveryReportReceived" event. */ - "Microsoft.Communication.EmailDeliveryReportReceived": AcsEmailDeliveryReportReceivedEventData; - /** An interface for the event data of a "Microsoft.Communication.EmailEngagementTrackingReportReceived" event. */ - "Microsoft.Communication.EmailEngagementTrackingReportReceived": AcsEmailEngagementTrackingReportReceivedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayCreated" event. */ - "Microsoft.ApiManagement.GatewayCreated": ApiManagementGatewayCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayUpdated" event. */ - "Microsoft.ApiManagement.GatewayUpdated": ApiManagementGatewayUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayDeleted" event. */ - "Microsoft.ApiManagement.GatewayDeleted": ApiManagementGatewayDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated" event. */ - "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated": ApiManagementGatewayHostnameConfigurationCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated" event. */ - "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated": ApiManagementGatewayHostnameConfigurationUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted" event. */ - "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted": ApiManagementGatewayHostnameConfigurationDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated" event. */ - "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated": ApiManagementGatewayCertificateAuthorityCreatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated" event. */ - "Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated": ApiManagementGatewayCertificateAuthorityUpdatedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted" event. */ - "Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted": ApiManagementGatewayCertificateAuthorityDeletedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayAPIAdded" event. */ - "Microsoft.ApiManagement.GatewayAPIAdded": ApiManagementGatewayApiAddedEventData; - /** An interface for the event data of a "Microsoft.ApiManagement.GatewayAPIRemoved" event. */ - "Microsoft.ApiManagement.GatewayAPIRemoved": ApiManagementGatewayApiRemovedEventData; - /** An interface for the event data of a "Microsoft.HealthcareApis.DicomImageUpdated" event. */ - "Microsoft.HealthcareApis.DicomImageUpdated": HealthcareDicomImageUpdatedEventData; - /** An interface for the event data of a "Microsoft.ContainerService.ClusterSupportEnded" event. */ - "Microsoft.ContainerService.ClusterSupportEnded": ContainerServiceClusterSupportEndedEventData; - /** An interface for the event data of a "Microsoft.ContainerService.ClusterSupportEnding" event. */ - "Microsoft.ContainerService.ClusterSupportEnding": ContainerServiceClusterSupportEndingEventData; - /** An interface for the event data of a "Microsoft.ContainerService.NodePoolRollingStarted" event. */ - "Microsoft.ContainerService.NodePoolRollingStarted": ContainerServiceNodePoolRollingStartedEventData; - /** An interface for the event data of a "Microsoft.ContainerService.NodePoolRollingSucceeded" event. */ - "Microsoft.ContainerService.NodePoolRollingSucceeded": ContainerServiceNodePoolRollingSucceededEventData; - /** An interface for the event data of a "Microsoft.ContainerService.NodePoolRollingFailed" event. */ - "Microsoft.ContainerService.NodePoolRollingFailed": ContainerServiceNodePoolRollingFailedEventData; - /** An interface for the event data of a "Microsoft.EventGrid.MQTTClientCreatedOrUpdated" event. */ - "Microsoft.EventGrid.MQTTClientCreatedOrUpdated": EventGridMqttClientCreatedOrUpdatedEventData; - /** An interface for the event data of a "Microsoft.EventGrid.MQTTClientDeleted" event. */ - "Microsoft.EventGrid.MQTTClientDeleted": EventGridMqttClientDeletedEventData; - /** An interface for the event data of a "Microsoft.EventGrid.MQTTClientSessionConnected" event. */ - "Microsoft.EventGrid.MQTTClientSessionConnected": EventGridMqttClientSessionConnectedEventData; - /** An interface for the event data of a "Microsoft.EventGrid.MQTTClientSessionDisconnected" event. */ - "Microsoft.EventGrid.MQTTClientSessionDisconnected": EventGridMqttClientSessionDisconnectedEventData; - /** An interface for the event data of a "Microsoft.AppConfiguration.SnapshotCreated" event. */ - "Microsoft.AppConfiguration.SnapshotCreated": AppConfigurationSnapshotCreatedEventData; - /** An interface for the event data of a "Microsoft.AppConfiguration.SnapshotModified" event. */ - "Microsoft.AppConfiguration.SnapshotModified": AppConfigurationSnapshotModifiedEventData; - /** An interface for the event data of a "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged" event. */ - "Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged": ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData; - /** An interface for the event data of a "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated" event. */ - "Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated": ResourceNotificationsHealthResourcesAnnotatedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerDeregistered" event. */ - "Microsoft.Communication.RouterWorkerDeregistered": AcsRouterWorkerDeregisteredEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerRegistered" event. */ - "Microsoft.Communication.RouterWorkerRegistered": AcsRouterWorkerRegisteredEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobCancelled" event. */ - "Microsoft.Communication.RouterJobCancelled": AcsRouterJobCancelledEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobClassificationFailed" event. */ - "Microsoft.Communication.RouterJobClassificationFailed": AcsRouterJobClassificationFailedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobClassified" event. */ - "Microsoft.Communication.RouterJobClassified": AcsRouterJobClassifiedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobClosed" event. */ - "Microsoft.Communication.RouterJobClosed": AcsRouterJobClosedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobCompleted" event. */ - "Microsoft.Communication.RouterJobCompleted": AcsRouterJobCompletedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobDeleted" event. */ - "Microsoft.Communication.RouterJobDeleted": AcsRouterJobDeletedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobExceptionTriggered" event. */ - "Microsoft.Communication.RouterJobExceptionTriggered": AcsRouterJobExceptionTriggeredEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobQueued" event. */ - "Microsoft.Communication.RouterJobQueued": AcsRouterJobQueuedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobReceived" event. */ - "Microsoft.Communication.RouterJobReceived": AcsRouterJobReceivedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobSchedulingFailed" event. */ - "Microsoft.Communication.RouterJobSchedulingFailed": AcsRouterJobSchedulingFailedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobUnassigned" event. */ - "Microsoft.Communication.RouterJobUnassigned": AcsRouterJobUnassignedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobWaitingForActivation" event. */ - "Microsoft.Communication.RouterJobWaitingForActivation": AcsRouterJobWaitingForActivationEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterJobWorkerSelectorsExpire" event. */ - "Microsoft.Communication.RouterJobWorkerSelectorsExpire": AcsRouterJobWorkerSelectorsExpiredEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerDeleted" event. */ - "Microsoft.Communication.RouterWorkerDeleted": AcsRouterWorkerDeletedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerOfferAccepted" event. */ - "Microsoft.Communication.RouterWorkerOfferAccepted": AcsRouterWorkerOfferAcceptedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerOfferDeclined" event. */ - "Microsoft.Communication.RouterWorkerOfferDeclined": AcsRouterWorkerOfferDeclinedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerOfferExpired" event. */ - "Microsoft.Communication.RouterWorkerOfferExpired": AcsRouterWorkerOfferExpiredEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerOfferIssued" event. */ - "Microsoft.Communication.RouterWorkerOfferIssued": AcsRouterWorkerOfferIssuedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerOfferRevoked" event. */ - "Microsoft.Communication.RouterWorkerOfferRevoked": AcsRouterWorkerOfferRevokedEventData; - /** An interface for the event data of a "Microsoft.ResourceNotifications.Resources.CreatedOrUpdated" event. */ - "Microsoft.ResourceNotifications.Resources.CreatedOrUpdated": ResourceNotificationsResourceManagementCreatedOrUpdatedEventData; - /** An interface for the event data of a "Microsoft.ResourceNotifications.Resources.Deleted" event. */ - "Microsoft.ResourceNotifications.Resources.Deleted": ResourceNotificationsResourceManagementDeletedEventData; - /** An interface for the event data of a "Microsoft.Storage.StorageTaskAssignmentQueued" event. */ - "Microsoft.Storage.StorageTaskAssignmentQueued": StorageTaskAssignmentQueuedEventData; - /** An interface for the event data of a "Microsoft.Storage.StorageTaskAssignmentCompleted" event. */ - "Microsoft.Storage.StorageTaskAssignmentCompleted": StorageTaskAssignmentCompletedEventData; - /** An interface for the event data of a "Microsoft.AVS.ScriptExecutionStarted" event. */ - "Microsoft.AVS.ScriptExecutionStarted": AvsScriptExecutionStartedEventData; - /** An interface for the event data of a "Microsoft.AVS.ScriptExecutionFinished" event. */ - "Microsoft.AVS.ScriptExecutionFinished": AvsScriptExecutionFinishedEventData; - /** An interface for the event data of a "Microsoft.AVS.ScriptExecutionCancelled" event. */ - "Microsoft.AVS.ScriptExecutionCancelled": AvsScriptExecutionCancelledEventData; - /** An interface for the event data of a "Microsoft.AVS.ScriptExecutionFailed" event. */ - "Microsoft.AVS.ScriptExecutionFailed": AvsScriptExecutionFailedEventData; - /** An interface for the event data of a "Microsoft.AVS.PrivateCloudUpdating" event. */ - "Microsoft.AVS.PrivateCloudUpdating": AvsPrivateCloudUpdatingEventData; - /** An interface for the event data of a "Microsoft.AVS.PrivateCloudUpdated" event. */ - "Microsoft.AVS.PrivateCloudUpdated": AvsPrivateCloudUpdatedEventData; - /** An interface for the event data of a "Microsoft.AVS.PrivateCloudFailed" event. */ - "Microsoft.AVS.PrivateCloudFailed": AvsPrivateCloudFailedEventData; - /** An interface for the event data of a "Microsoft.AVS.ClusterCreated" event. */ - "Microsoft.AVS.ClusterCreated": AvsClusterCreatedEventData; - /** An interface for the event data of a "Microsoft.AVS.ClusterDeleted" event. */ - "Microsoft.AVS.ClusterDeleted": AvsClusterDeletedEventData; - /** An interface for the event data of a "Microsoft.AVS.ClusterUpdating" event. */ - "Microsoft.AVS.ClusterUpdating": AvsClusterUpdatingEventData; - /** An interface for the event data of a "Microsoft.AVS.ClusterUpdated" event. */ - "Microsoft.AVS.ClusterUpdated": AvsClusterUpdatedEventData; - /** An interface for the event data of a "Microsoft.AVS.ClusterFailed" event. */ - "Microsoft.AVS.ClusterFailed": AvsClusterFailedEventData; - /** An interface for the event data of a "Microsoft.ApiCenter.ApiDefinitionAdded" event. */ - "Microsoft.ApiCenter.ApiDefinitionAdded": ApiCenterApiDefinitionAddedEventData; - /** An interface for the event data of a "Microsoft.ApiCenter.ApiDefinitionUpdated" event. */ - "Microsoft.ApiCenter.ApiDefinitionUpdated": ApiCenterApiDefinitionUpdatedEventData; - /** An interface for the event data of a "Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated" event. */ - "Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated": AcsMessageDeliveryStatusUpdatedEventData; - /** An interface for the event data of a "Microsoft.Communication.AdvancedMessageReceived" event. */ - "Microsoft.Communication.AdvancedMessageReceived": AcsMessageReceivedEventData; - /** An interface for the event data of a "Microsoft.Communication.RouterWorkerUpdated" event. */ - "Microsoft.Communication.RouterWorkerUpdated": AcsRouterWorkerUpdatedEventData; -} - -/** - * isCloudEventLike returns "true" when the event is a CloudEvent - * - * @param o - Either an EventGrid our CloudEvent event. - */ -function isCloudEventLike( - o: EventGridEvent | CloudEvent, -): o is CloudEvent { - return (o as any).source !== undefined; -} - -/** - * iSystemEvent returns "true" when a given event is a system event of a given type. When using - * TypeScript, this function acts as a custom type guard and allows the TypeScript compiler to - * identify the underlying data - * - * @param eventType - The type of system event to check for, e.g., "Microsoft.AppConfiguration.KeyValueDeleted" - * @param event - The event to test. - */ -export function isSystemEvent( - eventType: T, - event: EventGridEvent, -): event is EventGridEvent; - -/** - * iSystemEvent returns "true" when a given event is a system event of a given type. When using - * TypeScript, this function acts as a custom type guard and allows the TypeScript compiler to - * identify the underlying data - * - * @param eventType - The type of system event to check for, e.g., "Microsoft.AppConfiguration.KeyValueDeleted" - * @param event - The event to test. - */ -export function isSystemEvent( - eventType: T, - event: CloudEvent, -): event is CloudEvent; - -export function isSystemEvent( - eventType: T, - event: EventGridEvent | CloudEvent, -): event is - | EventGridEvent - | CloudEvent { - if (isCloudEventLike(event)) { - return event.type === eventType; - } else { - return event.eventType === eventType; - } -} diff --git a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/SystemEventsClient.ts b/sdk/eventgrid/eventgrid-systemevents/src/systemEventsClient.ts similarity index 81% rename from sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/SystemEventsClient.ts rename to sdk/eventgrid/eventgrid-systemevents/src/systemEventsClient.ts index bca51f012d4a..4edf4809ab70 100644 --- a/sdk/eventgrid/eventgrid-systemevents/src/cadl-generated/SystemEventsClient.ts +++ b/sdk/eventgrid/eventgrid-systemevents/src/systemEventsClient.ts @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Pipeline } from "@azure/core-rest-pipeline"; -import "./models/options.js"; import { createSystemEvents, - SystemEventsClientOptionalParams, SystemEventsContext, + SystemEventsClientOptionalParams, } from "./api/index.js"; +import { Pipeline } from "@azure/core-rest-pipeline"; export { SystemEventsClientOptionalParams } from "./api/systemEventsContext.js"; @@ -17,13 +16,12 @@ export class SystemEventsClient { public readonly pipeline: Pipeline; /** Azure Messaging EventGrid SystemEvents */ - constructor(endpoint: string, options: SystemEventsClientOptionalParams = {}) { + constructor(endpointParam: string, options: SystemEventsClientOptionalParams = {}) { const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` - : "azsdk-js-client"; - - this._client = createSystemEvents(endpoint, { + : `azsdk-js-client`; + this._client = createSystemEvents(endpointParam, { ...options, userAgentOptions: { userAgentPrefix }, }); diff --git a/sdk/eventgrid/eventgrid-systemevents/test/public/events.spec.ts b/sdk/eventgrid/eventgrid-systemevents/test/public/events.spec.ts deleted file mode 100644 index 6ff0d97d0774..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/test/public/events.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -import { isSystemEvent } from "../../src/index.js"; -import { describe, it, assert } from "vitest"; - -describe("Events tests", () => { - it("isSystemEvent test", async () => { - const result = isSystemEvent("Microsoft.KeyVault.SecretNearExpiry", { - eventType: "Microsoft.KeyVault.SecretNearExpiry", - eventTime: new Date(), - id: "id", - subject: "subject", - dataVersion: "1.0", - data: { - id: "id", - vaultName: "vaultName", - }, - }); - assert.isTrue(result); - }); -}); diff --git a/sdk/eventgrid/eventgrid-systemevents/test/snippets.spec.ts b/sdk/eventgrid/eventgrid-systemevents/test/snippets.spec.ts deleted file mode 100644 index 5d6136453264..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/test/snippets.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { setLogLevel } from "@azure/logger"; -import { describe, it } from "vitest"; - -describe("snippets", () => { - it("SetLogLevel", async () => { - setLogLevel("info"); - }); -}); diff --git a/sdk/eventgrid/eventgrid-systemevents/tests.yml b/sdk/eventgrid/eventgrid-systemevents/tests.yml deleted file mode 100644 index 14ea0baa0134..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/tests.yml +++ /dev/null @@ -1,7 +0,0 @@ -trigger: none - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml - parameters: - PackageName: "@azure/eventgrid-systemevents" - ServiceDirectory: eventgrid diff --git a/sdk/eventgrid/eventgrid-systemevents/tsdoc.json b/sdk/eventgrid/eventgrid-systemevents/tsdoc.json deleted file mode 100644 index 81c5a8a2aa2f..000000000000 --- a/sdk/eventgrid/eventgrid-systemevents/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../../tsdoc.json"] -} diff --git a/sdk/eventgrid/eventgrid-systemevents/tsp-location.yaml b/sdk/eventgrid/eventgrid-systemevents/tsp-location.yaml new file mode 100644 index 000000000000..8226ee83666f --- /dev/null +++ b/sdk/eventgrid/eventgrid-systemevents/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents +commit: 34e4c635eb5159f31d2cdda52ff8213e2bcb1737 +repo: ../azure-rest-api-specs +additionalDirectories: diff --git a/sdk/eventgrid/eventgrid-systemevents/vitest.browser.config.ts b/sdk/eventgrid/eventgrid-systemevents/vitest.browser.config.ts index 8c0e25be4ab7..182729ab5ce9 100644 --- a/sdk/eventgrid/eventgrid-systemevents/vitest.browser.config.ts +++ b/sdk/eventgrid/eventgrid-systemevents/vitest.browser.config.ts @@ -1,14 +1,15 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.browser.base.config.ts"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; export default mergeConfig( viteConfig, defineConfig({ test: { - include: ["dist-test/browser/test/**/*.spec.js"], + include: ["dist-test/browser/test/**/*.spec.js",], testTimeout: 1200000, hookTimeout: 1200000, }, diff --git a/sdk/eventgrid/eventgrid-systemevents/vitest.config.ts b/sdk/eventgrid/eventgrid-systemevents/vitest.config.ts index 86a71911ccc2..40e031385dd8 100644 --- a/sdk/eventgrid/eventgrid-systemevents/vitest.config.ts +++ b/sdk/eventgrid/eventgrid-systemevents/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. diff --git a/sdk/eventgrid/eventgrid-systemevents/vitest.esm.config.ts b/sdk/eventgrid/eventgrid-systemevents/vitest.esm.config.ts index 5e9735e9b144..a70127279fc9 100644 --- a/sdk/eventgrid/eventgrid-systemevents/vitest.esm.config.ts +++ b/sdk/eventgrid/eventgrid-systemevents/vitest.esm.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -5,4 +6,7 @@ import { mergeConfig } from "vitest/config"; import vitestConfig from "./vitest.config.ts"; import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; -export default mergeConfig(vitestConfig, vitestEsmConfig); +export default mergeConfig( + vitestConfig, + vitestEsmConfig +);