diff --git a/sdk/eventgrid/eventgrid/LICENSE b/sdk/eventgrid/eventgrid/LICENSE index ea8fb1516028..ccb63b166732 100644 --- a/sdk/eventgrid/eventgrid/LICENSE +++ b/sdk/eventgrid/eventgrid/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 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 @@ -18,4 +18,4 @@ 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/README.md b/sdk/eventgrid/eventgrid/README.md index 04ea04ad96eb..e2e0d41f5a3b 100644 --- a/sdk/eventgrid/eventgrid/README.md +++ b/sdk/eventgrid/eventgrid/README.md @@ -1,297 +1,67 @@ -# Azure Event Grid client library for JavaScript +# Azure EventGrid client library for JavaScript -[Azure Event Grid](https://azure.microsoft.com/services/event-grid/) is a cloud-based service that provides reliable event delivery at massive scale. +This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure EventGrid client. -Use the client library to: +EventGrid Client -- Send events to Event Grid using either the Event Grid, Cloud Events 1.0 schemas, or a custom schema -- Decode and process events which were delivered to an Event Grid handler -- Generate Shared Access Signatures for Event Grid topics - -Key links: - -- [Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/eventgrid/) -- [Package (NPM)](https://www.npmjs.com/package/@azure/eventgrid) -- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/eventgrid/) -- [Product documentation](https://docs.microsoft.com/azure/event-grid/) -- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid/samples) +[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid) | +[Package (NPM)](https://www.npmjs.com/package/@azure/eventgrid) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/eventgrid?view=azure-node-preview) | +[Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- 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. +- Latest versions of Safari, Chrome, Edge and Firefox. ### 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 -``` - -#### Create an Event Grid Domain - -```bash -az eventgrid domain create --location --resource-group --name -``` ### Install the `@azure/eventgrid` package -Install the Azure Event Grid client library for JavaScript with `npm`: +Install the Azure EventGrid client library for JavaScript with `npm`: ```bash npm install @azure/eventgrid ``` -### Create and authenticate a `EventGridPublisherClient` - -To create a client object to access the Event Grid API, you will need the `endpoint` of your Event Grid topic and a `credential`. The Event Grid client can use either an Access Key or Shared Access Signature (SAS) created from an access key. - -You can find the endpoint for your Event Grid topic either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below: +### Create and authenticate a `EventGridClient` -```bash -az eventgrid topic show --name --resource-group --query "endpoint" -``` +To create a client object to access the Azure EventGrid API, you will need the `endpoint` of your Azure EventGrid resource and a `credential`. The Azure EventGrid client can use Azure Active Directory credentials to authenticate. +You can find the endpoint for your Azure EventGrid resource in the [Azure Portal][azure_portal]. -#### Using an Access Key +You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). -Use the [Azure Portal][azure_portal] to browse to your Event Grid resource and retrieve an Access Key, or use the [Azure CLI][azure_cli] snippet below: +To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: ```bash -az eventgrid topic key list --resource-group --name +npm install @azure/identity ``` -Once you have an API key and endpoint, you can use the `AzureKeyCredential` class to authenticate the client as follows: - -```js -const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid"); - -const client = new EventGridPublisherClient( - "", - "", - new AzureKeyCredential("") -); -``` - -#### Using a SAS Token - -Like an access key, a SAS token allows access to sending events to an Event Grid topic. Unlike an access key, which can be used until it is regenerated, a SAS token has an experation time, at which point it is no longer valid. To use a SAS token for authentication, use the `AzureSASCredential` as follows: +You will also need to **register a new AAD application and grant access to Azure EventGrid** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. -```js -const { EventGridPublisherClient, AzureSASCredential } = require("@azure/eventgrid"); +For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). -const client = new EventGridPublisherClient( - "", - "", - new AzureSASCredential("") -); -``` - -You can generate a SAS token by using the `generateSharedAccessSigniture` function. - -```js -const { generateSharedAccessSignature, AzureKeyCredential } = require("@azure/eventgrid"); - -// Create a SAS Token which expires on 2020-01-01 at Midnight. -const token = generateSharedAccessSignature( - "", - new AzureKeyCredential(""), - new Date("2020-01-01T00:00:00") -); -``` - -#### Using Azure Active Directory (AAD) - -Azure EventGrid provides integration with Azure Active Directory (Azure AD) for identity-based authentication of requests. With Azure AD, you can use role-based access control (RBAC) to grant access to your Azure Event Grid resources to users, groups, or applications. - -To send events to a topic or domain with a `TokenCredential`, the authenticated identity should have the "EventGrid Data Sender" role assigned. - -With the `@azure/identity` package, you can seamlessly authorize requests in both development and production environments. To learn more about Azure Active Directory, see the [`@azure/identity` README](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md). - -For example, use can use `DefaultAzureCredential` to construct a client which will authenticate using Azure Active Directory: - -```js -const { EventGridPublisherClient } = require("@azure/eventgrid"); +```javascript +const { EventGridClient } = require("@azure/eventgrid"); const { DefaultAzureCredential } = require("@azure/identity"); - -const client = new EventGridPublisherClient( - "", - "", - new DefaultAzureCredential() -); -``` - -## Key concepts - -### EventGridPublisherClient - -`EventGridPublisherClient` is used sending events to an Event Grid Topic or an Event Grid Domain. - -### Event Schemas - -Event Grid supports multiple schemas for encoding events. When a Custom Topic or Domain is created, you specify the schema that will be used when publishing events. While you may configure your topic to use a _custom schema_ it is more common to use the already defined _Event Grid schema_ or _CloudEvents 1.0 schema_. [CloudEvents](https://cloudevents.io/) is a Cloud Native Computing Foundation project which produces a specification for describing event data in a common way. When you construct the EventGridPublisherClient you must specify which schema your topic is configured to use: - -If your topic is configured to use the Event Grid Schema, set "EventGrid" as the schema type: - -```js -const client = new EventGridPublisherClient( - "", - "EventGrid", - new AzureKeyCredential("") -); -``` - -If your topic is configured to use the Cloud Event Schema, set "CloudEvent" as the schema type: - -```js -const client = new EventGridPublisherClient( - "", - "CloudEvent", - new AzureKeyCredential("") -); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new EventGridClient(new DefaultAzureCredential(), subscriptionId); ``` -If your topic is configured to use a Custom Event Schema, set "Custom" as the schema type: - -```js -const client = new EventGridPublisherClient( - "", - "Custom", - new AzureKeyCredential("") -); -``` - -Constructing the client with a different schema than what the topic is configured to expect will result in an error from the service and your events will not be published. - -You can see what input schema has been configured for an Event Grid topic by using the [Azure CLI][azure_cli] snippet below: - -```bash -az eventgrid topic show --name --resource-group --query "inputSchema" -``` - -### EventGridDeserializer - -Events delivered to consumers by Event Grid are delivered as JSON. Depending on the type of consumer being delivered to, the Event Grid service may deliver one or more events as part of a single payload. While these events may be deserialized using normal JavaScript methods like `JSON.parse`, this library offers a helper type for deserializing events, called `EventGridDeserializer`. - -Compared with using `JSON.parse` directly, `EventGridDeserializer` does some additional conversions while deserializng events: - -1. `EventGridDeserializer` validates that the required properties of an event are present and are the right types. -2. `EventGridDeserializer` converts the event time property into a JavaScript `Date` object. -3. When using Cloud Events, binary data may be used for an event's data property (by using `Uint8Array`). When the event is sent through Event Grid, it is encoded in Base 64. `EventGridDeserializer` will decode this data back into an instance of `Uint8Array`. -4. When deserilizing a _System Event_ (an event generated by another Azure service), `EventGridDeserializer` will do additional conversions so that the `data` object matches the corresponding interface which describes its data. When using TypeScript, these interfaces ensure you have strong typing when access properties of the data object for a system event. - -When creating an instance of `EventGridDeserializer` you may supply custom deserializers that are used to further convert the `data` object. - -### Distributed Tracing and Cloud Events - -This library supports distributed tracing using [`@azure/core-tracing`][azure-core-tracing-github]. When using distributed tracing, this library will create a span during a `send` operation. In addition, when sending events using the Cloud Events 1.0 schema, the SDK will add distributed tracing metadata to the events using the [Distributed Tracing extension][cloud-events-distributed-tracing-spec]. The values for the `traceparent` and `tracestate` extension properties correspond to the `traceparent` and `tracestate` headers from the HTTP request which sends the events. If an event already has a `traceparent` extension property it is not updated. - -### Event Grid on Kubernetes - -This library has been tested and validated on [Kubernetes using Azure Arc][eventgrid-on-kubernetes-using-azure-arc]. -## Examples +### 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). -### Publish a Custom Event to an Event Grid Topic using the Event Grid Schema - -```js -const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid"); - -const client = new EventGridPublisherClient( - "", - "EventGrid", - new AzureKeyCredential("") -); - -await client.send([ - { - eventType: "Azure.Sdk.SampleEvent", - subject: "Event Subject", - dataVersion: "1.0", - data: { - hello: "world" - } - } -]); -``` - -### Publish a Custom Event to a Topic in an Event Grid Domain using the Event Grid Schema - -Publishing events to an Event Grid Domain is similar to publish to an Event Grid Topic, except that when using the Event Grid schema for events, you must include the `topic` property. When publishing events in the Cloud Events 1.0 schema, the required `source` property is used as the name of the topic in the domain to publish to: - -```js -const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid"); - -const client = new EventGridPublisherClient( - "", - "EventGrid", - new AzureKeyCredential("") -); - -await client.send([ - { - topic: "my-sample-topic", - eventType: "Azure.Sdk.SampleEvent", - subject: "Event Subject", - dataVersion: "1.0", - data: { - hello: "world" - } - } -]); -``` - -### Deserializing an Event - -`EventGridDeserializer` can be used to deserialize events delivered by Event Grid. When deserializing an event, you need to know the schema used to deliver the event. In this example we have events being delivered to an Azure Service Bus Queue in the Cloud Events schema. Using the Service Bus SDK we can receive these events from the Service Bus Queue and then deserialize them using `EventGridDeserializer` and use `isSystemEvent` to detect what type of events they are. - -```js -const { ServiceBusClient } = require("@azure/service-bus"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { EventGridDeserializer, isSystemEvent } = require("@azure/eventgrid"); - -const client = new ServiceBusClient("", new DefaultAzureCredential()); - -const receiver = client.createReceiver("", "peekLock"); - -const consumer = new EventGridDeserializer(); - -async function processMessage(message) { - // When delivering to a Service Bus Queue or Topic, EventGrid delivers a single event per message. - // so we just pluck the first one. - const event = (await consumer.deserializeCloudEvents(message.body))[0]; - - if (isSystemEvent("Microsoft.ContainerRegistry.ImagePushed", event)) { - console.log( - `${event.time}: Container Registry Image Pushed event for image ${event.data.target.repository}:${event.data.target.tag}` - ); - } else if (isSystemEvent("Microsoft.ContainerRegistry.ImageDeleted", event)) { - console.log( - `${event.time}: Container Registry Image Deleted event for repository ${event.data.target.repository}` - ); - } - - await message.complete(); -} +## Key concepts -console.log("starting receiver"); +### EventGridClient -receiver.subscribe({ - processError: async (err) => { - console.error(err); - }, - processMessage -}); -``` +`EventGridClient` is the primary interface for developers using the Azure EventGrid client library. Explore the methods on this client object to understand the different features of the Azure EventGrid service that you can access. ## Troubleshooting @@ -300,8 +70,7 @@ receiver.subscribe({ 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`: ```javascript -import { setLogLevel } from "@azure/logger"; - +const { setLogLevel } = require("@azure/logger"); setLogLevel("info"); ``` @@ -309,9 +78,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur ## Next steps -Please take a look at the -[samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid/samples) -directory for detailed examples on how to use this library. +Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. ## Contributing @@ -319,14 +86,13 @@ 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) ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Feventgrid%2Feventgrid%2FREADME.png) [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ -[event_grid]: https://docs.microsoft.com/azure/event-grid +[azure_sub]: https://azure.microsoft.com/free/ [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://docs.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/api-extractor.json b/sdk/eventgrid/eventgrid/api-extractor.json index b4df7e187999..bd52d1881bee 100644 --- a/sdk/eventgrid/eventgrid/api-extractor.json +++ b/sdk/eventgrid/eventgrid/api-extractor.json @@ -1,31 +1,18 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "types/src/index.d.ts", - "docModel": { - "enabled": false - }, - "apiReport": { - "enabled": true, - "reportFolder": "./review" - }, + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", + "docModel": { "enabled": true }, + "apiReport": { "enabled": true, "reportFolder": "./review" }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/eventgrid.d.ts" }, "messages": { - "tsdocMessageReporting": { - "default": { - "logLevel": "none" - } - }, + "tsdocMessageReporting": { "default": { "logLevel": "none" } }, "extractorMessageReporting": { - "ae-missing-release-tag": { - "logLevel": "none" - }, - "ae-unresolved-link": { - "logLevel": "none" - } + "ae-missing-release-tag": { "logLevel": "none" }, + "ae-unresolved-link": { "logLevel": "none" } } } } diff --git a/sdk/eventgrid/eventgrid/package.json b/sdk/eventgrid/eventgrid/package.json index 610ced0479f5..91e52d8c5d0e 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -1,149 +1,89 @@ { "name": "@azure/eventgrid", - "sdk-type": "client", + "sdk-type": "mgmt", "author": "Microsoft Corporation", - "description": "An isomorphic client library for the Azure Event Grid service.", - "version": "4.5.1", - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], + "description": "A generated SDK for EventGridClient.", + "version": "1.0.0-beta.1", + "engines": { "node": ">=12.0.0" }, + "dependencies": { + "@azure/core-client": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-rest-pipeline": "^1.1.0", + "tslib": "^2.2.0" + }, + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", "types": "./types/eventgrid.d.ts", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid/README.md", - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" + "devDependencies": { + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", + "mkdirp": "^1.0.4", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", + "typescript": "~4.2.0", + "uglify-js": "^3.4.9", + "rimraf": "^3.0.0", + "@azure/identity": "^2.0.1", + "@azure-tools/test-recorder": "^1.0.0", + "mocha": "^7.1.1", + "cross-env": "^7.0.2" }, - "engines": { - "node": ">=12.0.0" + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/", - "dist-esm/src/", - "types/eventgrid.d.ts", + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "dist-esm/**/*.js", + "dist-esm/**/*.js.map", + "dist-esm/**/*.d.ts", + "dist-esm/**/*.d.ts.map", + "src/**/*.ts", "README.md", - "LICENSE" + "LICENSE", + "rollup.config.js", + "tsconfig.json", + "review/*", + "CHANGELOG.md", + "types/*" ], - "//sampleConfiguration": { - "productName": "Azure Event Grid", - "productSlugs": [ - "azure", - "azure-event-grid" - ], - "requiredResources": { - "Azure Event Grid Custom Topic, configured to use the Event Grid Schema": "https://docs.microsoft.com/azure/event-grid/scripts/event-grid-cli-create-custom-topic", - "Azure Event Grid Custom Topic, configured to use the Cloud Event 1.0 Schema": "https://docs.microsoft.com/azure/event-grid/scripts/event-grid-cli-create-custom-topic", - "Azure Service Bus Queue": "https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quickstart-portal" - } - }, - "//metadata": { - "constantPaths": [ - { - "path": "swagger/README.md", - "prefix": "package-version" - }, - { - "path": "src/generated/generatedClientContext.ts", - "prefix": "packageDetails" - } - ] - }, - "browser": { - "./dist-esm/src/cryptoHelpers.js": "./dist-esm/src/cryptoHelpers.browser.js" - }, "scripts": { - "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", - "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", - "build:samples": "echo Obsolete", - "build:test": "tsc -p . && rollup -c 2>&1", - "build": "npm run clean && tsc -p . && rollup -c 2>&1 && api-extractor run --local", - "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf dist dist-browser dist-esm dist-test temp types *.tgz *.log", - "execute:samples": "dev-tool samples run samples-dev", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", - "generate:client": "autorest --typescript ./swagger/README.md && node ./scripts/setPathToEmpty.js", - "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace \"dist-esm/test/**/*.spec.js\"", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", - "lint": "eslint package.json api-extractor.json src test --ext .ts", + "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", "pack": "npm pack 2>&1", - "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", - "test": "npm run clean && npm run build:test && npm run unit-test", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser" + "extract-api": "api-extractor run --local", + "lint": "echo skipped", + "audit": "echo skipped", + "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "build:node": "echo skipped", + "build:browser": "echo skipped", + "build:test": "echo skipped", + "build:samples": "echo skipped.", + "check-format": "echo skipped", + "execute:samples": "echo skipped", + "format": "echo skipped", + "test": "npm run integration-test", + "test:node": "echo skipped", + "test:browser": "echo skipped", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:browser": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:browser": "echo skipped", + "docs": "echo skipped" }, "sideEffects": false, - "autoPublish": false, - "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.0.0", - "@azure/core-rest-pipeline": "^1.1.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" - }, - "devDependencies": { - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/service-bus": "^7.0.0", - "@azure/test-utils": "^1.0.0", - "@azure-tools/test-recorder": "^1.0.0", - "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "11.0.2", - "@rollup/plugin-json": "^4.0.0", - "@rollup/plugin-multi-entry": "^3.0.0", - "@rollup/plugin-node-resolve": "^8.0.0", - "@rollup/plugin-replace": "^2.2.0", - "@types/chai": "^4.1.6", - "@types/chai-as-promised": "^7.1.0", - "@types/mocha": "^7.0.2", - "@types/node": "^12.0.0", - "@types/sinon": "^9.0.4", - "@types/uuid": "^8.0.0", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", - "cross-env": "^7.0.2", - "dotenv": "^8.2.0", - "eslint": "^7.15.0", - "karma": "^6.2.0", - "karma-chrome-launcher": "^3.0.0", - "karma-coverage": "^2.0.0", - "karma-edge-launcher": "^0.4.2", - "karma-env-preprocessor": "^0.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-ie-launcher": "^1.0.0", - "karma-json-preprocessor": "^0.3.3", - "karma-json-to-file-reporter": "^1.0.1", - "karma-junit-reporter": "^2.0.1", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-sourcemap-loader": "^0.3.8", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^2.0.0", - "nyc": "^15.0.0", - "prettier": "^1.16.4", - "rimraf": "^3.0.0", - "rollup": "^1.16.3", - "rollup-plugin-shim": "^1.0.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-terser": "^5.1.1", - "rollup-plugin-visualizer": "^4.0.4", - "sinon": "^9.0.2", - "source-map-support": "^0.5.9", - "ts-node": "^10.0.0", - "typescript": "~4.2.0" - } + "autoPublish": true } diff --git a/sdk/eventgrid/eventgrid/rollup.config.js b/sdk/eventgrid/eventgrid/rollup.config.js index 5d7deee44c14..9be1955eb7f1 100644 --- a/sdk/eventgrid/eventgrid/rollup.config.js +++ b/sdk/eventgrid/eventgrid/rollup.config.js @@ -1,3 +1,188 @@ -import { makeConfig } from "@azure/dev-tool/shared-config/rollup"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import nodeResolve from "@rollup/plugin-node-resolve"; +import cjs from "@rollup/plugin-commonjs"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import multiEntry from "@rollup/plugin-multi-entry"; +import json from "@rollup/plugin-json"; + +import nodeBuiltins from "builtin-modules"; + +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + +// #region Warning Handler + +/** + * A function that can determine whether a rollupwarning should be ignored. If + * the function returns `true`, then the warning will not be displayed. + */ + +function ignoreNiseSinonEvalWarnings(warning) { + return ( + warning.code === "EVAL" && + warning.id && + (warning.id.includes("node_modules/nise") || + warning.id.includes("node_modules/sinon")) === true + ); +} + +function ignoreChaiCircularDependencyWarnings(warning) { + return ( + warning.code === "CIRCULAR_DEPENDENCY" && + warning.importer && warning.importer.includes("node_modules/chai") === true + ); +} + +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; + +/** + * Construct a warning handler for the shared rollup configuration + * that ignores certain warnings that are not relevant to testing. + */ +function makeOnWarnForTesting() { + return (warning, warn) => { + // If every inhibitor returns false (i.e. no inhibitors), then show the warning + if (warningInhibitors.every((inhib) => !inhib(warning))) { + warn(warning); + } + }; +} + +// #endregion + +function makeBrowserTestConfig() { + const config = { + input: { + include: ["dist-esm/test/**/*.spec.js"], + exclude: ["dist-esm/test/**/node/**"] + }, + output: { + file: `dist-test/index.browser.js`, + format: "umd", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + multiEntry({ exports: false }), + nodeResolve({ + mainFields: ["module", "browser"] + }), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), + json(), + sourcemaps() + //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) + ], + onwarn: makeOnWarnForTesting(), + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, + // rollup started respecting the "sideEffects" field in package.json. Since + // our package.json sets "sideEffects=false", this also applies to test + // code, which causes all tests to be removed by tree-shaking. + treeshake: false + }; + + return config; +} + +const defaultConfigurationOptions = { + disableBrowserBundle: false +}; + +export function makeConfig(pkg, options) { + options = { + ...defaultConfigurationOptions, + ...(options || {}) + }; + + const baseConfig = { + // Use the package's module field if it has one + input: pkg["module"] || "dist-esm/src/index.js", + external: [ + ...nodeBuiltins, + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.devDependencies) + ], + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [sourcemaps(), nodeResolve(), cjs()] + }; + + const config = [baseConfig]; + + if (!options.disableBrowserBundle) { + config.push(makeBrowserTestConfig()); + } + + return config; +} export default makeConfig(require("./package.json")); diff --git a/sdk/eventgrid/eventgrid/src/cloudEventDistrubtedTracingEnricherPolicy.ts b/sdk/eventgrid/eventgrid/src/cloudEventDistrubtedTracingEnricherPolicy.ts deleted file mode 100644 index 10b17ff4ed8c..000000000000 --- a/sdk/eventgrid/eventgrid/src/cloudEventDistrubtedTracingEnricherPolicy.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { - PipelineResponse, - PipelineRequest, - SendRequest, - PipelinePolicy -} from "@azure/core-rest-pipeline"; - -export const CloudEventBatchContentType = "application/cloudevents-batch+json; charset=utf-8"; -export const TraceParentHeaderName = "traceparent"; -export const TraceStateHeaderName = "tracestate"; -export const ContentTypeHeaderName = "Content-Type"; - -/** - * The programmatic identifier of the cloudEventDistributedTracingEnricherPolicy. - */ -export const cloudEventDistributedTracingEnricherPolicyName = - "cloudEventDistributedTracingEnricherPolicy"; - -/** - * cloudEventDistributedTracingEnricherPolicy is a policy which adds distributed tracing information - * to a batch of cloud events. It does so by copying the `traceparent` and `tracestate` properties - * from the HTTP request into the individual events as extension properties. - * - * This will only happen in the case where an event does not have a `traceparent` defined already. This - * allows events to explicitly set a traceparent and tracestate which would be respected during "multi-hop - * transmition". - * - * See https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md - * for more information on distributed tracing and cloud events. - */ -export function cloudEventDistributedTracingEnricherPolicy(): PipelinePolicy { - return { - name: cloudEventDistributedTracingEnricherPolicyName, - async sendRequest(request: PipelineRequest, next: SendRequest): Promise { - const traceparent = request.headers.get(TraceParentHeaderName); - const tracestate = request.headers.get(TraceStateHeaderName); - - if ( - request.headers.get(ContentTypeHeaderName) === CloudEventBatchContentType && - typeof request.body === "string" && - traceparent - ) { - // per the cloud event batched content type we know the body is an array encoded in JSON. - const parsedBody = JSON.parse(request.body) as any[]; - - for (const item of parsedBody) { - // When using the distributed tracing extension, the "traceparent" is a required property - // and "tracestate" is optional. This means if an item already has a "traceparent" property - // we should not stomp over it. Well formed events will not have a "tracestate" without - // also having a "traceparent" so there's no need to guard against that case. - if (typeof item !== "object" || item.traceparent) { - continue; - } - - item.traceparent = traceparent; - if (tracestate) { - item.tracestate = tracestate; - } - } - - request.body = JSON.stringify(parsedBody); - } - - return next(request); - } - }; -} diff --git a/sdk/eventgrid/eventgrid/src/constants.ts b/sdk/eventgrid/eventgrid/src/constants.ts deleted file mode 100644 index c916d90b112c..000000000000 --- a/sdk/eventgrid/eventgrid/src/constants.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -export const DEFAULT_API_VERSION = "2018-01-01"; -export const DEFAULT_EVENTGRID_SCOPE = "https://eventgrid.azure.net/.default"; diff --git a/sdk/eventgrid/eventgrid/src/consumer.ts b/sdk/eventgrid/eventgrid/src/consumer.ts deleted file mode 100644 index cbb2bdd3b18c..000000000000 --- a/sdk/eventgrid/eventgrid/src/consumer.ts +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { createSerializer } from "@azure/core-client"; -import { CloudEvent as WireCloudEvent } from "./generated/models"; -import { CloudEvent, EventGridEvent, cloudEventReservedPropertyNames } from "./models"; -import { - EventGridEvent as EventGridEventMapper, - CloudEvent as CloudEventMapper -} from "./generated/models/mappers"; -import { parseAndWrap, validateEventGridEvent, validateCloudEventEvent } from "./util"; - -const serializer = createSerializer(); - -/** - * EventGridDeserializer is used to aid in processing events delivered by EventGrid. It can deserialize a JSON encoded payload - * of either a single event or batch of events as well as be used to convert the result of `JSON.parse` into an - * `EventGridEvent` or `CloudEvent` like object. - * - * Unlike normal JSON deseralization, EventGridDeserializer does some additional conversions: - * - * - The consumer parses the event time property into a `Date` object, for ease of use. - * - When deserializing an event in the CloudEvent schema, if the event contains binary data, it is base64 decoded - * and returned as an instance of the `Uint8Array` type. - */ -export class EventGridDeserializer { - /** - * Deserializes events encoded in the Event Grid schema. - * - * @param encodedEvents - the JSON encoded representation of either a single event or an array of - * events, encoded in the Event Grid Schema. - */ - public async deserializeEventGridEvents( - encodedEvents: string - ): Promise[]>; - - /** - * Deserializes events encoded in the Event Grid schema. - * - * @param encodedEvents - an object representing a single event, encoded in the Event Grid schema. - */ - public async deserializeEventGridEvents( - encodedEvents: Record - ): Promise[]>; - public async deserializeEventGridEvents( - encodedEvents: string | Record - ): Promise[]> { - const decodedArray = parseAndWrap(encodedEvents); - - const events: EventGridEvent[] = []; - - for (const o of decodedArray) { - validateEventGridEvent(o); - - const deserialized: EventGridEvent = serializer.deserialize(EventGridEventMapper, o, ""); - - events.push(deserialized as EventGridEvent); - } - - return events; - } - - /** - * Deserializes events encoded in the Cloud Events 1.0 schema. - * - * @param encodedEvents - the JSON encoded representation of either a single event or an array of - * events, encoded in the Cloud Events 1.0 Schema. - */ - public async deserializeCloudEvents(encodedEvents: string): Promise[]>; - - /** - * Deserializes events encoded in the Cloud Events 1.0 schema. - * - * @param encodedEvents - an object representing a single event, encoded in the Cloud Events 1.0 schema. - */ - public async deserializeCloudEvents( - encodedEvents: Record - ): Promise[]>; - public async deserializeCloudEvents( - encodedEvents: string | Record - ): Promise[]> { - const decodedArray = parseAndWrap(encodedEvents); - - const events: CloudEvent[] = []; - - for (const o of decodedArray) { - validateCloudEventEvent(o); - - // Check that the required fields are present and of the correct type and the optional fields are missing - // or of the correct type. - - const deserialized: WireCloudEvent = serializer.deserialize(CloudEventMapper, o, ""); - const modelEvent: Record = { - specversion: deserialized.specversion, - id: deserialized.id, - source: deserialized.source, - type: deserialized.type - }; - - if (deserialized.datacontenttype !== undefined) { - modelEvent.datacontenttype = deserialized.datacontenttype; - } - - if (deserialized.dataschema !== undefined) { - modelEvent.dataschema = deserialized.dataschema; - } - - if (deserialized.subject !== undefined) { - modelEvent.subject = deserialized.subject; - } - - if (deserialized.time !== undefined) { - modelEvent.time = deserialized.time; - } - - if (deserialized.data !== undefined) { - modelEvent.data = deserialized.data; - } - - // If the data the event represents binary, it is encoded as base64 text in a different property on the event and we need to transform it. - if (deserialized.dataBase64 !== undefined) { - if (deserialized.data !== undefined) { - throw new TypeError("event contains both a data and data_base64 field"); - } - - if (!(deserialized.dataBase64 instanceof Uint8Array)) { - throw new TypeError("event data_base64 property is not an instance of Uint8Array"); - } - - modelEvent.data = deserialized.dataBase64; - } - - // Build the "extensionsAttributes" property bag by removing all known top level properties. - const extensionAttributes = { ...deserialized }; - for (const propName of cloudEventReservedPropertyNames) { - delete extensionAttributes[propName]; - } - delete extensionAttributes.dataBase64; - - // If any properties remain, copy them to the model. - if (Object.keys(extensionAttributes).length > 0) { - modelEvent.extensionAttributes = extensionAttributes; - } - - events.push(modelEvent as CloudEvent); - } - - return events; - } -} diff --git a/sdk/eventgrid/eventgrid/src/cryptoHelpers.browser.ts b/sdk/eventgrid/eventgrid/src/cryptoHelpers.browser.ts deleted file mode 100644 index 7629e8d1c6c1..000000000000 --- a/sdk/eventgrid/eventgrid/src/cryptoHelpers.browser.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/// - -/** - * @internal - */ -export async function sha256Hmac(secret: string, stringToSign: string): Promise { - const key = await self.crypto.subtle.importKey( - "raw", - Uint8Array.from(atob(secret), (c) => c.charCodeAt(0)), - { - name: "HMAC", - hash: "SHA-256" - }, - false, - ["sign"] - ); - - const sigArray = await self.crypto.subtle.sign( - "HMAC", - key, - new TextEncoder().encode(stringToSign) - ); - - // The conversions here are a bit odd but necessary (see "Unicode strings" in the link below) - // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/btoa - return btoa(String.fromCharCode(...new Uint8Array(sigArray))); -} diff --git a/sdk/eventgrid/eventgrid/src/cryptoHelpers.ts b/sdk/eventgrid/eventgrid/src/cryptoHelpers.ts deleted file mode 100644 index 07209013d8ea..000000000000 --- a/sdk/eventgrid/eventgrid/src/cryptoHelpers.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { createHmac } from "crypto"; - -/** - * @internal - */ -export async function sha256Hmac(secret: string, stringToSign: string): Promise { - const decodedSecret = Buffer.from(secret, "base64"); - - return createHmac("sha256", decodedSecret) - .update(stringToSign) - .digest("base64"); -} diff --git a/sdk/eventgrid/eventgrid/src/eventGridAuthenticationPolicy.ts b/sdk/eventgrid/eventgrid/src/eventGridAuthenticationPolicy.ts deleted file mode 100644 index c3a4e6d1d872..000000000000 --- a/sdk/eventgrid/eventgrid/src/eventGridAuthenticationPolicy.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { KeyCredential, SASCredential } from "@azure/core-auth"; -import { - PipelineResponse, - PipelineRequest, - SendRequest, - PipelinePolicy -} from "@azure/core-rest-pipeline"; - -import { isKeyCredentialLike } from "./util"; - -/** - * The name of the header to include when a Shared Key is used for authentication. - */ -const API_KEY_HEADER_NAME = "aeg-sas-key"; - -/** - * The name of the header to include when Shared Access Signature is used for authentication. - */ -const SAS_TOKEN_HEADER_NAME = "aeg-sas-token"; - -/** - * The programmatic identifier of the eventGridCredentialPolicy. - */ -export const eventGridCredentialPolicyName = "eventGridCredentialPolicy"; - -/** - * A concrete implementation of an AzureKeyCredential policy - * using the appropriate header for Event Grid - */ -export function eventGridCredentialPolicy( - credential: KeyCredential | SASCredential -): PipelinePolicy { - return { - name: eventGridCredentialPolicyName, - async sendRequest(request: PipelineRequest, next: SendRequest): Promise { - if (isKeyCredentialLike(credential)) { - request.headers.set(API_KEY_HEADER_NAME, credential.key); - } else { - request.headers.set(SAS_TOKEN_HEADER_NAME, credential.signature); - } - - return next(request); - } - }; -} diff --git a/sdk/eventgrid/eventgrid/src/eventGridClient.ts b/sdk/eventgrid/eventgrid/src/eventGridClient.ts index 251919b2f929..8d8e5bc287cf 100644 --- a/sdk/eventgrid/eventgrid/src/eventGridClient.ts +++ b/sdk/eventgrid/eventgrid/src/eventGridClient.ts @@ -1,231 +1,156 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { isTokenCredential, KeyCredential, SASCredential } from "@azure/core-auth"; -import { OperationOptions, CommonClientOptions } from "@azure/core-client"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ -import { eventGridCredentialPolicy } from "./eventGridAuthenticationPolicy"; -import { DEFAULT_EVENTGRID_SCOPE } from "./constants"; +import * as coreClient from "@azure/core-client"; +import * as coreAuth from "@azure/core-auth"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; import { - SendCloudEventInput, - SendEventGridEventInput, - cloudEventReservedPropertyNames + EventGridClientOptionalParams, + EventGridEvent, + PublishEventsOptionalParams, + CloudEvent, + PublishCloudEventEventsOptionalParams, + PublishCustomEventEventsOptionalParams } from "./models"; -import { GeneratedClient } from "./generated/generatedClient"; -import { - CloudEvent as CloudEventWireModel, - EventGridEvent as EventGridEventWireModel -} from "./generated/models"; -import { cloudEventDistributedTracingEnricherPolicy } from "./cloudEventDistrubtedTracingEnricherPolicy"; -import { createSpan } from "./tracing"; -import { SpanStatusCode } from "@azure/core-tracing"; -import { v4 as uuidv4 } from "uuid"; -import { TokenCredential } from "@azure/core-auth"; -import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; -/** - * Options for the Event Grid Client. - */ -export type EventGridPublisherClientOptions = CommonClientOptions; +export class EventGridClient extends coreClient.ServiceClient { + apiVersion: string; -/** - * Options for the send events operation. - */ -export type SendOptions = OperationOptions; - -/** - * A map of input schema names to shapes of the input for the send method on EventGridPublisherClient. - */ -export interface InputSchemaToInputTypeMap { /** - * The shape of the input to `send` when the client is configured to send events using the Event Grid schema. - */ - EventGrid: SendEventGridEventInput; - /** - * The shape of the input to `send` when the client is configured to send events using the Cloud Event schema. - */ - CloudEvent: SendCloudEventInput; - /** - * The shape of the input to `send` when the client is configured to send events using a custom schema. - */ - - Custom: Record; -} - -/** - * Allowed schema types, to be used when constructing the EventGridPublisherClient. - */ -export type InputSchema = keyof InputSchemaToInputTypeMap; - -/** - * Client class for publishing events to the Event Grid Service. - */ -export class EventGridPublisherClient { - /** - * The URL to the Event Grid endpoint. - */ - public readonly endpointUrl: string; - - /** - * The version of the Even Grid service. - */ - public readonly apiVersion: string; - - /** - * The AutoRest generated client for the EventGrid dataplane. - */ - private readonly client: GeneratedClient; - - /** - * The schema that will be used when sending events. - */ - private readonly inputSchema: InputSchema; - - /** - * Creates an instance of EventGridPublisherClient which sends events using the Event Grid Schema. - * - * Example usage: - * ```ts - * import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid"; - * - * const client = new EventGridPublisherClient( - * "", - * "EventGrid", - * new AzureKeyCredential("") - * ); - * ``` - * - * @param endpointUrl - The URL to the Event Grid endpoint, e.g. https://eg-topic.westus2-1.eventgrid.azure.net/api/events. - * @param inputSchema - The schema that the Event Grid endpoint is configured to accept. One of "EventGrid", "CloudEvent", or "Custom". - * @param credential - Used to authenticate requests to the service. - * @param options - Used to configure the Event Grid Client. + * Initializes a new instance of the EventGridClient class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param options The parameter options */ constructor( - endpointUrl: string, - inputSchema: T, - credential: KeyCredential | SASCredential | TokenCredential, - options: EventGridPublisherClientOptions = {} + credentials: coreAuth.TokenCredential, + options?: EventGridClientOptionalParams ) { - this.endpointUrl = endpointUrl; - this.inputSchema = inputSchema; - - this.client = new GeneratedClient(options); - - const authPolicy = isTokenCredential(credential) - ? bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_EVENTGRID_SCOPE }) - : eventGridCredentialPolicy(credential); + if (credentials === undefined) { + throw new Error("'credentials' cannot be null"); + } - this.client.pipeline.addPolicy(authPolicy); - this.client.pipeline.addPolicy(cloudEventDistributedTracingEnricherPolicy()); - this.apiVersion = this.client.apiVersion; + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults: EventGridClientOptionalParams = { + requestContentType: "application/json; charset=utf-8", + credential: credentials + }; + + const packageDetails = `azsdk-js-eventgrid/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + if (!options.credentialScopes) { + options.credentialScopes = ["https://management.azure.com/.default"]; + } + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "https://{topicHostname}" + }; + super(optionsWithDefaults); + + // Assigning values to Constant parameters + this.apiVersion = options.apiVersion || "2018-01-01"; } /** - * Sends events to a topic. - * - * @param events - The events to send. The events should be in the schema used when constructing the client. - * @param options - Options to control the underlying operation. + * Publishes a batch of events to an Azure Event Grid topic. + * @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net + * @param events An array of events to be published to Event Grid. + * @param options The options parameters. */ - async send(events: InputSchemaToInputTypeMap[T][], options?: SendOptions): Promise { - const { span, updatedOptions } = createSpan("EventGridPublisherClient-send", options || {}); - - try { - switch (this.inputSchema) { - case "EventGrid": { - return await this.client.publishEvents( - this.endpointUrl, - (events as InputSchemaToInputTypeMap["EventGrid"][]).map( - convertEventGridEventToModelType - ), - updatedOptions - ); - } - case "CloudEvent": { - return await this.client.publishCloudEventEvents( - this.endpointUrl, - (events as InputSchemaToInputTypeMap["CloudEvent"][]).map(convertCloudEventToModelType), - updatedOptions - ); - } - case "Custom": { - return await this.client.publishCustomEventEvents( - this.endpointUrl, - events as InputSchemaToInputTypeMap["Custom"][], - updatedOptions - ); - } - default: { - throw new Error(`Unknown input schema type '${this.inputSchema}'`); - } - } - } catch (e) { - span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); - throw e; - } finally { - span.end(); - } + publishEvents( + topicHostname: string, + events: EventGridEvent[], + options?: PublishEventsOptionalParams + ): Promise { + return this.sendOperationRequest( + { topicHostname, events, options }, + publishEventsOperationSpec + ); } -} - -/** - * @internal - */ -export function convertEventGridEventToModelType( - event: SendEventGridEventInput -): EventGridEventWireModel { - return { - eventType: event.eventType, - eventTime: event.eventTime ?? new Date(), - id: event.id ?? uuidv4(), - subject: event.subject, - topic: event.topic, - data: event.data, - dataVersion: event.dataVersion - }; -} - -/** - * @internal - */ -export function convertCloudEventToModelType(event: SendCloudEventInput): CloudEventWireModel { - if (event.extensionAttributes) { - for (const propName in event.extensionAttributes) { - // Per the cloud events spec: "CloudEvents attribute names MUST consist of lower-case letters ('a' to 'z') or digits ('0' to '9') from the ASCII character set" - // they also can not match an existing defined property name. - if ( - !/^[a-z0-9]*$/.test(propName) || - cloudEventReservedPropertyNames.indexOf(propName) !== -1 - ) { - throw new Error(`invalid extension attribute name: ${propName}`); - } - } + /** + * Publishes a batch of events to an Azure Event Grid topic. + * @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net + * @param events An array of events to be published to Event Grid. + * @param options The options parameters. + */ + publishCloudEventEvents( + topicHostname: string, + events: CloudEvent[], + options?: PublishCloudEventEventsOptionalParams + ): Promise { + return this.sendOperationRequest( + { topicHostname, events, options }, + publishCloudEventEventsOperationSpec + ); } - const converted: CloudEventWireModel = { - specversion: "1.0", - type: event.type, - source: event.source, - id: event.id ?? uuidv4(), - time: event.time ?? new Date(), - subject: event.subject, - dataschema: event.dataschema, - ...(event.extensionAttributes ?? []) - }; - - if (event.data instanceof Uint8Array) { - if (!event.datacontenttype) { - throw new Error( - "a data content type must be provided when sending an event with binary data" - ); - } - - converted.datacontenttype = event.datacontenttype; - converted.dataBase64 = event.data; - } else { - converted.datacontenttype = event.datacontenttype ?? "application/json"; - converted.data = event.data; + /** + * Publishes a batch of events to an Azure Event Grid topic. + * @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net + * @param events An array of events to be published to Event Grid. + * @param options The options parameters. + */ + publishCustomEventEvents( + topicHostname: string, + events: Record[], + options?: PublishCustomEventEventsOptionalParams + ): Promise { + return this.sendOperationRequest( + { topicHostname, events, options }, + publishCustomEventEventsOperationSpec + ); } - - return converted; } +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const publishEventsOperationSpec: coreClient.OperationSpec = { + path: "/api/events", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + requestBody: Parameters.events, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.topicHostname], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const publishCloudEventEventsOperationSpec: coreClient.OperationSpec = { + path: "/api/events", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + requestBody: Parameters.events1, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.topicHostname], + headerParameters: [Parameters.contentType1], + mediaType: "json", + serializer +}; +const publishCustomEventEventsOperationSpec: coreClient.OperationSpec = { + path: "/api/events", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + requestBody: Parameters.events2, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.topicHostname], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/eventgrid/eventgrid/src/generateSharedAccessSignature.ts b/sdk/eventgrid/eventgrid/src/generateSharedAccessSignature.ts deleted file mode 100644 index f9ab53bd21fd..000000000000 --- a/sdk/eventgrid/eventgrid/src/generateSharedAccessSignature.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { KeyCredential } from "@azure/core-auth"; -import { DEFAULT_API_VERSION } from "./constants"; -import { sha256Hmac } from "./cryptoHelpers"; -import { dateToServiceTimeString } from "./util"; - -export interface GenerateSharedAccessSignatureOptions { - /** - * The API Version to include in the signature. If not provided, the default - * API version will be used. - */ - apiVersion?: string; -} - -/** - * Generate a shared access signature, which allows a client to send events to an Event Grid Topic or Domain for a limited period of time. This - * function may only be called when the EventGridPublisherClient was constructed with a KeyCredential instance. - * - * @param endpointUrl - The endpoint for the topic or domain you wish to generate a shared access signature for. - * @param credential - The credential to use when generating the shared access signatrue. - * @param expiresOn - The time at which the shared access signature is no longer valid. - * @param options - Options to control how the signature is generated. - */ -export async function generateSharedAccessSignature( - endpointUrl: string, - credential: KeyCredential, - expiresOnUtc: Date, - options?: GenerateSharedAccessSignatureOptions -): Promise { - const expiresOnString = dateToServiceTimeString(expiresOnUtc); - const unsignedSas = `r=${encodeURIComponent( - `${endpointUrl}?apiVersion=${options?.apiVersion || DEFAULT_API_VERSION}` - )}&e=${encodeURIComponent(expiresOnString)}`; - return sha256Hmac(credential.key, unsignedSas).then( - (digest) => `${unsignedSas}&s=${encodeURIComponent(digest)}` - ); -} diff --git a/sdk/eventgrid/eventgrid/src/generated/generatedClient.ts b/sdk/eventgrid/eventgrid/src/generated/generatedClient.ts deleted file mode 100644 index cc90a7648b68..000000000000 --- a/sdk/eventgrid/eventgrid/src/generated/generatedClient.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; -import * as Parameters from "./models/parameters"; -import * as Mappers from "./models/mappers"; -import { GeneratedClientContext } from "./generatedClientContext"; -import { - GeneratedClientOptionalParams, - EventGridEvent, - GeneratedClientPublishEventsOptionalParams, - CloudEvent, - GeneratedClientPublishCloudEventEventsOptionalParams, - GeneratedClientPublishCustomEventEventsOptionalParams -} from "./models"; - -/** @internal */ -export class GeneratedClient extends GeneratedClientContext { - /** - * Initializes a new instance of the GeneratedClient class. - * @param options The parameter options - */ - constructor(options?: GeneratedClientOptionalParams) { - super(options); - } - - /** - * Publishes a batch of events to an Azure Event Grid topic. - * @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net - * @param events An array of events to be published to Event Grid. - * @param options The options parameters. - */ - publishEvents( - topicHostname: string, - events: EventGridEvent[], - options?: GeneratedClientPublishEventsOptionalParams - ): Promise { - return this.sendOperationRequest( - { topicHostname, events, options }, - publishEventsOperationSpec - ); - } - - /** - * Publishes a batch of events to an Azure Event Grid topic. - * @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net - * @param events An array of events to be published to Event Grid. - * @param options The options parameters. - */ - publishCloudEventEvents( - topicHostname: string, - events: CloudEvent[], - options?: GeneratedClientPublishCloudEventEventsOptionalParams - ): Promise { - return this.sendOperationRequest( - { topicHostname, events, options }, - publishCloudEventEventsOperationSpec - ); - } - - /** - * Publishes a batch of events to an Azure Event Grid topic. - * @param topicHostname The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net - * @param events An array of events to be published to Event Grid. - * @param options The options parameters. - */ - publishCustomEventEvents( - topicHostname: string, - events: any[], - options?: GeneratedClientPublishCustomEventEventsOptionalParams - ): Promise { - return this.sendOperationRequest( - { topicHostname, events, options }, - publishCustomEventEventsOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const publishEventsOperationSpec: coreClient.OperationSpec = { - path: "", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - requestBody: Parameters.events, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.topicHostname], - headerParameters: [Parameters.contentType], - mediaType: "json", - serializer -}; -const publishCloudEventEventsOperationSpec: coreClient.OperationSpec = { - path: "", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - requestBody: Parameters.events1, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.topicHostname], - headerParameters: [Parameters.contentType1], - mediaType: "json", - serializer -}; -const publishCustomEventEventsOperationSpec: coreClient.OperationSpec = { - path: "", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - requestBody: Parameters.events2, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.topicHostname], - headerParameters: [Parameters.contentType], - mediaType: "json", - serializer -}; diff --git a/sdk/eventgrid/eventgrid/src/generated/generatedClientContext.ts b/sdk/eventgrid/eventgrid/src/generated/generatedClientContext.ts deleted file mode 100644 index e2625d16f4db..000000000000 --- a/sdk/eventgrid/eventgrid/src/generated/generatedClientContext.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; -import { GeneratedClientOptionalParams } from "./models"; - -/** @internal */ -export class GeneratedClientContext extends coreClient.ServiceClient { - apiVersion: string; - - /** - * Initializes a new instance of the GeneratedClientContext class. - * @param options The parameter options - */ - constructor(options?: GeneratedClientOptionalParams) { - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: GeneratedClientOptionalParams = { - requestContentType: "application/json; charset=utf-8" - }; - - const packageDetails = `azsdk-js-eventgrid/4.5.1`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix - }, - baseUri: options.endpoint || "{topicHostname}" - }; - super(optionsWithDefaults); - - // Assigning values to Constant parameters - this.apiVersion = options.apiVersion || "2018-01-01"; - } -} diff --git a/sdk/eventgrid/eventgrid/src/generated/index.ts b/sdk/eventgrid/eventgrid/src/generated/index.ts deleted file mode 100644 index 3aebf3c9a56c..000000000000 --- a/sdk/eventgrid/eventgrid/src/generated/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./models"; -export { GeneratedClient } from "./generatedClient"; -export { GeneratedClientContext } from "./generatedClientContext"; diff --git a/sdk/eventgrid/eventgrid/src/index.ts b/sdk/eventgrid/eventgrid/src/index.ts index 2dc09da4327c..6d9c4019596b 100644 --- a/sdk/eventgrid/eventgrid/src/index.ts +++ b/sdk/eventgrid/eventgrid/src/index.ts @@ -1,207 +1,10 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -export { AzureKeyCredential, AzureSASCredential } from "@azure/core-auth"; - -export { CloudEvent, EventGridEvent, SendCloudEventInput, SendEventGridEventInput } from "./models"; - -export { - EventGridPublisherClient, - EventGridPublisherClientOptions, - SendOptions, - InputSchema, - InputSchemaToInputTypeMap -} from "./eventGridClient"; - -export { - generateSharedAccessSignature, - GenerateSharedAccessSignatureOptions -} from "./generateSharedAccessSignature"; - -export { EventGridDeserializer } from "./consumer"; - -export { isSystemEvent, KnownSystemEventTypes, SystemEventNameToEventData } from "./predicates"; - -export { - AcsChatEventBase, - AcsChatEventInThreadBase, - AcsChatMessageEventInThreadBase, - AcsChatMessageDeletedEventData, - AcsChatMessageDeletedInThreadEventData, - AcsChatMessageEditedEventData, - AcsChatMessageEditedInThreadEventData, - AcsChatMessageReceivedEventData, - AcsChatMessageReceivedInThreadEventData, - AcsChatMessageEventBase, - AcsChatThreadCreatedWithUserEventData, - AcsChatThreadPropertiesUpdatedPerUserEventData, - AcsChatThreadWithUserDeletedEventData, - AcsChatThreadEventBase, - AcsChatParticipantAddedToThreadEventData, - AcsChatParticipantAddedToThreadWithUserEventData, - AcsChatParticipantRemovedFromThreadEventData, - AcsChatParticipantRemovedFromThreadWithUserEventData, - AcsRecordingFileStatusUpdatedEventData, - AcsRecordingStorageInfo, - AcsRecordingChunkInfo, - ApiManagementApiCreatedEventData, - ApiManagementApiDeletedEventData, - ApiManagementApiReleaseCreatedEventData, - ApiManagementApiReleaseDeletedEventData, - ApiManagementApiReleaseUpdatedEventData, - ApiManagementApiUpdatedEventData, - ApiManagementProductCreatedEventData, - ApiManagementProductDeletedEventData, - ApiManagementProductUpdatedEventData, - ApiManagementSubscriptionCreatedEventData, - ApiManagementSubscriptionDeletedEventData, - ApiManagementSubscriptionUpdatedEventData, - ApiManagementUserCreatedEventData, - ApiManagementUserDeletedEventData, - ApiManagementUserUpdatedEventData, - CommunicationIdentifierModel, - CommunicationUserIdentifierModel, - CommunicationCloudEnvironmentModel, - MicrosoftTeamsUserIdentifierModel, - PhoneNumberIdentifierModel, - AcsChatThreadParticipant, - AcsUserDisconnectedEventData, - AcsSmsDeliveryAttempt, - AcsSmsDeliveryReportReceivedEventData, - AcsSmsEventBase, - AcsSmsReceivedEventData, - AppConfigurationKeyValueDeletedEventData, - AppConfigurationKeyValueModifiedEventData, - AppEventTypeDetail, - AppServicePlanEventTypeDetail, - ContainerRegistryArtifactEventTarget, - ContainerRegistryEventData, - ContainerRegistryImagePushedEventData, - ContainerRegistryImageDeletedEventData, - ContainerRegistryChartDeletedEventData, - ContainerRegistryChartPushedEventData, - ContainerServiceNewKubernetesVersionAvailableEventData, - DeviceConnectionStateEventInfo, - DeviceTwinInfo, - DeviceTwinInfoProperties, - DeviceTwinInfoX509Thumbprint, - IotHubDeviceCreatedEventData, - IotHubDeviceDeletedEventData, - IotHubDeviceConnectedEventData, - IotHubDeviceDisconnectedEventData, - IotHubDeviceTelemetryEventData, - KeyVaultCertificateNewVersionCreatedEventData, - KeyVaultCertificateNearExpiryEventData, - KeyVaultCertificateExpiredEventData, - KeyVaultKeyNewVersionCreatedEventData, - KeyVaultKeyNearExpiryEventData, - KeyVaultKeyExpiredEventData, - KeyVaultSecretNewVersionCreatedEventData, - KeyVaultSecretNearExpiryEventData, - KeyVaultSecretExpiredEventData, - KeyVaultAccessPolicyChangedEventData, - SubscriptionValidationEventData, - SubscriptionDeletedEventData, - EventHubCaptureFileCreatedEventData, - MachineLearningServicesDatasetDriftDetectedEventData, - MachineLearningServicesModelDeployedEventData, - MachineLearningServicesModelRegisteredEventData, - MachineLearningServicesRunCompletedEventData, - MachineLearningServicesRunStatusChangedEventData, - MapsGeofenceEvent, - MapsGeofenceEnteredEventData, - MapsGeofenceExitedEventData, - MapsGeofenceResultEventData, - MediaJobStateChangeEventData, - MediaJobOutputStateChangeEventData, - MediaJobScheduledEventData, - MediaJobProcessingEventData, - MediaJobCancelingEventData, - MediaJobFinishedEventData, - MediaJobCanceledEventData, - MediaJobError, - MediaJobErrorCategory, - MediaJobErrorDetail, - MediaJobErrorCode, - MediaJobRetry, - MediaJobErroredEventData, - MediaJobOutputCanceledEventData, - MediaJobOutputCancelingEventData, - MediaJobOutputErroredEventData, - MediaJobOutputFinishedEventData, - MediaJobOutputProcessingEventData, - MediaJobOutputScheduledEventData, - MediaJobOutputProgressEventData, - MediaJobOutputUnion, - MediaJobState, - MediaLiveEventChannelArchiveHeartbeatEventData, - MediaLiveEventEncoderConnectedEventData, - MediaLiveEventConnectionRejectedEventData, - MediaLiveEventEncoderDisconnectedEventData, - MediaLiveEventIncomingStreamReceivedEventData, - MediaLiveEventIncomingStreamsOutOfSyncEventData, - MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, - MediaLiveEventIncomingDataChunkDroppedEventData, - MediaLiveEventIngestHeartbeatEventData, - MediaLiveEventTrackDiscontinuityDetectedEventData, - ResourceWriteSuccessEventData, - ResourceWriteFailureEventData, - ResourceWriteCancelEventData, - ResourceDeleteSuccessEventData, - ResourceDeleteFailureEventData, - ResourceDeleteCancelEventData, - ResourceActionSuccessEventData, - ResourceActionFailureEventData, - ResourceActionCancelEventData, - ServiceBusActiveMessagesAvailableWithNoListenersEventData, - ServiceBusDeadletterMessagesAvailableWithNoListenersEventData, - StorageBlobCreatedEventData, - StorageBlobDeletedEventData, - StorageBlobRenamedEventData, - StorageDirectoryCreatedEventData, - StorageDirectoryDeletedEventData, - StorageDirectoryRenamedEventData, - StorageLifecyclePolicyActionSummaryDetail, - StorageLifecyclePolicyCompletedEventData, - WebAppUpdatedEventData, - WebBackupOperationStartedEventData, - WebBackupOperationCompletedEventData, - WebBackupOperationFailedEventData, - WebRestoreOperationStartedEventData, - WebRestoreOperationCompletedEventData, - WebRestoreOperationFailedEventData, - WebSlotSwapStartedEventData, - WebSlotSwapCompletedEventData, - WebSlotSwapFailedEventData, - WebSlotSwapWithPreviewStartedEventData, - WebSlotSwapWithPreviewCancelledEventData, - WebAppServicePlanUpdatedEventData, - WebAppServicePlanUpdatedEventDataSku, - AppAction, - KnownAppAction, - StampKind, - KnownStampKind, - AsyncStatus, - KnownAsyncStatus, - ContainerRegistryArtifactEventData, - ContainerRegistryEventActor, - ContainerRegistryEventRequest, - ContainerRegistryEventSource, - ContainerRegistryEventTarget, - DeviceConnectionStateEvent, - DeviceLifeCycleEvent, - DeviceTelemetryEvent, - MapsGeofenceGeometry, - MediaJobOutput, - MediaJobOutputAsset, - DeviceTwin, - DeviceTwinMetadata, - AppServicePlanAction, - KnownAppServicePlanAction, - PolicyInsightsPolicyStateChangedEventData, - PolicyInsightsPolicyStateCreatedEventData, - PolicyInsightsPolicyStateDeletedEventData, - StorageAsyncOperationInitiatedEventData, - StorageBlobTierChangedEventData, - StorageBlobInventoryPolicyCompletedEventData -} from "./generated/models"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./models"; +export { EventGridClient } from "./eventGridClient"; diff --git a/sdk/eventgrid/eventgrid/src/logger.ts b/sdk/eventgrid/eventgrid/src/logger.ts deleted file mode 100644 index f2e4570c0105..000000000000 --- a/sdk/eventgrid/eventgrid/src/logger.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { createClientLogger } from "@azure/logger"; - -/** - * The \@azure/logger configuration for this package. - */ -export const logger = createClientLogger("eventgrid"); diff --git a/sdk/eventgrid/eventgrid/src/models.ts b/sdk/eventgrid/eventgrid/src/models.ts deleted file mode 100644 index f44129dcc290..000000000000 --- a/sdk/eventgrid/eventgrid/src/models.ts +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * The shape of the input for EventGridProducerClient#sendEventGridEvents - */ -export interface SendEventGridEventInput { - /** - * The type of the event. - */ - eventType: string; - /** - * The time the event was generated. If not provided, the current time will be used. - */ - eventTime?: Date; - /** - * An unique identifier for the event. If an ID is not provided, a random UUID will be generated - * and used. - */ - 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; -} - -/** - * 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; -} - -/** - * * The shape of the input for EventGridProducerClient#sendCloudEvents - */ -export interface SendCloudEventInput { - /** - * 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. If an ID is not provided, - * a random UUID will be generated and used. - */ - id?: string; - /** - * The time the event was generated. If not provided, the current time will be used. - */ - 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; -} - -/** - * An event in the Cloud Event 1.0 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; -} - -/** - * Property names defined by the CloudEvents 1.0 specification, these may not be reused as the names of extension properties. - */ -export const cloudEventReservedPropertyNames = [ - "specversion", - "id", - "source", - "type", - "datacontenttype", - "dataschema", - "subject", - "time", - "data" -]; - -/** - * A function which provides custom logic to be used when decoding events. - */ -export type CustomEventDataDeserializer = (o: any) => Promise; diff --git a/sdk/eventgrid/eventgrid/src/generated/models/index.ts b/sdk/eventgrid/eventgrid/src/models/index.ts similarity index 79% rename from sdk/eventgrid/eventgrid/src/generated/models/index.ts rename to sdk/eventgrid/eventgrid/src/models/index.ts index 452d89bc6ee1..002fc8a05e08 100644 --- a/sdk/eventgrid/eventgrid/src/generated/models/index.ts +++ b/sdk/eventgrid/eventgrid/src/models/index.ts @@ -19,7 +19,7 @@ export interface EventGridEvent { /** A resource path relative to the topic path. */ subject: string; /** Event data specific to the event type. */ - data: any; + data: Record; /** The type of the event that occurred. */ eventType: string; /** The time (in UTC) the event was generated. */ @@ -42,7 +42,7 @@ export interface CloudEvent { /** Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. */ source: string; /** Event data specific to the event type. */ - data?: any; + data?: Record; /** Event data specific to the event type, encoded as a base64 string. */ dataBase64?: Uint8Array; /** Type of event related to the originating occurrence. */ @@ -62,475 +62,475 @@ export interface CloudEvent { /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the Storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The etag of the blob at the time this event was triggered. */ - eTag: string; + eTag?: string; /** The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. */ - contentType: string; + contentType?: string; /** The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. */ - contentLength: number; + contentLength?: number; /** The offset of the blob in bytes. */ - contentOffset: number; + contentOffset?: number; /** The type of blob. */ - blobType: string; + blobType?: string; /** The path to the blob. */ - url: string; + url?: string; /** An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.BlobDeleted event. */ export interface StorageBlobDeletedEventData { /** The name of the API/operation that triggered this event. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the Storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. */ - contentType: string; + contentType?: string; /** The type of blob. */ - blobType: string; + blobType?: string; /** The path to the blob. */ - url: string; + url?: string; /** An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The etag of the directory at the time this event was triggered. */ - eTag: string; + eTag?: string; /** The path to the directory. */ - url: string; + url?: string; /** An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The path to the deleted directory. */ - url: string; + url?: string; /** Is this event for a recursive delete operation. */ - recursive: boolean; + recursive?: boolean; /** An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The path to the blob that was renamed. */ - sourceUrl: string; + sourceUrl?: string; /** The new path to the blob after the rename operation. */ - destinationUrl: string; + destinationUrl?: string; /** An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The path to the directory that was renamed. */ - sourceUrl: string; + sourceUrl?: string; /** The new path to the directory after the rename operation. */ - destinationUrl: string; + destinationUrl?: string; /** An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Storage.LifecyclePolicyCompleted event. */ export interface StorageLifecyclePolicyCompletedEventData { /** The time the policy task was scheduled. */ - scheduleTime: string; + scheduleTime?: string; /** Execution statistics of a specific policy action in a Blob Management cycle. */ - deleteSummary: StorageLifecyclePolicyActionSummaryDetail; + deleteSummary?: StorageLifecyclePolicyActionSummaryDetail; /** Execution statistics of a specific policy action in a Blob Management cycle. */ - tierToCoolSummary: StorageLifecyclePolicyActionSummaryDetail; + tierToCoolSummary?: StorageLifecyclePolicyActionSummaryDetail; /** Execution statistics of a specific policy action in a Blob Management cycle. */ - tierToArchiveSummary: StorageLifecyclePolicyActionSummaryDetail; + tierToArchiveSummary?: StorageLifecyclePolicyActionSummaryDetail; } /** Execution statistics of a specific policy action in a Blob Management cycle. */ export interface StorageLifecyclePolicyActionSummaryDetail { /** Total number of objects to be acted on by this action. */ - totalObjectsCount: number; + totalObjectsCount?: number; /** Number of success operations of this action. */ - successCount: number; + successCount?: number; /** Error messages of this action if any. */ - errorList: string; + errorList?: string; } /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the Storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. */ - contentType: string; + contentType?: string; /** The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. */ - contentLength: number; + contentLength?: number; /** The type of blob. */ - blobType: string; + blobType?: string; /** The path to the blob. */ - url: string; + url?: string; /** An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** 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. */ - api: string; + api?: string; /** A request id provided by the client of the storage API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The request id generated by the Storage service for the storage API operation that triggered this event. */ - requestId: string; + requestId?: string; /** The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. */ - contentType: string; + contentType?: string; /** The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. */ - contentLength: number; + contentLength?: number; /** The type of blob. */ - blobType: string; + blobType?: string; /** The path to the blob. */ - url: string; + url?: string; /** An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. */ - sequencer: string; + sequencer?: string; /** The identity of the requester that triggered this event. */ - identity: string; + identity?: string; /** For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. */ - storageDiagnostics: any; + storageDiagnostics?: Record; } /** 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. */ - scheduleDateTime: string; + scheduleDateTime?: Date; /** The account name for which inventory policy is registered. */ - accountName: string; + accountName?: string; /** The rule name for inventory policy. */ - ruleName: string; + ruleName?: string; /** The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed. */ - policyRunStatus: string; + policyRunStatus?: string; /** The status message for inventory run. */ - policyRunStatusMessage: string; + policyRunStatusMessage?: string; /** The policy run id for inventory run. */ - policyRunId: string; + policyRunId?: string; /** The blob URL for manifest file for inventory run. */ - manifestBlobUrl: string; + manifestBlobUrl?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.EventHub.CaptureFileCreated event. */ export interface EventHubCaptureFileCreatedEventData { /** The path to the capture file. */ - fileurl: string; + fileurl?: string; /** The file type of the capture file. */ - fileType: string; + fileType?: string; /** The shard ID. */ - partitionId: string; + partitionId?: string; /** The file size. */ - sizeInBytes: number; + sizeInBytes?: number; /** The number of events in the file. */ - eventCount: number; + eventCount?: number; /** The smallest sequence number from the queue. */ - firstSequenceNumber: number; + firstSequenceNumber?: number; /** The last sequence number from the queue. */ - lastSequenceNumber: number; + lastSequenceNumber?: number; /** The first time from the queue. */ - firstEnqueueTime: string; + firstEnqueueTime?: Date; /** The last time from the queue. */ - lastEnqueueTime: string; + lastEnqueueTime?: Date; } /** 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 { +export interface ResourceWriteSuccessData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceWriteFailureData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceWriteCancelData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceDeleteSuccessData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceDeleteFailureData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceDeleteCancelData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceActionSuccessData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceActionFailureData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** 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 { +export interface ResourceActionCancelData { /** The tenant ID of the resource. */ - tenantId: string; + tenantId?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The resource group of the resource. */ - resourceGroup: string; + resourceGroup?: string; /** The resource provider performing the operation. */ - resourceProvider: string; + resourceProvider?: string; /** The URI of the resource in the operation. */ - resourceUri: string; + resourceUri?: string; /** The operation that was performed. */ - operationName: string; + operationName?: string; /** The status of the operation. */ - status: string; + status?: string; /** The requested authorization for the operation. */ - authorization: string; + authorization?: string; /** The properties of the claims. */ - claims: string; + claims?: string; /** An operation ID used for troubleshooting. */ - correlationId: string; + correlationId?: string; /** The details of the operation. */ - httpRequest: string; + httpRequest?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionValidationEvent event. */ @@ -539,18 +539,18 @@ export interface SubscriptionValidationEventData { * The validation code sent by Azure Event Grid to validate an event subscription. To complete the validation handshake, the subscriber must either respond with this validation code as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly validationCode: string; + readonly validationCode?: string; /** * The validation URL sent by Azure Event Grid (available starting version 2018-05-01-preview). To complete the validation handshake, the subscriber must either respond with the validationCode as part of the validation response, or perform a GET request on the validationUrl (available starting version 2018-05-01-preview). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly validationUrl: string; + readonly validationUrl?: string; } /** To complete an event subscription validation handshake, a subscriber can use either the validationCode or the validationUrl received in a SubscriptionValidationEvent. When the validationCode is used, the SubscriptionValidationResponse can be used to build the response. */ export interface SubscriptionValidationResponse { /** The validation response sent by the subscriber to Azure Event Grid to complete the validation of an event subscription. */ - validationResponse: string; + validationResponse?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent event. */ @@ -559,65 +559,65 @@ export interface SubscriptionDeletedEventData { * The Azure resource ID of the deleted event subscription. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly eventSubscriptionId: string; + readonly eventSubscriptionId?: string; } /** Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted). */ -export interface DeviceLifeCycleEvent { +export interface DeviceLifeCycleEventProperties { /** The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. */ - deviceId: string; + deviceId?: string; /** Name of the IoT Hub where the device was created or deleted. */ - hubName: string; + hubName?: string; /** Information about the device twin, which is the cloud representation of application device metadata. */ - twin: DeviceTwinInfo; + twin?: DeviceTwinInfo; } /** 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. */ - authenticationType: string; + authenticationType?: string; /** Count of cloud to device messages sent to this device. */ - cloudToDeviceMessageCount: number; + cloudToDeviceMessageCount?: number; /** Whether the device is connected or disconnected. */ - connectionState: string; + connectionState?: string; /** The unique identifier of the device twin. */ - deviceId: string; + deviceId?: string; /** A piece of information that describes the content of the device twin. Each etag is guaranteed to be unique per device twin. */ - etag: string; + etag?: string; /** The ISO8601 timestamp of the last activity. */ - lastActivityTime: string; + lastActivityTime?: string; /** Properties JSON element. */ - properties: DeviceTwinInfoProperties; + properties?: DeviceTwinInfoProperties; /** Whether the device twin is enabled or disabled. */ - status: string; + status?: string; /** The ISO8601 timestamp of the last device twin status update. */ - statusUpdateTime: string; + statusUpdateTime?: string; /** An integer that is incremented by one each time the device twin is updated. */ - version: number; + version?: number; /** 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. */ - x509Thumbprint: DeviceTwinInfoX509Thumbprint; + x509Thumbprint?: DeviceTwinInfoX509Thumbprint; } /** 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. */ - desired?: DeviceTwin; + desired?: DeviceTwinProperties; /** A portion of the properties that can be written only by the device, and read by the application back-end. */ - reported?: DeviceTwin; + reported?: DeviceTwinProperties; } /** A portion of the properties that can be written only by the application back-end, and read by the device. */ -export interface DeviceTwin { +export interface DeviceTwinProperties { /** Metadata information for the properties JSON document. */ - metadata: DeviceTwinMetadata; + metadata?: DeviceTwinMetadata; /** Version of device twin properties. */ - version: number; + version?: number; } /** Metadata information for the properties JSON document. */ export interface DeviceTwinMetadata { /** The ISO8601 timestamp of the last time the properties were updated. */ - lastUpdated: string; + lastUpdated?: string; } /** 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. */ @@ -629,189 +629,203 @@ export interface DeviceTwinInfoX509Thumbprint { } /** Schema of the Data property of an EventGridEvent for a device connection state event (DeviceConnected, DeviceDisconnected). */ -export interface DeviceConnectionStateEvent { +export interface DeviceConnectionStateEventProperties { /** The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. */ - deviceId: string; + deviceId?: string; /** The unique identifier of the module. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ # * ? ! ( ) , = @ ; $ '. */ - moduleId: string; + moduleId?: string; /** Name of the IoT Hub where the device was created or deleted. */ - hubName: string; + hubName?: string; /** Information about the device connection state event. */ - deviceConnectionStateEventInfo: DeviceConnectionStateEventInfo; + deviceConnectionStateEventInfo?: 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; + sequenceNumber?: string; } /** Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). */ -export interface DeviceTelemetryEvent { +export interface DeviceTelemetryEventProperties { /** The content of the message from the device. */ - body: any; + body?: Record; /** Application properties are user-defined strings that can be added to the message. These fields are optional. */ - properties: { [propertyName: string]: string }; + properties?: { [propertyName: string]: string }; /** System properties help identify contents and source of the messages. */ - systemProperties: { [propertyName: string]: string }; + systemProperties?: { [propertyName: string]: string }; } /** The content of the event request message. */ export interface ContainerRegistryEventData { /** The event ID. */ - id: string; + id?: string; /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The action that encompasses the provided event. */ - action: string; + action?: string; + /** The location of the event. */ + location?: string; /** The target of the event. */ - target: ContainerRegistryEventTarget; + target?: ContainerRegistryEventTarget; /** The request that generated the event. */ - request: ContainerRegistryEventRequest; + request?: ContainerRegistryEventRequest; /** The agent that initiated the event. For most situations, this could be from the authorization context of the request. */ - actor: ContainerRegistryEventActor; + actor?: ContainerRegistryEventActor; /** The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. */ - source: ContainerRegistryEventSource; + source?: ContainerRegistryEventSource; + /** The connected registry information if the event is generated by a connected registry. */ + connectedRegistry?: ContainerRegistryEventConnectedRegistry; } /** The target of the event. */ export interface ContainerRegistryEventTarget { /** The MIME type of the referenced object. */ - mediaType: string; + mediaType?: string; /** The number of bytes of the content. Same as Length field. */ - size: number; + size?: number; /** The digest of the content, as defined by the Registry V2 HTTP API Specification. */ - digest: string; + digest?: string; /** The number of bytes of the content. Same as Size field. */ - length: number; + length?: number; /** The repository name. */ - repository: string; + repository?: string; /** The direct URL to the content. */ - url: string; + url?: string; /** The tag name. */ - tag: string; + tag?: string; } /** The request that generated the event. */ export interface ContainerRegistryEventRequest { /** The ID of the request that initiated the event. */ - id: string; + id?: string; /** The IP or hostname and possibly port of the client connection that initiated the event. This is the RemoteAddr from the standard http request. */ - addr: string; + addr?: string; /** The externally accessible hostname of the registry instance, as specified by the http host header on incoming requests. */ - host: string; + host?: string; /** The request method that generated the event. */ - method: string; + method?: string; /** The user agent header of the request. */ - useragent: string; + useragent?: string; } /** 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; + name?: string; } /** 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. */ - addr: string; + addr?: string; /** The running instance of an application. Changes after each restart. */ - instanceID: string; + instanceID?: string; +} + +/** 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; } /** The content of the event request message. */ export interface ContainerRegistryArtifactEventData { /** The event ID. */ - id: string; + id?: string; /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The action that encompasses the provided event. */ - action: string; + action?: string; + /** The location of the event. */ + location?: string; /** The target of the event. */ - target: ContainerRegistryArtifactEventTarget; + target?: ContainerRegistryArtifactEventTarget; + /** The connected registry information if the event is generated by a connected registry. */ + connectedRegistry?: ContainerRegistryEventConnectedRegistry; } /** The target of the event. */ export interface ContainerRegistryArtifactEventTarget { /** The MIME type of the artifact. */ - mediaType: string; + mediaType?: string; /** The size in bytes of the artifact. */ - size: number; + size?: number; /** The digest of the artifact. */ - digest: string; + digest?: string; /** The repository name of the artifact. */ - repository: string; + repository?: string; /** The tag of the artifact. */ - tag: string; + tag?: string; /** The name of the artifact. */ - name: string; + name?: string; /** The version of the artifact. */ - version: string; + version?: string; } /** 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. */ - namespaceName: string; + namespaceName?: string; /** The endpoint of the Microsoft.ServiceBus resource. */ - requestUri: string; + requestUri?: string; /** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */ - entityType: string; + entityType?: string; /** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */ - queueName: string; + queueName?: string; /** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */ - topicName: string; + topicName?: string; /** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */ - subscriptionName: string; + subscriptionName?: string; } /** 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. */ - namespaceName: string; + namespaceName?: string; /** The endpoint of the Microsoft.ServiceBus resource. */ - requestUri: string; + requestUri?: string; /** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */ - entityType: string; + entityType?: string; /** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */ - queueName: string; + queueName?: string; /** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */ - topicName: string; + topicName?: string; /** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */ - subscriptionName: string; + subscriptionName?: string; } /** 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. */ - namespaceName: string; + namespaceName?: string; /** The endpoint of the Microsoft.ServiceBus resource. */ - requestUri: string; + requestUri?: string; /** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */ - entityType: string; + entityType?: string; /** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */ - queueName: string; + queueName?: string; /** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */ - topicName: string; + topicName?: string; /** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */ - subscriptionName: string; + subscriptionName?: string; } /** 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. */ - namespaceName: string; + namespaceName?: string; /** The endpoint of the Microsoft.ServiceBus resource. */ - requestUri: string; + requestUri?: string; /** The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. */ - entityType: string; + entityType?: string; /** The name of the Microsoft.ServiceBus queue. If the entity type is of type 'subscriber', then this value will be null. */ - queueName: string; + queueName?: string; /** The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this value will be null. */ - topicName: string; + topicName?: string; /** The name of the Microsoft.ServiceBus topic's subscription. If the entity type is of type 'queue', then this value will be null. */ - subscriptionName: string; + subscriptionName?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobStateChange event. */ @@ -820,14 +834,14 @@ export interface MediaJobStateChangeEventData { * The previous state of the Job. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly previousState: MediaJobState; + readonly previousState?: MediaJobState; /** * The new state of the Job. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state: MediaJobState; + readonly state?: MediaJobState; /** Gets the Job correlation data. */ - correlationData: { [propertyName: string]: string }; + correlationData?: { [propertyName: string]: string }; } /** Details of JobOutput errors. */ @@ -836,27 +850,27 @@ export interface MediaJobError { * Error code describing the error. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code: MediaJobErrorCode; + readonly code?: MediaJobErrorCode; /** * A human-readable language-dependent representation of the error. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message: string; + readonly message?: string; /** * Helps with categorization of errors. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly category: MediaJobErrorCategory; + readonly category?: MediaJobErrorCategory; /** * Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact Azure support via Azure Portal. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly retry: MediaJobRetry; + readonly retry?: MediaJobRetry; /** * An array of details about specific errors that led to this reported error. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly details: MediaJobErrorDetail[]; + readonly details?: MediaJobErrorDetail[]; } /** Details of JobOutput errors. */ @@ -865,12 +879,12 @@ export interface MediaJobErrorDetail { * Code describing the error detail. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code: string; + readonly code?: string; /** * A human-readable representation of the error. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message: string; + readonly message?: string; } /** The event data for a Job output. */ @@ -890,11 +904,11 @@ export interface MediaJobOutput { /** Job Output Progress Event Data. Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputProgress event. */ export interface MediaJobOutputProgressEventData { /** Gets the Job output label. */ - label: string; + label?: string; /** Gets the Job output progress. */ - progress: number; + progress?: number; /** Gets the Job correlation data. */ - jobCorrelationData: { [propertyName: string]: string }; + jobCorrelationData?: { [propertyName: string]: string }; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputStateChange event. */ @@ -903,11 +917,11 @@ export interface MediaJobOutputStateChangeEventData { * The previous state of the Job. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly previousState: MediaJobState; + readonly previousState?: MediaJobState; /** Gets the output. */ - output: MediaJobOutputUnion; + output?: MediaJobOutputUnion; /** Gets the Job correlation data. */ - jobCorrelationData: { [propertyName: string]: string }; + jobCorrelationData?: { [propertyName: string]: string }; } /** Encoder connect event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventEncoderConnected event. */ @@ -916,22 +930,22 @@ export interface MediaLiveEventEncoderConnectedEventData { * Gets the ingest URL provided by the live event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ingestUrl: string; + readonly ingestUrl?: string; /** * Gets the stream Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly streamId: string; + readonly streamId?: string; /** * Gets the remote IP. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderIp: string; + readonly encoderIp?: string; /** * Gets the remote port. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderPort: string; + readonly encoderPort?: string; } /** Encoder connection rejected event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventConnectionRejected event. */ @@ -940,27 +954,27 @@ export interface MediaLiveEventConnectionRejectedEventData { * Gets the ingest URL provided by the live event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ingestUrl: string; + readonly ingestUrl?: string; /** * Gets the stream Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly streamId: string; + readonly streamId?: string; /** * Gets the remote IP. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderIp: string; + readonly encoderIp?: string; /** * Gets the remote port. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderPort: string; + readonly encoderPort?: string; /** * Gets the result code. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resultCode: string; + readonly resultCode?: string; } /** Encoder disconnected event data. Schema of the Data property of an EventGridEvent for a Microsoft.Media.LiveEventEncoderDisconnected event. */ @@ -969,27 +983,27 @@ export interface MediaLiveEventEncoderDisconnectedEventData { * Gets the ingest URL provided by the live event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ingestUrl: string; + readonly ingestUrl?: string; /** * Gets the stream Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly streamId: string; + readonly streamId?: string; /** * Gets the remote IP. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderIp: string; + readonly encoderIp?: string; /** * Gets the remote port. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderPort: string; + readonly encoderPort?: string; /** * Gets the result code. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resultCode: string; + readonly resultCode?: string; } /** Encoder connect event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventIncomingStreamReceived event. */ @@ -998,47 +1012,47 @@ export interface MediaLiveEventIncomingStreamReceivedEventData { * Gets the ingest URL provided by the live event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ingestUrl: string; + readonly ingestUrl?: string; /** * Gets the type of the track (Audio / Video). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackType: string; + readonly trackType?: string; /** * Gets the track name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackName: string; + readonly trackName?: string; /** * Gets the bitrate of the track. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bitrate: number; + readonly bitrate?: number; /** * Gets the remote IP. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderIp: string; + readonly encoderIp?: string; /** * Gets the remote port. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly encoderPort: string; + readonly encoderPort?: string; /** * Gets the first timestamp of the data chunk received. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timestamp: string; + readonly timestamp?: string; /** * Gets the duration of the first data chunk. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly duration: string; + readonly duration?: string; /** * Gets the timescale in which timestamp is represented. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescale: string; + readonly timescale?: string; } /** Incoming streams out of sync event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventIncomingStreamsOutOfSync event. */ @@ -1047,32 +1061,32 @@ export interface MediaLiveEventIncomingStreamsOutOfSyncEventData { * Gets the minimum last timestamp received. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly minLastTimestamp: string; + readonly minLastTimestamp?: string; /** * Gets the type of stream with minimum last timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly typeOfStreamWithMinLastTimestamp: string; + readonly typeOfStreamWithMinLastTimestamp?: string; /** * Gets the maximum timestamp among all the tracks (audio or video). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxLastTimestamp: string; + readonly maxLastTimestamp?: string; /** * Gets the type of stream with maximum last timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly typeOfStreamWithMaxLastTimestamp: string; + readonly typeOfStreamWithMaxLastTimestamp?: string; /** * Gets the timescale in which "MinLastTimestamp" is represented. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescaleOfMinLastTimestamp: string; + readonly timescaleOfMinLastTimestamp?: string; /** * Gets the timescale in which "MaxLastTimestamp" is represented. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescaleOfMaxLastTimestamp: string; + readonly timescaleOfMaxLastTimestamp?: string; } /** Incoming video stream out of sync event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync event. */ @@ -1081,27 +1095,27 @@ export interface MediaLiveEventIncomingVideoStreamsOutOfSyncEventData { * Gets the first timestamp received for one of the quality levels. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly firstTimestamp: string; + readonly firstTimestamp?: string; /** * Gets the duration of the data chunk with first timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly firstDuration: string; + readonly firstDuration?: string; /** * Gets the timestamp received for some other quality levels. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly secondTimestamp: string; + readonly secondTimestamp?: string; /** * Gets the duration of the data chunk with second timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly secondDuration: string; + readonly secondDuration?: string; /** * Gets the timescale in which both the timestamps and durations are represented. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescale: string; + readonly timescale?: string; } /** Ingest fragment dropped event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventIncomingDataChunkDropped event. */ @@ -1110,32 +1124,32 @@ export interface MediaLiveEventIncomingDataChunkDroppedEventData { * Gets the timestamp of the data chunk dropped. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timestamp: string; + readonly timestamp?: string; /** * Gets the type of the track (Audio / Video). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackType: string; + readonly trackType?: string; /** * Gets the bitrate of the track. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bitrate: number; + readonly bitrate?: number; /** * Gets the timescale of the Timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescale: string; + readonly timescale?: string; /** * Gets the result code for fragment drop operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resultCode: string; + readonly resultCode?: string; /** * Gets the name of the track for which fragment is dropped. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackName: string; + readonly trackName?: string; } /** Ingest heartbeat event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventIngestHeartbeat event. */ @@ -1144,82 +1158,82 @@ export interface MediaLiveEventIngestHeartbeatEventData { * Gets the type of the track (Audio / Video). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackType: string; + readonly trackType?: string; /** * Gets the track name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackName: string; + readonly trackName?: string; /** * Gets the Live Transcription language. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly transcriptionLanguage: string; + readonly transcriptionLanguage?: string; /** * Gets the Live Transcription state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly transcriptionState: string; + readonly transcriptionState?: string; /** * Gets the bitrate of the track. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bitrate: number; + readonly bitrate?: number; /** * Gets the incoming bitrate. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly incomingBitrate: number; + readonly incomingBitrate?: number; /** * Gets the track ingest drift value. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ingestDriftValue: string; + readonly ingestDriftValue?: string; /** * Gets the arrival UTC time of the last fragment. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastFragmentArrivalTime: string; + readonly lastFragmentArrivalTime?: string; /** * Gets the last timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastTimestamp: string; + readonly lastTimestamp?: string; /** * Gets the timescale of the last timestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescale: string; + readonly timescale?: string; /** * Gets the fragment Overlap count. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly overlapCount: number; + readonly overlapCount?: number; /** * Gets the fragment Discontinuity count. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly discontinuityCount: number; + readonly discontinuityCount?: number; /** * Gets Non increasing count. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nonincreasingCount: number; + readonly nonincreasingCount?: number; /** * Gets a value indicating whether unexpected bitrate is present or not. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unexpectedBitrate: boolean; + readonly unexpectedBitrate?: boolean; /** * Gets the state of the live event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state: string; + readonly state?: string; /** * Gets a value indicating whether preview is healthy or not. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly healthy: boolean; + readonly healthy?: boolean; } /** Ingest track discontinuity detected event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventTrackDiscontinuityDetected event. */ @@ -1228,40 +1242,40 @@ export interface MediaLiveEventTrackDiscontinuityDetectedEventData { * Gets the type of the track (Audio / Video). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackType: string; + readonly trackType?: string; /** * Gets the track name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly trackName: string; + readonly trackName?: string; /** * Gets the bitrate. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly bitrate: number; + readonly bitrate?: number; /** * Gets the timestamp of the previous fragment. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly previousTimestamp: string; + readonly previousTimestamp?: string; /** * Gets the timestamp of the current fragment. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly newTimestamp: string; + readonly newTimestamp?: string; /** * Gets the timescale in which both timestamps and discontinuity gap are represented. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timescale: string; + readonly timescale?: string; /** * Gets the discontinuity gap between PreviousTimestamp and NewTimestamp. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly discontinuityGap: string; + readonly discontinuityGap?: string; } -/** Channel Archive heartbeat event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventChannelArchiveHeartbeatEventData event. */ +/** Channel Archive heartbeat event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.LiveEventChannelArchiveHeartbeat event. */ export interface MediaLiveEventChannelArchiveHeartbeatEventData { /** * Gets the channel latency in ms. @@ -1276,633 +1290,633 @@ export interface MediaLiveEventChannelArchiveHeartbeatEventData { } /** Schema of the Data property of an EventGridEvent for a Geofence event (GeofenceEntered, GeofenceExited, GeofenceResult). */ -export interface MapsGeofenceEvent { +export interface MapsGeofenceEventProperties { /** 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[]; + 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; } /** 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; + udId?: string; } /** 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. */ - key: string; + key?: string; /** The label, if any, used to identify the key-value that was modified. */ - label: string; + label?: string; /** The etag representing the new state of the key-value. */ - etag: string; + etag?: string; /** The sync token representing the server state after the event. */ - syncToken: string; + syncToken?: string; } /** 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. */ - key: string; + key?: string; /** The label, if any, used to identify the key-value that was deleted. */ - label: string; + label?: string; /** The etag representing the key-value that was deleted. */ - etag: string; + etag?: string; /** The sync token representing the server state after the event. */ - syncToken: string; + syncToken?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionConnected event. */ export interface SignalRServiceClientConnectionConnectedEventData { /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The hub of connected client connection. */ - hubName: string; + hubName?: string; /** The connection Id of connected client connection. */ - connectionId: string; + connectionId?: string; /** The user Id of connected client connection. */ - userId: string; + userId?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionDisconnected event. */ export interface SignalRServiceClientConnectionDisconnectedEventData { /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The hub of connected client connection. */ - hubName: string; + hubName?: string; /** The connection Id of connected client connection. */ - connectionId: string; + connectionId?: string; /** The user Id of connected client connection. */ - userId: string; + userId?: string; /** The message of error that cause the client connection disconnected. */ - errorMessage: string; + errorMessage?: string; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** 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; + id?: string; /** Key vault name of the object that triggered this event. */ - vaultName: string; + vaultName?: string; /** The type of the object that triggered this event */ - objectType: string; + objectType?: string; /** The name of the object that triggered this event */ - objectName: string; + objectName?: string; /** The version of the object that triggered this event */ - version: string; + 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; } /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.ModelRegistered event. */ export interface MachineLearningServicesModelRegisteredEventData { /** The name of the model that was registered. */ - modelName: string; + modelName?: string; /** The version of the model that was registered. */ - modelVersion: string; + modelVersion?: string; /** The tags of the model that was registered. */ - modelTags: any; + modelTags?: Record; /** The properties of the model that was registered. */ - modelProperties: any; + modelProperties?: Record; } /** Schema of the Data property of an EventGridEvent for a Microsoft.MachineLearningServices.ModelDeployed event. */ export interface MachineLearningServicesModelDeployedEventData { /** The name of the deployed service. */ - serviceName: string; + serviceName?: string; /** The compute type (e.g. ACI, AKS) of the deployed service. */ - serviceComputeType: string; + serviceComputeType?: string; /** A common separated list of model IDs. The IDs of the models deployed in the service. */ - modelIds: string; + modelIds?: string; /** The tags of the deployed service. */ - serviceTags: any; + serviceTags?: Record; /** The properties of the deployed service. */ - serviceProperties: any; + serviceProperties?: Record; } /** 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. */ - experimentId: string; + experimentId?: string; /** The name of the experiment that the run belongs to. */ - experimentName: string; + experimentName?: string; /** The ID of the Run that was completed. */ - runId: string; + runId?: string; /** The Run Type of the completed Run. */ - runType: string; + runType?: string; /** The tags of the completed Run. */ - runTags: any; + runTags?: Record; /** The properties of the completed Run. */ - runProperties: any; + runProperties?: Record; } /** 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. */ - dataDriftId: string; + dataDriftId?: string; /** The name of the data drift monitor that triggered the event. */ - dataDriftName: string; + dataDriftName?: string; /** The ID of the Run that detected data drift. */ - runId: string; + runId?: string; /** The ID of the base Dataset used to detect drift. */ - baseDatasetId: string; + baseDatasetId?: string; /** The ID of the target Dataset used to detect drift. */ - targetDatasetId: string; + targetDatasetId?: string; /** The coefficient result that triggered the event. */ - driftCoefficient: number; + driftCoefficient?: number; /** The start time of the target dataset time series that resulted in drift detection. */ - startTime: string; + startTime?: Date; /** The end time of the target dataset time series that resulted in drift detection. */ - endTime: string; + endTime?: Date; } /** 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. */ - experimentId: string; + experimentId?: string; /** The name of the experiment that the Machine Learning Run belongs to. */ - experimentName: string; + experimentName?: string; /** The ID of the Machine Learning Run. */ - runId: string; + runId?: string; /** The Run Type of the Machine Learning Run. */ - runType: string; + runType?: string; /** The tags of the Machine Learning Run. */ - runTags: any; + runTags?: Record; /** The properties of the Machine Learning Run. */ - runProperties: any; + runProperties?: Record; /** The status of the Machine Learning Run. */ - runStatus: string; + runStatus?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.PatchingCompleted event. */ export interface RedisPatchingCompletedEventData { /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The name of this event. */ - name: string; + name?: string; /** The status of this event. Failed or succeeded */ - status: string; + status?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ScalingCompleted event. */ export interface RedisScalingCompletedEventData { /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The name of this event. */ - name: string; + name?: string; /** The status of this event. Failed or succeeded */ - status: string; + status?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ExportRDBCompleted event. */ export interface RedisExportRDBCompletedEventData { /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The name of this event. */ - name: string; + name?: string; /** The status of this event. Failed or succeeded */ - status: string; + status?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Cache.ImportRDBCompleted event. */ export interface RedisImportRDBCompletedEventData { /** The time at which the event occurred. */ - timestamp: string; + timestamp?: Date; /** The name of this event. */ - name: string; + name?: string; /** The status of this event. Failed or succeeded */ - status: string; + status?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.AppUpdated event. */ export interface WebAppUpdatedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Detail of action on the app. */ export interface AppEventTypeDetail { /** Type of action of the operation. */ - action: AppAction; + action?: AppAction; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationStarted event. */ export interface WebBackupOperationStartedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationCompleted event. */ export interface WebBackupOperationCompletedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationFailed event. */ export interface WebBackupOperationFailedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationStarted event. */ export interface WebRestoreOperationStartedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationCompleted event. */ export interface WebRestoreOperationCompletedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationFailed event. */ export interface WebRestoreOperationFailedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapStarted event. */ export interface WebSlotSwapStartedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapCompleted event. */ export interface WebSlotSwapCompletedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapFailed event. */ export interface WebSlotSwapFailedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapWithPreviewStarted event. */ export interface WebSlotSwapWithPreviewStartedEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapWithPreviewCancelled event. */ export interface WebSlotSwapWithPreviewCancelledEventData { /** Detail of action on the app. */ - appEventTypeDetail: AppEventTypeDetail; + appEventTypeDetail?: AppEventTypeDetail; /** name of the web site that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the site API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the site API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the site API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** 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. */ - appServicePlanEventTypeDetail: AppServicePlanEventTypeDetail; + appServicePlanEventTypeDetail?: AppServicePlanEventTypeDetail; /** sku of app service plan. */ - sku: WebAppServicePlanUpdatedEventDataSku; + sku?: WebAppServicePlanUpdatedEventDataSku; /** name of the app service plan that had this event. */ - name: string; + name?: string; /** The client request id generated by the app service for the app service plan API operation that triggered this event. */ - clientRequestId: string; + clientRequestId?: string; /** The correlation request id generated by the app service for the app service plan API operation that triggered this event. */ - correlationRequestId: string; + correlationRequestId?: string; /** The request id generated by the app service for the app service plan API operation that triggered this event. */ - requestId: string; + requestId?: string; /** HTTP request URL of this operation. */ - address: string; + address?: string; /** HTTP verb of this operation. */ - verb: string; + verb?: string; } /** Detail of action on the app service plan. */ export interface AppServicePlanEventTypeDetail { /** Kind of environment where app service plan is. */ - stampKind: StampKind; + stampKind?: StampKind; /** Type of action on the app service plan. */ - action: AppServicePlanAction; + action?: AppServicePlanAction; /** Asynchronous operation status of the operation on the app service plan. */ - status: AsyncStatus; + status?: AsyncStatus; } /** sku of app service plan. */ @@ -1922,13 +1936,13 @@ export interface WebAppServicePlanUpdatedEventDataSku { /** 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; + userCommunicationIdentifier?: CommunicationIdentifierModel; } /** 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 { /** Raw Id of the identifier. Optional in requests, required in responses. */ - rawId: string; + rawId?: string; /** The communication user. */ communicationUser?: CommunicationUserIdentifierModel; /** The phone number. */ @@ -1960,253 +1974,261 @@ export interface MicrosoftTeamsUserIdentifierModel { } /** Schema of common properties of all chat events */ -export interface AcsChatEventBase { +export interface AcsChatEventBaseProperties { /** The communication identifier of the target user */ - recipientCommunicationIdentifier: CommunicationIdentifierModel; + recipientCommunicationIdentifier?: CommunicationIdentifierModel; /** The transaction id will be used as co-relation vector */ - transactionId: string; + transactionId?: string; /** The chat thread id */ - threadId: string; + threadId?: string; } /** Schema of common properties of all thread-level chat events */ -export interface AcsChatEventInThreadBase { +export interface AcsChatEventInThreadBaseProperties { /** The transaction id will be used as co-relation vector */ - transactionId: string; + transactionId?: string; /** The chat thread id */ - threadId: string; + threadId?: string; } /** Schema of the chat thread participant */ -export interface AcsChatThreadParticipant { +export interface AcsChatThreadParticipantProperties { /** The name of the user */ - displayName: string; + displayName?: string; /** The communication identifier of the user */ - participantCommunicationIdentifier: CommunicationIdentifierModel; + participantCommunicationIdentifier?: CommunicationIdentifierModel; } /** Schema for details of a delivery attempt */ -export interface AcsSmsDeliveryAttempt { +export interface AcsSmsDeliveryAttemptProperties { /** TimeStamp when delivery was attempted */ - timestamp: string; + timestamp?: Date; /** Number of segments that were successfully delivered */ - segmentsSucceeded: number; + segmentsSucceeded?: number; /** Number of segments whose delivery failed */ - segmentsFailed: number; + segmentsFailed?: number; } /** Schema of common properties of all SMS events */ -export interface AcsSmsEventBase { +export interface AcsSmsEventBaseProperties { /** The identity of the SMS message */ - messageId: string; + messageId?: string; /** The identity of SMS message sender */ - from: string; + from?: string; /** The identity of SMS message receiver */ - to: string; + to?: string; } /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RecordingFileStatusUpdated event. */ export interface AcsRecordingFileStatusUpdatedEventData { /** The details of recording storage information */ - recordingStorageInfo: AcsRecordingStorageInfo; + recordingStorageInfo?: AcsRecordingStorageInfoProperties; /** The time at which the recording started */ - recordingStartTime: string; + recordingStartTime?: Date; /** The recording duration in milliseconds */ - recordingDurationMs: number; + recordingDurationMs?: number; + /** The recording content type- AudioVideo, or Audio */ + recordingContentType?: RecordingContentType; + /** The recording channel type - Mixed, Unmixed */ + recordingChannelType?: RecordingChannelType; + /** The recording format type - Mp4, Mp3, Wav */ + recordingFormatType?: RecordingFormatType; /** The reason for ending recording session */ - sessionEndReason: string; + sessionEndReason?: string; } /** Schema for all properties of Recording Storage Information. */ -export interface AcsRecordingStorageInfo { +export interface AcsRecordingStorageInfoProperties { /** List of details of recording chunks information */ - recordingChunks: AcsRecordingChunkInfo[]; + recordingChunks?: AcsRecordingChunkInfoProperties[]; } /** Schema for all properties of Recording Chunk Information. */ -export interface AcsRecordingChunkInfo { +export interface AcsRecordingChunkInfoProperties { /** The documentId of the recording chunk */ - documentId: string; + documentId?: string; /** The index of the recording chunk */ - index: number; + index?: number; /** The reason for ending the recording chunk */ - endReason: string; + endReason?: string; /** The location of the metadata for this chunk */ - metadataLocation: string; + metadataLocation?: string; /** The location of the content for this chunk */ - contentLocation: string; + contentLocation?: string; + /** The location to delete all chunk storage */ + deleteLocation?: string; } /** 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. */ - timestamp: string; + timestamp?: Date; /** The resource ID of the policy assignment. */ - policyAssignmentId: string; + policyAssignmentId?: string; /** The resource ID of the policy definition. */ - policyDefinitionId: string; + policyDefinitionId?: string; /** The reference ID for the policy definition inside the initiative definition, if the policy assignment is for an initiative. May be empty. */ - policyDefinitionReferenceId: string; + policyDefinitionReferenceId?: string; /** The compliance state of the resource with respect to the policy assignment. */ - complianceState: string; + complianceState?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The compliance reason code. May be empty. */ - complianceReasonCode: string; + complianceReasonCode?: string; } /** 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. */ - timestamp: string; + timestamp?: Date; /** The resource ID of the policy assignment. */ - policyAssignmentId: string; + policyAssignmentId?: string; /** The resource ID of the policy definition. */ - policyDefinitionId: string; + policyDefinitionId?: string; /** The reference ID for the policy definition inside the initiative definition, if the policy assignment is for an initiative. May be empty. */ - policyDefinitionReferenceId: string; + policyDefinitionReferenceId?: string; /** The compliance state of the resource with respect to the policy assignment. */ - complianceState: string; + complianceState?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The compliance reason code. May be empty. */ - complianceReasonCode: string; + complianceReasonCode?: string; } /** 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. */ - timestamp: string; + timestamp?: Date; /** The resource ID of the policy assignment. */ - policyAssignmentId: string; + policyAssignmentId?: string; /** The resource ID of the policy definition. */ - policyDefinitionId: string; + policyDefinitionId?: string; /** The reference ID for the policy definition inside the initiative definition, if the policy assignment is for an initiative. May be empty. */ - policyDefinitionReferenceId: string; + policyDefinitionReferenceId?: string; /** The compliance state of the resource with respect to the policy assignment. */ - complianceState: string; + complianceState?: string; /** The subscription ID of the resource. */ - subscriptionId: string; + subscriptionId?: string; /** The compliance reason code. May be empty. */ - complianceReasonCode: string; + complianceReasonCode?: string; } /** 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 */ - latestSupportedKubernetesVersion: string; + latestSupportedKubernetesVersion?: string; /** The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource */ - latestStableKubernetesVersion: string; + latestStableKubernetesVersion?: string; /** The highest PATCH Kubernetes version for the lowest applicable MINOR version available for the ManagedCluster resource */ - lowestMinorKubernetesVersion: string; + lowestMinorKubernetesVersion?: string; /** The highest PATCH Kubernetes version considered preview for the ManagedCluster resource. There might not be any version in preview at the time of publishing the event */ - latestPreviewKubernetesVersion: string; + latestPreviewKubernetesVersion?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** 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; + resourceUri?: string; } /** Event data for Microsoft.Devices.DeviceCreated event. */ -export type IotHubDeviceCreatedEventData = DeviceLifeCycleEvent & {}; +export type IotHubDeviceCreatedEventData = DeviceLifeCycleEventProperties & {}; /** Event data for Microsoft.Devices.DeviceDeleted event. */ -export type IotHubDeviceDeletedEventData = DeviceLifeCycleEvent & {}; +export type IotHubDeviceDeletedEventData = DeviceLifeCycleEventProperties & {}; /** Event data for Microsoft.Devices.DeviceConnected event. */ -export type IotHubDeviceConnectedEventData = DeviceConnectionStateEvent & {}; +export type IotHubDeviceConnectedEventData = DeviceConnectionStateEventProperties & {}; /** Event data for Microsoft.Devices.DeviceDisconnected event. */ -export type IotHubDeviceDisconnectedEventData = DeviceConnectionStateEvent & {}; +export type IotHubDeviceDisconnectedEventData = DeviceConnectionStateEventProperties & {}; /** Event data for Microsoft.Devices.DeviceTelemetry event. */ -export type IotHubDeviceTelemetryEventData = DeviceTelemetryEvent & {}; +export type IotHubDeviceTelemetryEventData = DeviceTelemetryEventProperties & {}; /** Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImagePushed event. */ export type ContainerRegistryImagePushedEventData = ContainerRegistryEventData & {}; @@ -2232,19 +2254,19 @@ export type MediaJobCancelingEventData = MediaJobStateChangeEventData & {}; /** Job finished event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.JobFinished event. */ export type MediaJobFinishedEventData = MediaJobStateChangeEventData & { /** Gets the Job outputs. */ - outputs: MediaJobOutputUnion[]; + outputs?: MediaJobOutputUnion[]; }; /** Job canceled event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.JobCanceled event. */ export type MediaJobCanceledEventData = MediaJobStateChangeEventData & { /** Gets the Job outputs. */ - outputs: MediaJobOutputUnion[]; + outputs?: MediaJobOutputUnion[]; }; /** Job error state event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.JobErrored event. */ export type MediaJobErroredEventData = MediaJobStateChangeEventData & { /** Gets the Job outputs. */ - outputs: MediaJobOutputUnion[]; + outputs?: MediaJobOutputUnion[]; }; /** The event data for a Job output asset. */ @@ -2252,7 +2274,7 @@ export type MediaJobOutputAsset = MediaJobOutput & { /** Polymorphic discriminator, which specifies the different types this object can be */ odataType: "#Microsoft.Media.JobOutputAsset"; /** Gets the Job output asset name. */ - assetName: string; + assetName?: string; }; /** Job output canceled event data. Schema of the data property of an EventGridEvent for a Microsoft.Media.JobOutputCanceled event. */ @@ -2274,234 +2296,234 @@ export type MediaJobOutputProcessingEventData = MediaJobOutputStateChangeEventDa export type MediaJobOutputScheduledEventData = MediaJobOutputStateChangeEventData & {}; /** Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. */ -export type MapsGeofenceEnteredEventData = MapsGeofenceEvent & {}; +export type MapsGeofenceEnteredEventData = MapsGeofenceEventProperties & {}; /** Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. */ -export type MapsGeofenceExitedEventData = MapsGeofenceEvent & {}; +export type MapsGeofenceExitedEventData = MapsGeofenceEventProperties & {}; /** Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceResult event. */ -export type MapsGeofenceResultEventData = MapsGeofenceEvent & {}; +export type MapsGeofenceResultEventData = MapsGeofenceEventProperties & {}; /** Schema of common properties of all chat message events */ -export type AcsChatMessageEventBase = AcsChatEventBase & { +export type AcsChatMessageEventBaseProperties = AcsChatEventBaseProperties & { /** The chat message id */ - messageId: string; + messageId?: string; /** The communication identifier of the sender */ - senderCommunicationIdentifier: CommunicationIdentifierModel; + senderCommunicationIdentifier?: CommunicationIdentifierModel; /** The display name of the sender */ - senderDisplayName: string; + senderDisplayName?: string; /** The original compose time of the message */ - composeTime: string; + composeTime?: Date; /** The type of the message */ - type: string; + type?: string; /** The version of the message */ - version: number; + version?: number; }; /** Schema of common properties of all chat thread events */ -export type AcsChatThreadEventBase = AcsChatEventBase & { +export type AcsChatThreadEventBaseProperties = AcsChatEventBaseProperties & { /** The original creation time of the thread */ - createTime: string; + createTime?: Date; /** The version of the thread */ - version: number; + version?: number; }; /** Schema of common properties of all thread-level chat message events */ -export type AcsChatMessageEventInThreadBase = AcsChatEventInThreadBase & { +export type AcsChatMessageEventInThreadBaseProperties = AcsChatEventInThreadBaseProperties & { /** The chat message id */ - messageId: string; + messageId?: string; /** The communication identifier of the sender */ - senderCommunicationIdentifier: CommunicationIdentifierModel; + senderCommunicationIdentifier?: CommunicationIdentifierModel; /** The display name of the sender */ - senderDisplayName: string; + senderDisplayName?: string; /** The original compose time of the message */ - composeTime: string; + composeTime?: Date; /** The type of the message */ - type: string; + type?: string; /** The version of the message */ - version: number; + version?: number; }; /** Schema of common properties of all chat thread events */ -export type AcsChatThreadEventInThreadBase = AcsChatEventInThreadBase & { +export type AcsChatThreadEventInThreadBaseProperties = AcsChatEventInThreadBaseProperties & { /** The original creation time of the thread */ - createTime: string; + createTime?: Date; /** The version of the thread */ - version: number; + version?: number; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadParticipantAdded event. */ -export type AcsChatParticipantAddedToThreadEventData = AcsChatEventInThreadBase & { +export type AcsChatParticipantAddedToThreadEventData = AcsChatEventInThreadBaseProperties & { /** The time at which the user was added to the thread */ - time: string; + time?: Date; /** The communication identifier of the user who added the user */ - addedByCommunicationIdentifier: CommunicationIdentifierModel; + addedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The details of the user who was added */ - participantAdded: AcsChatThreadParticipant; + participantAdded?: AcsChatThreadParticipantProperties; /** The version of the thread */ - version: number; + version?: number; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadParticipantRemoved event. */ -export type AcsChatParticipantRemovedFromThreadEventData = AcsChatEventInThreadBase & { +export type AcsChatParticipantRemovedFromThreadEventData = AcsChatEventInThreadBaseProperties & { /** The time at which the user was removed to the thread */ - time: string; + time?: Date; /** The communication identifier of the user who removed the user */ - removedByCommunicationIdentifier: CommunicationIdentifierModel; + removedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The details of the user who was removed */ - participantRemoved: AcsChatThreadParticipant; + participantRemoved?: AcsChatThreadParticipantProperties; /** The version of the thread */ - version: number; + version?: number; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSDeliveryReportReceived event. */ -export type AcsSmsDeliveryReportReceivedEventData = AcsSmsEventBase & { +export type AcsSmsDeliveryReportReceivedEventData = AcsSmsEventBaseProperties & { /** Status of Delivery */ - deliveryStatus: string; + deliveryStatus?: string; /** Details about Delivery Status */ - deliveryStatusDetails: string; + deliveryStatusDetails?: string; /** List of details of delivery attempts made */ - deliveryAttempts: AcsSmsDeliveryAttempt[]; + deliveryAttempts?: AcsSmsDeliveryAttemptProperties[]; /** The time at which the SMS delivery report was received */ - receivedTimestamp: string; + receivedTimestamp?: Date; /** Customer Content */ - tag: string; + tag?: string; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. */ -export type AcsSmsReceivedEventData = AcsSmsEventBase & { +export type AcsSmsReceivedEventData = AcsSmsEventBaseProperties & { /** The SMS content */ - message: string; + message?: string; /** The time at which the SMS was received */ - receivedTimestamp: string; + receivedTimestamp?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceived event. */ -export type AcsChatMessageReceivedEventData = AcsChatMessageEventBase & { +export type AcsChatMessageReceivedEventData = AcsChatMessageEventBaseProperties & { /** The body of the chat message */ - messageBody: string; + messageBody?: string; /** The chat message metadata */ - metadata: { [propertyName: string]: string }; + metadata?: { [propertyName: string]: string }; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEdited event. */ -export type AcsChatMessageEditedEventData = AcsChatMessageEventBase & { +export type AcsChatMessageEditedEventData = AcsChatMessageEventBaseProperties & { /** The body of the chat message */ - messageBody: string; + messageBody?: string; /** The chat message metadata */ - metadata: { [propertyName: string]: string }; + metadata?: { [propertyName: string]: string }; /** The time at which the message was edited */ - editTime: string; + editTime?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeleted event. */ -export type AcsChatMessageDeletedEventData = AcsChatMessageEventBase & { +export type AcsChatMessageDeletedEventData = AcsChatMessageEventBaseProperties & { /** The time at which the message was deleted */ - deleteTime: string; + deleteTime?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadCreatedWithUser event. */ -export type AcsChatThreadCreatedWithUserEventData = AcsChatThreadEventBase & { +export type AcsChatThreadCreatedWithUserEventData = AcsChatThreadEventBaseProperties & { /** The communication identifier of the user who created the thread */ - createdByCommunicationIdentifier: CommunicationIdentifierModel; + createdByCommunicationIdentifier?: CommunicationIdentifierModel; /** The thread properties */ - properties: { [propertyName: string]: any }; + properties?: { [propertyName: string]: Record }; /** The list of properties of participants who are part of the thread */ - participants: AcsChatThreadParticipant[]; + participants?: AcsChatThreadParticipantProperties[]; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadWithUserDeleted event. */ -export type AcsChatThreadWithUserDeletedEventData = AcsChatThreadEventBase & { +export type AcsChatThreadWithUserDeletedEventData = AcsChatThreadEventBaseProperties & { /** The communication identifier of the user who deleted the thread */ - deletedByCommunicationIdentifier: CommunicationIdentifierModel; + deletedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The deletion time of the thread */ - deleteTime: string; + deleteTime?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser event. */ -export type AcsChatThreadPropertiesUpdatedPerUserEventData = AcsChatThreadEventBase & { +export type AcsChatThreadPropertiesUpdatedPerUserEventData = AcsChatThreadEventBaseProperties & { /** The communication identifier of the user who updated the thread properties */ - editedByCommunicationIdentifier: CommunicationIdentifierModel; + editedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The time at which the properties of the thread were updated */ - editTime: string; + editTime?: Date; /** The updated thread properties */ - properties: { [propertyName: string]: any }; + properties?: { [propertyName: string]: Record }; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatParticipantAddedToThreadWithUser event. */ -export type AcsChatParticipantAddedToThreadWithUserEventData = AcsChatThreadEventBase & { +export type AcsChatParticipantAddedToThreadWithUserEventData = AcsChatThreadEventBaseProperties & { /** The time at which the user was added to the thread */ - time: string; + time?: Date; /** The communication identifier of the user who added the user */ - addedByCommunicationIdentifier: CommunicationIdentifierModel; + addedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The details of the user who was added */ - participantAdded: AcsChatThreadParticipant; + participantAdded?: AcsChatThreadParticipantProperties; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser event. */ -export type AcsChatParticipantRemovedFromThreadWithUserEventData = AcsChatThreadEventBase & { +export type AcsChatParticipantRemovedFromThreadWithUserEventData = AcsChatThreadEventBaseProperties & { /** The time at which the user was removed to the thread */ - time: string; + time?: Date; /** The communication identifier of the user who removed the user */ - removedByCommunicationIdentifier: CommunicationIdentifierModel; + removedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The details of the user who was removed */ - participantRemoved: AcsChatThreadParticipant; + participantRemoved?: AcsChatThreadParticipantProperties; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageReceivedInThread event. */ -export type AcsChatMessageReceivedInThreadEventData = AcsChatMessageEventInThreadBase & { +export type AcsChatMessageReceivedInThreadEventData = AcsChatMessageEventInThreadBaseProperties & { /** The body of the chat message */ - messageBody: string; + messageBody?: string; /** The chat message metadata */ - metadata: { [propertyName: string]: string }; + metadata?: { [propertyName: string]: string }; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEditedInThread event. */ -export type AcsChatMessageEditedInThreadEventData = AcsChatMessageEventInThreadBase & { +export type AcsChatMessageEditedInThreadEventData = AcsChatMessageEventInThreadBaseProperties & { /** The body of the chat message */ - messageBody: string; + messageBody?: string; /** The chat message metadata */ - metadata: { [propertyName: string]: string }; + metadata?: { [propertyName: string]: string }; /** The time at which the message was edited */ - editTime: string; + editTime?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageDeletedInThread event. */ -export type AcsChatMessageDeletedInThreadEventData = AcsChatMessageEventInThreadBase & { +export type AcsChatMessageDeletedInThreadEventData = AcsChatMessageEventInThreadBaseProperties & { /** The time at which the message was deleted */ - deleteTime: string; + deleteTime?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadCreated event. */ -export type AcsChatThreadCreatedEventData = AcsChatThreadEventInThreadBase & { +export type AcsChatThreadCreatedEventData = AcsChatThreadEventInThreadBaseProperties & { /** The communication identifier of the user who created the thread */ - createdByCommunicationIdentifier: CommunicationIdentifierModel; + createdByCommunicationIdentifier?: CommunicationIdentifierModel; /** The thread properties */ - properties: { [propertyName: string]: any }; + properties?: { [propertyName: string]: Record }; /** The list of properties of participants who are part of the thread */ - participants: AcsChatThreadParticipant[]; + participants?: AcsChatThreadParticipantProperties[]; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadDeleted event. */ -export type AcsChatThreadDeletedEventData = AcsChatThreadEventInThreadBase & { +export type AcsChatThreadDeletedEventData = AcsChatThreadEventInThreadBaseProperties & { /** The communication identifier of the user who deleted the thread */ - deletedByCommunicationIdentifier: CommunicationIdentifierModel; + deletedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The deletion time of the thread */ - deleteTime: string; + deleteTime?: Date; }; /** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadPropertiesUpdated event. */ -export type AcsChatThreadPropertiesUpdatedEventData = AcsChatThreadEventInThreadBase & { +export type AcsChatThreadPropertiesUpdatedEventData = AcsChatThreadEventInThreadBaseProperties & { /** The communication identifier of the user who updated the thread properties */ - editedByCommunicationIdentifier: CommunicationIdentifierModel; + editedByCommunicationIdentifier?: CommunicationIdentifierModel; /** The time at which the properties of the thread were updated */ - editTime: string; + editTime?: Date; /** The updated thread properties */ - properties: { [propertyName: string]: any }; + properties?: { [propertyName: string]: Record }; }; /** Known values of {@link AppAction} that the service accepts. */ -export const enum KnownAppAction { +export enum KnownAppAction { /** Web app was restarted. */ Restarted = "Restarted", /** Web app was stopped. */ @@ -2531,7 +2553,7 @@ export const enum KnownAppAction { export type AppAction = string; /** Known values of {@link StampKind} that the service accepts. */ -export const enum KnownStampKind { +export enum KnownStampKind { /** App Service Plan is running on a public stamp. */ Public = "Public", /** App Service Plan is running on an App Service Environment V1. */ @@ -2552,7 +2574,7 @@ export const enum KnownStampKind { export type StampKind = string; /** Known values of {@link AppServicePlanAction} that the service accepts. */ -export const enum KnownAppServicePlanAction { +export enum KnownAppServicePlanAction { /** App Service plan is being updated. */ Updated = "Updated" } @@ -2567,7 +2589,7 @@ export const enum KnownAppServicePlanAction { export type AppServicePlanAction = string; /** Known values of {@link AsyncStatus} that the service accepts. */ -export const enum KnownAsyncStatus { +export enum KnownAsyncStatus { /** Async operation has started. */ Started = "Started", /** Async operation has completed. */ @@ -2588,7 +2610,7 @@ export const enum KnownAsyncStatus { export type AsyncStatus = string; /** Known values of {@link CommunicationCloudEnvironmentModel} that the service accepts. */ -export const enum KnownCommunicationCloudEnvironmentModel { +export enum KnownCommunicationCloudEnvironmentModel { Public = "public", Dod = "dod", Gcch = "gcch" @@ -2604,6 +2626,56 @@ export const enum KnownCommunicationCloudEnvironmentModel { * **gcch** */ export type CommunicationCloudEnvironmentModel = string; + +/** Known values of {@link RecordingContentType} that the service accepts. */ +export enum KnownRecordingContentType { + AudioVideo = "AudioVideo", + Audio = "Audio" +} + +/** + * Defines values for RecordingContentType. \ + * {@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** + */ +export type RecordingContentType = string; + +/** Known values of {@link RecordingChannelType} that the service accepts. */ +export enum KnownRecordingChannelType { + Mixed = "Mixed", + Unmixed = "Unmixed" +} + +/** + * Defines values for RecordingChannelType. \ + * {@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** + */ +export type RecordingChannelType = string; + +/** Known values of {@link RecordingFormatType} that the service accepts. */ +export enum KnownRecordingFormatType { + Wav = "Wav", + Mp3 = "Mp3", + Mp4 = "Mp4" +} + +/** + * Defines values for RecordingFormatType. \ + * {@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** + */ +export type RecordingFormatType = string; /** Defines values for MediaJobState. */ export type MediaJobState = | "Canceled" @@ -2635,19 +2707,19 @@ export type MediaJobErrorCategory = export type MediaJobRetry = "DoNotRetry" | "MayRetry"; /** Optional parameters. */ -export interface GeneratedClientPublishEventsOptionalParams +export interface PublishEventsOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface GeneratedClientPublishCloudEventEventsOptionalParams +export interface PublishCloudEventEventsOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface GeneratedClientPublishCustomEventEventsOptionalParams +export interface PublishCustomEventEventsOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface GeneratedClientOptionalParams +export interface EventGridClientOptionalParams extends coreClient.ServiceClientOptions { /** Api Version */ apiVersion?: string; diff --git a/sdk/eventgrid/eventgrid/src/generated/models/mappers.ts b/sdk/eventgrid/eventgrid/src/models/mappers.ts similarity index 85% rename from sdk/eventgrid/eventgrid/src/generated/models/mappers.ts rename to sdk/eventgrid/eventgrid/src/models/mappers.ts index a2cf04a2a25b..09d636c3a638 100644 --- a/sdk/eventgrid/eventgrid/src/generated/models/mappers.ts +++ b/sdk/eventgrid/eventgrid/src/models/mappers.ts @@ -37,7 +37,8 @@ export const EventGridEvent: coreClient.CompositeMapper = { serializedName: "data", required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, eventType: { @@ -95,7 +96,8 @@ export const CloudEvent: coreClient.CompositeMapper = { data: { serializedName: "data", type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, dataBase64: { @@ -153,86 +155,75 @@ export const StorageBlobCreatedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, eTag: { serializedName: "eTag", - required: true, type: { name: "String" } }, contentType: { serializedName: "contentType", - required: true, type: { name: "String" } }, contentLength: { serializedName: "contentLength", - required: true, type: { name: "Number" } }, contentOffset: { serializedName: "contentOffset", - required: true, type: { name: "Number" } }, blobType: { serializedName: "blobType", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -246,65 +237,57 @@ export const StorageBlobDeletedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, contentType: { serializedName: "contentType", - required: true, type: { name: "String" } }, blobType: { serializedName: "blobType", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -318,58 +301,51 @@ export const StorageDirectoryCreatedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, eTag: { serializedName: "eTag", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -383,58 +359,51 @@ export const StorageDirectoryDeletedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, recursive: { serializedName: "recursive", - required: true, type: { name: "Boolean" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -448,58 +417,51 @@ export const StorageBlobRenamedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, sourceUrl: { serializedName: "sourceUrl", - required: true, type: { name: "String" } }, destinationUrl: { serializedName: "destinationUrl", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -513,58 +475,51 @@ export const StorageDirectoryRenamedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, sourceUrl: { serializedName: "sourceUrl", - required: true, type: { name: "String" } }, destinationUrl: { serializedName: "destinationUrl", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -578,7 +533,6 @@ export const StorageLifecyclePolicyCompletedEventData: coreClient.CompositeMappe modelProperties: { scheduleTime: { serializedName: "scheduleTime", - required: true, type: { name: "String" } @@ -615,21 +569,18 @@ export const StorageLifecyclePolicyActionSummaryDetail: coreClient.CompositeMapp modelProperties: { totalObjectsCount: { serializedName: "totalObjectsCount", - required: true, type: { name: "Number" } }, successCount: { serializedName: "successCount", - required: true, type: { name: "Number" } }, errorList: { serializedName: "errorList", - required: true, type: { name: "String" } @@ -645,72 +596,63 @@ export const StorageBlobTierChangedEventData: coreClient.CompositeMapper = { modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, contentType: { serializedName: "contentType", - required: true, type: { name: "String" } }, contentLength: { serializedName: "contentLength", - required: true, type: { name: "Number" } }, blobType: { serializedName: "blobType", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -724,72 +666,63 @@ export const StorageAsyncOperationInitiatedEventData: coreClient.CompositeMapper modelProperties: { api: { serializedName: "api", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, contentType: { serializedName: "contentType", - required: true, type: { name: "String" } }, contentLength: { serializedName: "contentLength", - required: true, type: { name: "Number" } }, blobType: { serializedName: "blobType", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, sequencer: { serializedName: "sequencer", - required: true, type: { name: "String" } }, identity: { serializedName: "identity", - required: true, type: { name: "String" } }, storageDiagnostics: { serializedName: "storageDiagnostics", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -803,49 +736,42 @@ export const StorageBlobInventoryPolicyCompletedEventData: coreClient.CompositeM modelProperties: { scheduleDateTime: { serializedName: "scheduleDateTime", - required: true, type: { - name: "String" + name: "DateTime" } }, accountName: { serializedName: "accountName", - required: true, type: { name: "String" } }, ruleName: { serializedName: "ruleName", - required: true, type: { name: "String" } }, policyRunStatus: { serializedName: "policyRunStatus", - required: true, type: { name: "String" } }, policyRunStatusMessage: { serializedName: "policyRunStatusMessage", - required: true, type: { name: "String" } }, policyRunId: { serializedName: "policyRunId", - required: true, type: { name: "String" } }, manifestBlobUrl: { serializedName: "manifestBlobUrl", - required: true, type: { name: "String" } @@ -861,149 +787,129 @@ export const EventHubCaptureFileCreatedEventData: coreClient.CompositeMapper = { modelProperties: { fileurl: { serializedName: "fileurl", - required: true, type: { name: "String" } }, fileType: { serializedName: "fileType", - required: true, type: { name: "String" } }, partitionId: { serializedName: "partitionId", - required: true, type: { name: "String" } }, sizeInBytes: { serializedName: "sizeInBytes", - required: true, type: { name: "Number" } }, eventCount: { serializedName: "eventCount", - required: true, type: { name: "Number" } }, firstSequenceNumber: { serializedName: "firstSequenceNumber", - required: true, type: { name: "Number" } }, lastSequenceNumber: { serializedName: "lastSequenceNumber", - required: true, type: { name: "Number" } }, firstEnqueueTime: { serializedName: "firstEnqueueTime", - required: true, type: { - name: "String" + name: "DateTime" } }, lastEnqueueTime: { serializedName: "lastEnqueueTime", - required: true, type: { - name: "String" + name: "DateTime" } } } } }; -export const ResourceWriteSuccessEventData: coreClient.CompositeMapper = { +export const ResourceWriteSuccessData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceWriteSuccessEventData", + className: "ResourceWriteSuccessData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1012,84 +918,73 @@ export const ResourceWriteSuccessEventData: coreClient.CompositeMapper = { } }; -export const ResourceWriteFailureEventData: coreClient.CompositeMapper = { +export const ResourceWriteFailureData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceWriteFailureEventData", + className: "ResourceWriteFailureData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1098,84 +993,73 @@ export const ResourceWriteFailureEventData: coreClient.CompositeMapper = { } }; -export const ResourceWriteCancelEventData: coreClient.CompositeMapper = { +export const ResourceWriteCancelData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceWriteCancelEventData", + className: "ResourceWriteCancelData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1184,84 +1068,73 @@ export const ResourceWriteCancelEventData: coreClient.CompositeMapper = { } }; -export const ResourceDeleteSuccessEventData: coreClient.CompositeMapper = { +export const ResourceDeleteSuccessData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceDeleteSuccessEventData", + className: "ResourceDeleteSuccessData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1270,84 +1143,73 @@ export const ResourceDeleteSuccessEventData: coreClient.CompositeMapper = { } }; -export const ResourceDeleteFailureEventData: coreClient.CompositeMapper = { +export const ResourceDeleteFailureData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceDeleteFailureEventData", + className: "ResourceDeleteFailureData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1356,84 +1218,73 @@ export const ResourceDeleteFailureEventData: coreClient.CompositeMapper = { } }; -export const ResourceDeleteCancelEventData: coreClient.CompositeMapper = { +export const ResourceDeleteCancelData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceDeleteCancelEventData", + className: "ResourceDeleteCancelData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1442,84 +1293,73 @@ export const ResourceDeleteCancelEventData: coreClient.CompositeMapper = { } }; -export const ResourceActionSuccessEventData: coreClient.CompositeMapper = { +export const ResourceActionSuccessData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceActionSuccessEventData", + className: "ResourceActionSuccessData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1528,84 +1368,73 @@ export const ResourceActionSuccessEventData: coreClient.CompositeMapper = { } }; -export const ResourceActionFailureEventData: coreClient.CompositeMapper = { +export const ResourceActionFailureData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceActionFailureEventData", + className: "ResourceActionFailureData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1614,84 +1443,73 @@ export const ResourceActionFailureEventData: coreClient.CompositeMapper = { } }; -export const ResourceActionCancelEventData: coreClient.CompositeMapper = { +export const ResourceActionCancelData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceActionCancelEventData", + className: "ResourceActionCancelData", modelProperties: { tenantId: { serializedName: "tenantId", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, resourceGroup: { serializedName: "resourceGroup", - required: true, type: { name: "String" } }, resourceProvider: { serializedName: "resourceProvider", - required: true, type: { name: "String" } }, resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } }, operationName: { serializedName: "operationName", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } }, authorization: { serializedName: "authorization", - required: true, type: { name: "String" } }, claims: { serializedName: "claims", - required: true, type: { name: "String" } }, correlationId: { serializedName: "correlationId", - required: true, type: { name: "String" } }, httpRequest: { serializedName: "httpRequest", - required: true, type: { name: "String" } @@ -1707,7 +1525,6 @@ export const SubscriptionValidationEventData: coreClient.CompositeMapper = { modelProperties: { validationCode: { serializedName: "validationCode", - required: true, readOnly: true, type: { name: "String" @@ -1715,7 +1532,6 @@ export const SubscriptionValidationEventData: coreClient.CompositeMapper = { }, validationUrl: { serializedName: "validationUrl", - required: true, readOnly: true, type: { name: "String" @@ -1732,7 +1548,6 @@ export const SubscriptionValidationResponse: coreClient.CompositeMapper = { modelProperties: { validationResponse: { serializedName: "validationResponse", - required: true, type: { name: "String" } @@ -1748,7 +1563,6 @@ export const SubscriptionDeletedEventData: coreClient.CompositeMapper = { modelProperties: { eventSubscriptionId: { serializedName: "eventSubscriptionId", - required: true, readOnly: true, type: { name: "String" @@ -1758,21 +1572,19 @@ export const SubscriptionDeletedEventData: coreClient.CompositeMapper = { } }; -export const DeviceLifeCycleEvent: coreClient.CompositeMapper = { +export const DeviceLifeCycleEventProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DeviceLifeCycleEvent", + className: "DeviceLifeCycleEventProperties", modelProperties: { deviceId: { serializedName: "deviceId", - required: true, type: { name: "String" } }, hubName: { serializedName: "hubName", - required: true, type: { name: "String" } @@ -1795,42 +1607,36 @@ export const DeviceTwinInfo: coreClient.CompositeMapper = { modelProperties: { authenticationType: { serializedName: "authenticationType", - required: true, type: { name: "String" } }, cloudToDeviceMessageCount: { serializedName: "cloudToDeviceMessageCount", - required: true, type: { name: "Number" } }, connectionState: { serializedName: "connectionState", - required: true, type: { name: "String" } }, deviceId: { serializedName: "deviceId", - required: true, type: { name: "String" } }, etag: { serializedName: "etag", - required: true, type: { name: "String" } }, lastActivityTime: { serializedName: "lastActivityTime", - required: true, type: { name: "String" } @@ -1844,21 +1650,18 @@ export const DeviceTwinInfo: coreClient.CompositeMapper = { }, status: { serializedName: "status", - required: true, type: { name: "String" } }, statusUpdateTime: { serializedName: "statusUpdateTime", - required: true, type: { name: "String" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -1883,24 +1686,24 @@ export const DeviceTwinInfoProperties: coreClient.CompositeMapper = { serializedName: "desired", type: { name: "Composite", - className: "DeviceTwin" + className: "DeviceTwinProperties" } }, reported: { serializedName: "reported", type: { name: "Composite", - className: "DeviceTwin" + className: "DeviceTwinProperties" } } } } }; -export const DeviceTwin: coreClient.CompositeMapper = { +export const DeviceTwinProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DeviceTwin", + className: "DeviceTwinProperties", modelProperties: { metadata: { serializedName: "metadata", @@ -1911,7 +1714,6 @@ export const DeviceTwin: coreClient.CompositeMapper = { }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -1927,7 +1729,6 @@ export const DeviceTwinMetadata: coreClient.CompositeMapper = { modelProperties: { lastUpdated: { serializedName: "lastUpdated", - required: true, type: { name: "String" } @@ -1957,28 +1758,25 @@ export const DeviceTwinInfoX509Thumbprint: coreClient.CompositeMapper = { } }; -export const DeviceConnectionStateEvent: coreClient.CompositeMapper = { +export const DeviceConnectionStateEventProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DeviceConnectionStateEvent", + className: "DeviceConnectionStateEventProperties", modelProperties: { deviceId: { serializedName: "deviceId", - required: true, type: { name: "String" } }, moduleId: { serializedName: "moduleId", - required: true, type: { name: "String" } }, hubName: { serializedName: "hubName", - required: true, type: { name: "String" } @@ -2001,7 +1799,6 @@ export const DeviceConnectionStateEventInfo: coreClient.CompositeMapper = { modelProperties: { sequenceNumber: { serializedName: "sequenceNumber", - required: true, type: { name: "String" } @@ -2010,21 +1807,20 @@ export const DeviceConnectionStateEventInfo: coreClient.CompositeMapper = { } }; -export const DeviceTelemetryEvent: coreClient.CompositeMapper = { +export const DeviceTelemetryEventProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DeviceTelemetryEvent", + className: "DeviceTelemetryEventProperties", modelProperties: { body: { serializedName: "body", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, properties: { serializedName: "properties", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -2032,7 +1828,6 @@ export const DeviceTelemetryEvent: coreClient.CompositeMapper = { }, systemProperties: { serializedName: "systemProperties", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -2049,21 +1844,24 @@ export const ContainerRegistryEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "id", - required: true, type: { name: "String" } }, timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, action: { serializedName: "action", - required: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", type: { name: "String" } @@ -2095,6 +1893,13 @@ export const ContainerRegistryEventData: coreClient.CompositeMapper = { name: "Composite", className: "ContainerRegistryEventSource" } + }, + connectedRegistry: { + serializedName: "connectedRegistry", + type: { + name: "Composite", + className: "ContainerRegistryEventConnectedRegistry" + } } } } @@ -2107,49 +1912,42 @@ export const ContainerRegistryEventTarget: coreClient.CompositeMapper = { modelProperties: { mediaType: { serializedName: "mediaType", - required: true, type: { name: "String" } }, size: { serializedName: "size", - required: true, type: { name: "Number" } }, digest: { serializedName: "digest", - required: true, type: { name: "String" } }, length: { serializedName: "length", - required: true, type: { name: "Number" } }, repository: { serializedName: "repository", - required: true, type: { name: "String" } }, url: { serializedName: "url", - required: true, type: { name: "String" } }, tag: { serializedName: "tag", - required: true, type: { name: "String" } @@ -2165,35 +1963,30 @@ export const ContainerRegistryEventRequest: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "id", - required: true, type: { name: "String" } }, addr: { serializedName: "addr", - required: true, type: { name: "String" } }, host: { serializedName: "host", - required: true, type: { name: "String" } }, method: { serializedName: "method", - required: true, type: { name: "String" } }, useragent: { serializedName: "useragent", - required: true, type: { name: "String" } @@ -2209,7 +2002,6 @@ export const ContainerRegistryEventActor: coreClient.CompositeMapper = { modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } @@ -2225,14 +2017,27 @@ export const ContainerRegistryEventSource: coreClient.CompositeMapper = { modelProperties: { addr: { serializedName: "addr", - required: true, type: { name: "String" } }, instanceID: { serializedName: "instanceID", - required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryEventConnectedRegistry: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerRegistryEventConnectedRegistry", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } @@ -2248,21 +2053,24 @@ export const ContainerRegistryArtifactEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "id", - required: true, type: { name: "String" } }, timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, action: { serializedName: "action", - required: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", type: { name: "String" } @@ -2273,6 +2081,13 @@ export const ContainerRegistryArtifactEventData: coreClient.CompositeMapper = { name: "Composite", className: "ContainerRegistryArtifactEventTarget" } + }, + connectedRegistry: { + serializedName: "connectedRegistry", + type: { + name: "Composite", + className: "ContainerRegistryEventConnectedRegistry" + } } } } @@ -2285,49 +2100,42 @@ export const ContainerRegistryArtifactEventTarget: coreClient.CompositeMapper = modelProperties: { mediaType: { serializedName: "mediaType", - required: true, type: { name: "String" } }, size: { serializedName: "size", - required: true, type: { name: "Number" } }, digest: { serializedName: "digest", - required: true, type: { name: "String" } }, repository: { serializedName: "repository", - required: true, type: { name: "String" } }, tag: { serializedName: "tag", - required: true, type: { name: "String" } }, name: { serializedName: "name", - required: true, type: { name: "String" } }, version: { serializedName: "version", - required: true, type: { name: "String" } @@ -2343,42 +2151,36 @@ export const ServiceBusActiveMessagesAvailableWithNoListenersEventData: coreClie modelProperties: { namespaceName: { serializedName: "namespaceName", - required: true, type: { name: "String" } }, requestUri: { serializedName: "requestUri", - required: true, type: { name: "String" } }, entityType: { serializedName: "entityType", - required: true, type: { name: "String" } }, queueName: { serializedName: "queueName", - required: true, type: { name: "String" } }, topicName: { serializedName: "topicName", - required: true, type: { name: "String" } }, subscriptionName: { serializedName: "subscriptionName", - required: true, type: { name: "String" } @@ -2394,42 +2196,36 @@ export const ServiceBusDeadletterMessagesAvailableWithNoListenersEventData: core modelProperties: { namespaceName: { serializedName: "namespaceName", - required: true, type: { name: "String" } }, requestUri: { serializedName: "requestUri", - required: true, type: { name: "String" } }, entityType: { serializedName: "entityType", - required: true, type: { name: "String" } }, queueName: { serializedName: "queueName", - required: true, type: { name: "String" } }, topicName: { serializedName: "topicName", - required: true, type: { name: "String" } }, subscriptionName: { serializedName: "subscriptionName", - required: true, type: { name: "String" } @@ -2446,42 +2242,36 @@ export const ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData: co modelProperties: { namespaceName: { serializedName: "namespaceName", - required: true, type: { name: "String" } }, requestUri: { serializedName: "requestUri", - required: true, type: { name: "String" } }, entityType: { serializedName: "entityType", - required: true, type: { name: "String" } }, queueName: { serializedName: "queueName", - required: true, type: { name: "String" } }, topicName: { serializedName: "topicName", - required: true, type: { name: "String" } }, subscriptionName: { serializedName: "subscriptionName", - required: true, type: { name: "String" } @@ -2498,42 +2288,36 @@ export const ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData modelProperties: { namespaceName: { serializedName: "namespaceName", - required: true, type: { name: "String" } }, requestUri: { serializedName: "requestUri", - required: true, type: { name: "String" } }, entityType: { serializedName: "entityType", - required: true, type: { name: "String" } }, queueName: { serializedName: "queueName", - required: true, type: { name: "String" } }, topicName: { serializedName: "topicName", - required: true, type: { name: "String" } }, subscriptionName: { serializedName: "subscriptionName", - required: true, type: { name: "String" } @@ -2549,7 +2333,6 @@ export const MediaJobStateChangeEventData: coreClient.CompositeMapper = { modelProperties: { previousState: { serializedName: "previousState", - required: true, readOnly: true, type: { name: "Enum", @@ -2566,7 +2349,6 @@ export const MediaJobStateChangeEventData: coreClient.CompositeMapper = { }, state: { serializedName: "state", - required: true, readOnly: true, type: { name: "Enum", @@ -2583,7 +2365,6 @@ export const MediaJobStateChangeEventData: coreClient.CompositeMapper = { }, correlationData: { serializedName: "correlationData", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -2600,7 +2381,6 @@ export const MediaJobError: coreClient.CompositeMapper = { modelProperties: { code: { serializedName: "code", - required: true, readOnly: true, type: { name: "Enum", @@ -2619,7 +2399,6 @@ export const MediaJobError: coreClient.CompositeMapper = { }, message: { serializedName: "message", - required: true, readOnly: true, type: { name: "String" @@ -2627,7 +2406,6 @@ export const MediaJobError: coreClient.CompositeMapper = { }, category: { serializedName: "category", - required: true, readOnly: true, type: { name: "Enum", @@ -2642,7 +2420,6 @@ export const MediaJobError: coreClient.CompositeMapper = { }, retry: { serializedName: "retry", - required: true, readOnly: true, type: { name: "Enum", @@ -2651,7 +2428,6 @@ export const MediaJobError: coreClient.CompositeMapper = { }, details: { serializedName: "details", - required: true, readOnly: true, type: { name: "Sequence", @@ -2674,7 +2450,6 @@ export const MediaJobErrorDetail: coreClient.CompositeMapper = { modelProperties: { code: { serializedName: "code", - required: true, readOnly: true, type: { name: "String" @@ -2682,7 +2457,6 @@ export const MediaJobErrorDetail: coreClient.CompositeMapper = { }, message: { serializedName: "message", - required: true, readOnly: true, type: { name: "String" @@ -2699,12 +2473,11 @@ export const MediaJobOutput: coreClient.CompositeMapper = { uberParent: "MediaJobOutput", polymorphicDiscriminator: { serializedName: "@odata\\.type", - clientName: "@odata\\.type" + clientName: "odataType" }, modelProperties: { odataType: { serializedName: "@odata\\.type", - required: true, type: { name: "String" } @@ -2757,21 +2530,18 @@ export const MediaJobOutputProgressEventData: coreClient.CompositeMapper = { modelProperties: { label: { serializedName: "label", - required: true, type: { name: "String" } }, progress: { serializedName: "progress", - required: true, type: { name: "Number" } }, jobCorrelationData: { serializedName: "jobCorrelationData", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -2788,7 +2558,6 @@ export const MediaJobOutputStateChangeEventData: coreClient.CompositeMapper = { modelProperties: { previousState: { serializedName: "previousState", - required: true, readOnly: true, type: { name: "Enum", @@ -2812,7 +2581,6 @@ export const MediaJobOutputStateChangeEventData: coreClient.CompositeMapper = { }, jobCorrelationData: { serializedName: "jobCorrelationData", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -2829,7 +2597,6 @@ export const MediaLiveEventEncoderConnectedEventData: coreClient.CompositeMapper modelProperties: { ingestUrl: { serializedName: "ingestUrl", - required: true, readOnly: true, type: { name: "String" @@ -2837,7 +2604,6 @@ export const MediaLiveEventEncoderConnectedEventData: coreClient.CompositeMapper }, streamId: { serializedName: "streamId", - required: true, readOnly: true, type: { name: "String" @@ -2845,7 +2611,6 @@ export const MediaLiveEventEncoderConnectedEventData: coreClient.CompositeMapper }, encoderIp: { serializedName: "encoderIp", - required: true, readOnly: true, type: { name: "String" @@ -2853,7 +2618,6 @@ export const MediaLiveEventEncoderConnectedEventData: coreClient.CompositeMapper }, encoderPort: { serializedName: "encoderPort", - required: true, readOnly: true, type: { name: "String" @@ -2870,7 +2634,6 @@ export const MediaLiveEventConnectionRejectedEventData: coreClient.CompositeMapp modelProperties: { ingestUrl: { serializedName: "ingestUrl", - required: true, readOnly: true, type: { name: "String" @@ -2878,7 +2641,6 @@ export const MediaLiveEventConnectionRejectedEventData: coreClient.CompositeMapp }, streamId: { serializedName: "streamId", - required: true, readOnly: true, type: { name: "String" @@ -2886,7 +2648,6 @@ export const MediaLiveEventConnectionRejectedEventData: coreClient.CompositeMapp }, encoderIp: { serializedName: "encoderIp", - required: true, readOnly: true, type: { name: "String" @@ -2894,7 +2655,6 @@ export const MediaLiveEventConnectionRejectedEventData: coreClient.CompositeMapp }, encoderPort: { serializedName: "encoderPort", - required: true, readOnly: true, type: { name: "String" @@ -2902,7 +2662,6 @@ export const MediaLiveEventConnectionRejectedEventData: coreClient.CompositeMapp }, resultCode: { serializedName: "resultCode", - required: true, readOnly: true, type: { name: "String" @@ -2919,7 +2678,6 @@ export const MediaLiveEventEncoderDisconnectedEventData: coreClient.CompositeMap modelProperties: { ingestUrl: { serializedName: "ingestUrl", - required: true, readOnly: true, type: { name: "String" @@ -2927,7 +2685,6 @@ export const MediaLiveEventEncoderDisconnectedEventData: coreClient.CompositeMap }, streamId: { serializedName: "streamId", - required: true, readOnly: true, type: { name: "String" @@ -2935,7 +2692,6 @@ export const MediaLiveEventEncoderDisconnectedEventData: coreClient.CompositeMap }, encoderIp: { serializedName: "encoderIp", - required: true, readOnly: true, type: { name: "String" @@ -2943,7 +2699,6 @@ export const MediaLiveEventEncoderDisconnectedEventData: coreClient.CompositeMap }, encoderPort: { serializedName: "encoderPort", - required: true, readOnly: true, type: { name: "String" @@ -2951,7 +2706,6 @@ export const MediaLiveEventEncoderDisconnectedEventData: coreClient.CompositeMap }, resultCode: { serializedName: "resultCode", - required: true, readOnly: true, type: { name: "String" @@ -2968,7 +2722,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite modelProperties: { ingestUrl: { serializedName: "ingestUrl", - required: true, readOnly: true, type: { name: "String" @@ -2976,7 +2729,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, trackType: { serializedName: "trackType", - required: true, readOnly: true, type: { name: "String" @@ -2984,7 +2736,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, trackName: { serializedName: "trackName", - required: true, readOnly: true, type: { name: "String" @@ -2992,7 +2743,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, bitrate: { serializedName: "bitrate", - required: true, readOnly: true, type: { name: "Number" @@ -3000,7 +2750,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, encoderIp: { serializedName: "encoderIp", - required: true, readOnly: true, type: { name: "String" @@ -3008,7 +2757,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, encoderPort: { serializedName: "encoderPort", - required: true, readOnly: true, type: { name: "String" @@ -3016,7 +2764,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, timestamp: { serializedName: "timestamp", - required: true, readOnly: true, type: { name: "String" @@ -3024,7 +2771,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, duration: { serializedName: "duration", - required: true, readOnly: true, type: { name: "String" @@ -3032,7 +2778,6 @@ export const MediaLiveEventIncomingStreamReceivedEventData: coreClient.Composite }, timescale: { serializedName: "timescale", - required: true, readOnly: true, type: { name: "String" @@ -3049,7 +2794,6 @@ export const MediaLiveEventIncomingStreamsOutOfSyncEventData: coreClient.Composi modelProperties: { minLastTimestamp: { serializedName: "minLastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3057,7 +2801,6 @@ export const MediaLiveEventIncomingStreamsOutOfSyncEventData: coreClient.Composi }, typeOfStreamWithMinLastTimestamp: { serializedName: "typeOfStreamWithMinLastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3065,7 +2808,6 @@ export const MediaLiveEventIncomingStreamsOutOfSyncEventData: coreClient.Composi }, maxLastTimestamp: { serializedName: "maxLastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3073,7 +2815,6 @@ export const MediaLiveEventIncomingStreamsOutOfSyncEventData: coreClient.Composi }, typeOfStreamWithMaxLastTimestamp: { serializedName: "typeOfStreamWithMaxLastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3081,7 +2822,6 @@ export const MediaLiveEventIncomingStreamsOutOfSyncEventData: coreClient.Composi }, timescaleOfMinLastTimestamp: { serializedName: "timescaleOfMinLastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3089,7 +2829,6 @@ export const MediaLiveEventIncomingStreamsOutOfSyncEventData: coreClient.Composi }, timescaleOfMaxLastTimestamp: { serializedName: "timescaleOfMaxLastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3106,7 +2845,6 @@ export const MediaLiveEventIncomingVideoStreamsOutOfSyncEventData: coreClient.Co modelProperties: { firstTimestamp: { serializedName: "firstTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3114,7 +2852,6 @@ export const MediaLiveEventIncomingVideoStreamsOutOfSyncEventData: coreClient.Co }, firstDuration: { serializedName: "firstDuration", - required: true, readOnly: true, type: { name: "String" @@ -3122,7 +2859,6 @@ export const MediaLiveEventIncomingVideoStreamsOutOfSyncEventData: coreClient.Co }, secondTimestamp: { serializedName: "secondTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3130,7 +2866,6 @@ export const MediaLiveEventIncomingVideoStreamsOutOfSyncEventData: coreClient.Co }, secondDuration: { serializedName: "secondDuration", - required: true, readOnly: true, type: { name: "String" @@ -3138,7 +2873,6 @@ export const MediaLiveEventIncomingVideoStreamsOutOfSyncEventData: coreClient.Co }, timescale: { serializedName: "timescale", - required: true, readOnly: true, type: { name: "String" @@ -3155,7 +2889,6 @@ export const MediaLiveEventIncomingDataChunkDroppedEventData: coreClient.Composi modelProperties: { timestamp: { serializedName: "timestamp", - required: true, readOnly: true, type: { name: "String" @@ -3163,7 +2896,6 @@ export const MediaLiveEventIncomingDataChunkDroppedEventData: coreClient.Composi }, trackType: { serializedName: "trackType", - required: true, readOnly: true, type: { name: "String" @@ -3171,7 +2903,6 @@ export const MediaLiveEventIncomingDataChunkDroppedEventData: coreClient.Composi }, bitrate: { serializedName: "bitrate", - required: true, readOnly: true, type: { name: "Number" @@ -3179,7 +2910,6 @@ export const MediaLiveEventIncomingDataChunkDroppedEventData: coreClient.Composi }, timescale: { serializedName: "timescale", - required: true, readOnly: true, type: { name: "String" @@ -3187,7 +2917,6 @@ export const MediaLiveEventIncomingDataChunkDroppedEventData: coreClient.Composi }, resultCode: { serializedName: "resultCode", - required: true, readOnly: true, type: { name: "String" @@ -3195,7 +2924,6 @@ export const MediaLiveEventIncomingDataChunkDroppedEventData: coreClient.Composi }, trackName: { serializedName: "trackName", - required: true, readOnly: true, type: { name: "String" @@ -3212,7 +2940,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper modelProperties: { trackType: { serializedName: "trackType", - required: true, readOnly: true, type: { name: "String" @@ -3220,7 +2947,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, trackName: { serializedName: "trackName", - required: true, readOnly: true, type: { name: "String" @@ -3228,7 +2954,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, transcriptionLanguage: { serializedName: "transcriptionLanguage", - required: true, readOnly: true, type: { name: "String" @@ -3236,7 +2961,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, transcriptionState: { serializedName: "transcriptionState", - required: true, readOnly: true, type: { name: "String" @@ -3244,7 +2968,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, bitrate: { serializedName: "bitrate", - required: true, readOnly: true, type: { name: "Number" @@ -3252,7 +2975,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, incomingBitrate: { serializedName: "incomingBitrate", - required: true, readOnly: true, type: { name: "Number" @@ -3260,7 +2982,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, ingestDriftValue: { serializedName: "ingestDriftValue", - required: true, readOnly: true, type: { name: "String" @@ -3268,7 +2989,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, lastFragmentArrivalTime: { serializedName: "lastFragmentArrivalTime", - required: true, readOnly: true, type: { name: "String" @@ -3276,7 +2996,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, lastTimestamp: { serializedName: "lastTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3284,7 +3003,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, timescale: { serializedName: "timescale", - required: true, readOnly: true, type: { name: "String" @@ -3292,7 +3010,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, overlapCount: { serializedName: "overlapCount", - required: true, readOnly: true, type: { name: "Number" @@ -3300,7 +3017,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, discontinuityCount: { serializedName: "discontinuityCount", - required: true, readOnly: true, type: { name: "Number" @@ -3308,7 +3024,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, nonincreasingCount: { serializedName: "nonincreasingCount", - required: true, readOnly: true, type: { name: "Number" @@ -3316,7 +3031,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, unexpectedBitrate: { serializedName: "unexpectedBitrate", - required: true, readOnly: true, type: { name: "Boolean" @@ -3324,7 +3038,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, state: { serializedName: "state", - required: true, readOnly: true, type: { name: "String" @@ -3332,7 +3045,6 @@ export const MediaLiveEventIngestHeartbeatEventData: coreClient.CompositeMapper }, healthy: { serializedName: "healthy", - required: true, readOnly: true, type: { name: "Boolean" @@ -3349,7 +3061,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo modelProperties: { trackType: { serializedName: "trackType", - required: true, readOnly: true, type: { name: "String" @@ -3357,7 +3068,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo }, trackName: { serializedName: "trackName", - required: true, readOnly: true, type: { name: "String" @@ -3365,7 +3075,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo }, bitrate: { serializedName: "bitrate", - required: true, readOnly: true, type: { name: "Number" @@ -3373,7 +3082,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo }, previousTimestamp: { serializedName: "previousTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3381,7 +3089,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo }, newTimestamp: { serializedName: "newTimestamp", - required: true, readOnly: true, type: { name: "String" @@ -3389,7 +3096,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo }, timescale: { serializedName: "timescale", - required: true, readOnly: true, type: { name: "String" @@ -3397,7 +3103,6 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: coreClient.Compo }, discontinuityGap: { serializedName: "discontinuityGap", - required: true, readOnly: true, type: { name: "String" @@ -3432,14 +3137,13 @@ export const MediaLiveEventChannelArchiveHeartbeatEventData: coreClient.Composit } }; -export const MapsGeofenceEvent: coreClient.CompositeMapper = { +export const MapsGeofenceEventProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MapsGeofenceEvent", + className: "MapsGeofenceEventProperties", modelProperties: { expiredGeofenceGeometryId: { serializedName: "expiredGeofenceGeometryId", - required: true, type: { name: "Sequence", element: { @@ -3451,7 +3155,6 @@ export const MapsGeofenceEvent: coreClient.CompositeMapper = { }, geometries: { serializedName: "geometries", - required: true, type: { name: "Sequence", element: { @@ -3464,7 +3167,6 @@ export const MapsGeofenceEvent: coreClient.CompositeMapper = { }, invalidPeriodGeofenceGeometryId: { serializedName: "invalidPeriodGeofenceGeometryId", - required: true, type: { name: "Sequence", element: { @@ -3476,7 +3178,6 @@ export const MapsGeofenceEvent: coreClient.CompositeMapper = { }, isEventPublished: { serializedName: "isEventPublished", - required: true, type: { name: "Boolean" } @@ -3492,42 +3193,36 @@ export const MapsGeofenceGeometry: coreClient.CompositeMapper = { modelProperties: { deviceId: { serializedName: "deviceId", - required: true, type: { name: "String" } }, distance: { serializedName: "distance", - required: true, type: { name: "Number" } }, geometryId: { serializedName: "geometryId", - required: true, type: { name: "String" } }, nearestLat: { serializedName: "nearestLat", - required: true, type: { name: "Number" } }, nearestLon: { serializedName: "nearestLon", - required: true, type: { name: "Number" } }, udId: { serializedName: "udId", - required: true, type: { name: "String" } @@ -3543,28 +3238,24 @@ export const AppConfigurationKeyValueModifiedEventData: coreClient.CompositeMapp modelProperties: { key: { serializedName: "key", - required: true, type: { name: "String" } }, label: { serializedName: "label", - required: true, type: { name: "String" } }, etag: { serializedName: "etag", - required: true, type: { name: "String" } }, syncToken: { serializedName: "syncToken", - required: true, type: { name: "String" } @@ -3580,28 +3271,24 @@ export const AppConfigurationKeyValueDeletedEventData: coreClient.CompositeMappe modelProperties: { key: { serializedName: "key", - required: true, type: { name: "String" } }, label: { serializedName: "label", - required: true, type: { name: "String" } }, etag: { serializedName: "etag", - required: true, type: { name: "String" } }, syncToken: { serializedName: "syncToken", - required: true, type: { name: "String" } @@ -3617,28 +3304,24 @@ export const SignalRServiceClientConnectionConnectedEventData: coreClient.Compos modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, hubName: { serializedName: "hubName", - required: true, type: { name: "String" } }, connectionId: { serializedName: "connectionId", - required: true, type: { name: "String" } }, userId: { serializedName: "userId", - required: true, type: { name: "String" } @@ -3654,35 +3337,30 @@ export const SignalRServiceClientConnectionDisconnectedEventData: coreClient.Com modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, hubName: { serializedName: "hubName", - required: true, type: { name: "String" } }, connectionId: { serializedName: "connectionId", - required: true, type: { name: "String" } }, userId: { serializedName: "userId", - required: true, type: { name: "String" } }, errorMessage: { serializedName: "errorMessage", - required: true, type: { name: "String" } @@ -3698,49 +3376,42 @@ export const KeyVaultCertificateNewVersionCreatedEventData: coreClient.Composite modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -3756,49 +3427,42 @@ export const KeyVaultCertificateNearExpiryEventData: coreClient.CompositeMapper modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -3814,49 +3478,42 @@ export const KeyVaultCertificateExpiredEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -3872,49 +3529,42 @@ export const KeyVaultKeyNewVersionCreatedEventData: coreClient.CompositeMapper = modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -3930,49 +3580,42 @@ export const KeyVaultKeyNearExpiryEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -3988,49 +3631,42 @@ export const KeyVaultKeyExpiredEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -4046,49 +3682,42 @@ export const KeyVaultSecretNewVersionCreatedEventData: coreClient.CompositeMappe modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -4104,49 +3733,42 @@ export const KeyVaultSecretNearExpiryEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -4162,49 +3784,42 @@ export const KeyVaultSecretExpiredEventData: coreClient.CompositeMapper = { modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -4220,49 +3835,42 @@ export const KeyVaultAccessPolicyChangedEventData: coreClient.CompositeMapper = modelProperties: { id: { serializedName: "Id", - required: true, type: { name: "String" } }, vaultName: { serializedName: "VaultName", - required: true, type: { name: "String" } }, objectType: { serializedName: "ObjectType", - required: true, type: { name: "String" } }, objectName: { serializedName: "ObjectName", - required: true, type: { name: "String" } }, version: { serializedName: "Version", - required: true, type: { name: "String" } }, nbf: { serializedName: "NBF", - required: true, type: { name: "Number" } }, exp: { serializedName: "EXP", - required: true, type: { name: "Number" } @@ -4278,30 +3886,28 @@ export const MachineLearningServicesModelRegisteredEventData: coreClient.Composi modelProperties: { modelName: { serializedName: "modelName", - required: true, type: { name: "String" } }, modelVersion: { serializedName: "modelVersion", - required: true, type: { name: "String" } }, modelTags: { serializedName: "modelTags", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, modelProperties: { serializedName: "modelProperties", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -4315,37 +3921,34 @@ export const MachineLearningServicesModelDeployedEventData: coreClient.Composite modelProperties: { serviceName: { serializedName: "serviceName", - required: true, type: { name: "String" } }, serviceComputeType: { serializedName: "serviceComputeType", - required: true, type: { name: "String" } }, modelIds: { serializedName: "modelIds", - required: true, type: { name: "String" } }, serviceTags: { serializedName: "serviceTags", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, serviceProperties: { serializedName: "serviceProperties", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -4359,44 +3962,40 @@ export const MachineLearningServicesRunCompletedEventData: coreClient.CompositeM modelProperties: { experimentId: { serializedName: "experimentId", - required: true, type: { name: "String" } }, experimentName: { serializedName: "experimentName", - required: true, type: { name: "String" } }, runId: { serializedName: "runId", - required: true, type: { name: "String" } }, runType: { serializedName: "runType", - required: true, type: { name: "String" } }, runTags: { serializedName: "runTags", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, runProperties: { serializedName: "runProperties", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -4410,58 +4009,50 @@ export const MachineLearningServicesDatasetDriftDetectedEventData: coreClient.Co modelProperties: { dataDriftId: { serializedName: "dataDriftId", - required: true, type: { name: "String" } }, dataDriftName: { serializedName: "dataDriftName", - required: true, type: { name: "String" } }, runId: { serializedName: "runId", - required: true, type: { name: "String" } }, baseDatasetId: { serializedName: "baseDatasetId", - required: true, type: { name: "String" } }, targetDatasetId: { serializedName: "targetDatasetId", - required: true, type: { name: "String" } }, driftCoefficient: { serializedName: "driftCoefficient", - required: true, type: { name: "Number" } }, startTime: { serializedName: "startTime", - required: true, type: { - name: "String" + name: "DateTime" } }, endTime: { serializedName: "endTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -4475,49 +4066,44 @@ export const MachineLearningServicesRunStatusChangedEventData: coreClient.Compos modelProperties: { experimentId: { serializedName: "experimentId", - required: true, type: { name: "String" } }, experimentName: { serializedName: "experimentName", - required: true, type: { name: "String" } }, runId: { serializedName: "runId", - required: true, type: { name: "String" } }, runType: { serializedName: "runType", - required: true, type: { name: "String" } }, runTags: { serializedName: "runTags", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, runProperties: { serializedName: "runProperties", - required: true, type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } }, runStatus: { serializedName: "runStatus", - required: true, type: { name: "String" } @@ -4533,21 +4119,18 @@ export const RedisPatchingCompletedEventData: coreClient.CompositeMapper = { modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, name: { serializedName: "name", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } @@ -4563,21 +4146,18 @@ export const RedisScalingCompletedEventData: coreClient.CompositeMapper = { modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, name: { serializedName: "name", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } @@ -4593,21 +4173,18 @@ export const RedisExportRDBCompletedEventData: coreClient.CompositeMapper = { modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, name: { serializedName: "name", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } @@ -4623,21 +4200,18 @@ export const RedisImportRDBCompletedEventData: coreClient.CompositeMapper = { modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, name: { serializedName: "name", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } @@ -4660,42 +4234,36 @@ export const WebAppUpdatedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -4711,7 +4279,6 @@ export const AppEventTypeDetail: coreClient.CompositeMapper = { modelProperties: { action: { serializedName: "action", - required: true, type: { name: "String" } @@ -4734,42 +4301,36 @@ export const WebBackupOperationStartedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -4792,42 +4353,36 @@ export const WebBackupOperationCompletedEventData: coreClient.CompositeMapper = }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -4850,42 +4405,36 @@ export const WebBackupOperationFailedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -4908,42 +4457,36 @@ export const WebRestoreOperationStartedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -4966,42 +4509,36 @@ export const WebRestoreOperationCompletedEventData: coreClient.CompositeMapper = }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5024,42 +4561,36 @@ export const WebRestoreOperationFailedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5082,42 +4613,36 @@ export const WebSlotSwapStartedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5140,42 +4665,36 @@ export const WebSlotSwapCompletedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5198,42 +4717,36 @@ export const WebSlotSwapFailedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5256,42 +4769,36 @@ export const WebSlotSwapWithPreviewStartedEventData: coreClient.CompositeMapper }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5314,42 +4821,36 @@ export const WebSlotSwapWithPreviewCancelledEventData: coreClient.CompositeMappe }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5379,42 +4880,36 @@ export const WebAppServicePlanUpdatedEventData: coreClient.CompositeMapper = { }, name: { serializedName: "name", - required: true, type: { name: "String" } }, clientRequestId: { serializedName: "clientRequestId", - required: true, type: { name: "String" } }, correlationRequestId: { serializedName: "correlationRequestId", - required: true, type: { name: "String" } }, requestId: { serializedName: "requestId", - required: true, type: { name: "String" } }, address: { serializedName: "address", - required: true, type: { name: "String" } }, verb: { serializedName: "verb", - required: true, type: { name: "String" } @@ -5430,21 +4925,18 @@ export const AppServicePlanEventTypeDetail: coreClient.CompositeMapper = { modelProperties: { stampKind: { serializedName: "stampKind", - required: true, type: { name: "String" } }, action: { serializedName: "action", - required: true, type: { name: "String" } }, status: { serializedName: "status", - required: true, type: { name: "String" } @@ -5515,7 +5007,6 @@ export const CommunicationIdentifierModel: coreClient.CompositeMapper = { modelProperties: { rawId: { serializedName: "rawId", - required: true, type: { name: "String" } @@ -5605,10 +5096,10 @@ export const MicrosoftTeamsUserIdentifierModel: coreClient.CompositeMapper = { } }; -export const AcsChatEventBase: coreClient.CompositeMapper = { +export const AcsChatEventBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatEventBase", + className: "AcsChatEventBaseProperties", modelProperties: { recipientCommunicationIdentifier: { serializedName: "recipientCommunicationIdentifier", @@ -5619,14 +5110,12 @@ export const AcsChatEventBase: coreClient.CompositeMapper = { }, transactionId: { serializedName: "transactionId", - required: true, type: { name: "String" } }, threadId: { serializedName: "threadId", - required: true, type: { name: "String" } @@ -5635,21 +5124,19 @@ export const AcsChatEventBase: coreClient.CompositeMapper = { } }; -export const AcsChatEventInThreadBase: coreClient.CompositeMapper = { +export const AcsChatEventInThreadBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatEventInThreadBase", + className: "AcsChatEventInThreadBaseProperties", modelProperties: { transactionId: { serializedName: "transactionId", - required: true, type: { name: "String" } }, threadId: { serializedName: "threadId", - required: true, type: { name: "String" } @@ -5658,14 +5145,13 @@ export const AcsChatEventInThreadBase: coreClient.CompositeMapper = { } }; -export const AcsChatThreadParticipant: coreClient.CompositeMapper = { +export const AcsChatThreadParticipantProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatThreadParticipant", + className: "AcsChatThreadParticipantProperties", modelProperties: { displayName: { serializedName: "displayName", - required: true, type: { name: "String" } @@ -5681,28 +5167,25 @@ export const AcsChatThreadParticipant: coreClient.CompositeMapper = { } }; -export const AcsSmsDeliveryAttempt: coreClient.CompositeMapper = { +export const AcsSmsDeliveryAttemptProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsSmsDeliveryAttempt", + className: "AcsSmsDeliveryAttemptProperties", modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, segmentsSucceeded: { serializedName: "segmentsSucceeded", - required: true, type: { name: "Number" } }, segmentsFailed: { serializedName: "segmentsFailed", - required: true, type: { name: "Number" } @@ -5711,28 +5194,25 @@ export const AcsSmsDeliveryAttempt: coreClient.CompositeMapper = { } }; -export const AcsSmsEventBase: coreClient.CompositeMapper = { +export const AcsSmsEventBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsSmsEventBase", + className: "AcsSmsEventBaseProperties", modelProperties: { messageId: { serializedName: "messageId", - required: true, type: { name: "String" } }, from: { serializedName: "from", - required: true, type: { name: "String" } }, to: { serializedName: "to", - required: true, type: { name: "String" } @@ -5750,26 +5230,41 @@ export const AcsRecordingFileStatusUpdatedEventData: coreClient.CompositeMapper serializedName: "recordingStorageInfo", type: { name: "Composite", - className: "AcsRecordingStorageInfo" + className: "AcsRecordingStorageInfoProperties" } }, recordingStartTime: { serializedName: "recordingStartTime", - required: true, type: { - name: "String" + name: "DateTime" } }, recordingDurationMs: { serializedName: "recordingDurationMs", - required: true, type: { name: "Number" } }, + recordingContentType: { + serializedName: "recordingContentType", + type: { + name: "String" + } + }, + recordingChannelType: { + serializedName: "recordingChannelType", + type: { + name: "String" + } + }, + recordingFormatType: { + serializedName: "recordingFormatType", + type: { + name: "String" + } + }, sessionEndReason: { serializedName: "sessionEndReason", - required: true, type: { name: "String" } @@ -5778,20 +5273,19 @@ export const AcsRecordingFileStatusUpdatedEventData: coreClient.CompositeMapper } }; -export const AcsRecordingStorageInfo: coreClient.CompositeMapper = { +export const AcsRecordingStorageInfoProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsRecordingStorageInfo", + className: "AcsRecordingStorageInfoProperties", modelProperties: { recordingChunks: { serializedName: "recordingChunks", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "AcsRecordingChunkInfo" + className: "AcsRecordingChunkInfoProperties" } } } @@ -5800,42 +5294,43 @@ export const AcsRecordingStorageInfo: coreClient.CompositeMapper = { } }; -export const AcsRecordingChunkInfo: coreClient.CompositeMapper = { +export const AcsRecordingChunkInfoProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsRecordingChunkInfo", + className: "AcsRecordingChunkInfoProperties", modelProperties: { documentId: { serializedName: "documentId", - required: true, type: { name: "String" } }, index: { serializedName: "index", - required: true, type: { name: "Number" } }, endReason: { serializedName: "endReason", - required: true, type: { name: "String" } }, metadataLocation: { serializedName: "metadataLocation", - required: true, type: { name: "String" } }, contentLocation: { serializedName: "contentLocation", - required: true, + type: { + name: "String" + } + }, + deleteLocation: { + serializedName: "deleteLocation", type: { name: "String" } @@ -5851,49 +5346,42 @@ export const PolicyInsightsPolicyStateCreatedEventData: coreClient.CompositeMapp modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, policyAssignmentId: { serializedName: "policyAssignmentId", - required: true, type: { name: "String" } }, policyDefinitionId: { serializedName: "policyDefinitionId", - required: true, type: { name: "String" } }, policyDefinitionReferenceId: { serializedName: "policyDefinitionReferenceId", - required: true, type: { name: "String" } }, complianceState: { serializedName: "complianceState", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, complianceReasonCode: { serializedName: "complianceReasonCode", - required: true, type: { name: "String" } @@ -5909,49 +5397,42 @@ export const PolicyInsightsPolicyStateChangedEventData: coreClient.CompositeMapp modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, policyAssignmentId: { serializedName: "policyAssignmentId", - required: true, type: { name: "String" } }, policyDefinitionId: { serializedName: "policyDefinitionId", - required: true, type: { name: "String" } }, policyDefinitionReferenceId: { serializedName: "policyDefinitionReferenceId", - required: true, type: { name: "String" } }, complianceState: { serializedName: "complianceState", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, complianceReasonCode: { serializedName: "complianceReasonCode", - required: true, type: { name: "String" } @@ -5967,49 +5448,42 @@ export const PolicyInsightsPolicyStateDeletedEventData: coreClient.CompositeMapp modelProperties: { timestamp: { serializedName: "timestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, policyAssignmentId: { serializedName: "policyAssignmentId", - required: true, type: { name: "String" } }, policyDefinitionId: { serializedName: "policyDefinitionId", - required: true, type: { name: "String" } }, policyDefinitionReferenceId: { serializedName: "policyDefinitionReferenceId", - required: true, type: { name: "String" } }, complianceState: { serializedName: "complianceState", - required: true, type: { name: "String" } }, subscriptionId: { serializedName: "subscriptionId", - required: true, type: { name: "String" } }, complianceReasonCode: { serializedName: "complianceReasonCode", - required: true, type: { name: "String" } @@ -6025,28 +5499,24 @@ export const ContainerServiceNewKubernetesVersionAvailableEventData: coreClient. modelProperties: { latestSupportedKubernetesVersion: { serializedName: "latestSupportedKubernetesVersion", - required: true, type: { name: "String" } }, latestStableKubernetesVersion: { serializedName: "latestStableKubernetesVersion", - required: true, type: { name: "String" } }, lowestMinorKubernetesVersion: { serializedName: "lowestMinorKubernetesVersion", - required: true, type: { name: "String" } }, latestPreviewKubernetesVersion: { serializedName: "latestPreviewKubernetesVersion", - required: true, type: { name: "String" } @@ -6062,7 +5532,6 @@ export const ApiManagementUserCreatedEventData: coreClient.CompositeMapper = { modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6078,7 +5547,6 @@ export const ApiManagementUserUpdatedEventData: coreClient.CompositeMapper = { modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6094,7 +5562,6 @@ export const ApiManagementUserDeletedEventData: coreClient.CompositeMapper = { modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6110,7 +5577,6 @@ export const ApiManagementSubscriptionCreatedEventData: coreClient.CompositeMapp modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6126,7 +5592,6 @@ export const ApiManagementSubscriptionUpdatedEventData: coreClient.CompositeMapp modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6142,7 +5607,6 @@ export const ApiManagementSubscriptionDeletedEventData: coreClient.CompositeMapp modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6158,7 +5622,6 @@ export const ApiManagementProductCreatedEventData: coreClient.CompositeMapper = modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6174,7 +5637,6 @@ export const ApiManagementProductUpdatedEventData: coreClient.CompositeMapper = modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6190,7 +5652,6 @@ export const ApiManagementProductDeletedEventData: coreClient.CompositeMapper = modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6206,7 +5667,6 @@ export const ApiManagementApiCreatedEventData: coreClient.CompositeMapper = { modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6222,7 +5682,6 @@ export const ApiManagementApiUpdatedEventData: coreClient.CompositeMapper = { modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6238,7 +5697,6 @@ export const ApiManagementApiDeletedEventData: coreClient.CompositeMapper = { modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6254,7 +5712,6 @@ export const ApiManagementApiReleaseCreatedEventData: coreClient.CompositeMapper modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6270,7 +5727,6 @@ export const ApiManagementApiReleaseUpdatedEventData: coreClient.CompositeMapper modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6286,7 +5742,6 @@ export const ApiManagementApiReleaseDeletedEventData: coreClient.CompositeMapper modelProperties: { resourceUri: { serializedName: "resourceUri", - required: true, type: { name: "String" } @@ -6300,7 +5755,7 @@ export const IotHubDeviceCreatedEventData: coreClient.CompositeMapper = { name: "Composite", className: "IotHubDeviceCreatedEventData", modelProperties: { - ...DeviceLifeCycleEvent.type.modelProperties + ...DeviceLifeCycleEventProperties.type.modelProperties } } }; @@ -6310,7 +5765,7 @@ export const IotHubDeviceDeletedEventData: coreClient.CompositeMapper = { name: "Composite", className: "IotHubDeviceDeletedEventData", modelProperties: { - ...DeviceLifeCycleEvent.type.modelProperties + ...DeviceLifeCycleEventProperties.type.modelProperties } } }; @@ -6320,7 +5775,7 @@ export const IotHubDeviceConnectedEventData: coreClient.CompositeMapper = { name: "Composite", className: "IotHubDeviceConnectedEventData", modelProperties: { - ...DeviceConnectionStateEvent.type.modelProperties + ...DeviceConnectionStateEventProperties.type.modelProperties } } }; @@ -6330,7 +5785,7 @@ export const IotHubDeviceDisconnectedEventData: coreClient.CompositeMapper = { name: "Composite", className: "IotHubDeviceDisconnectedEventData", modelProperties: { - ...DeviceConnectionStateEvent.type.modelProperties + ...DeviceConnectionStateEventProperties.type.modelProperties } } }; @@ -6340,7 +5795,7 @@ export const IotHubDeviceTelemetryEventData: coreClient.CompositeMapper = { name: "Composite", className: "IotHubDeviceTelemetryEventData", modelProperties: { - ...DeviceTelemetryEvent.type.modelProperties + ...DeviceTelemetryEventProperties.type.modelProperties } } }; @@ -6427,7 +5882,6 @@ export const MediaJobFinishedEventData: coreClient.CompositeMapper = { ...MediaJobStateChangeEventData.type.modelProperties, outputs: { serializedName: "outputs", - required: true, type: { name: "Sequence", element: { @@ -6451,7 +5905,6 @@ export const MediaJobCanceledEventData: coreClient.CompositeMapper = { ...MediaJobStateChangeEventData.type.modelProperties, outputs: { serializedName: "outputs", - required: true, type: { name: "Sequence", element: { @@ -6475,7 +5928,6 @@ export const MediaJobErroredEventData: coreClient.CompositeMapper = { ...MediaJobStateChangeEventData.type.modelProperties, outputs: { serializedName: "outputs", - required: true, type: { name: "Sequence", element: { @@ -6501,7 +5953,6 @@ export const MediaJobOutputAsset: coreClient.CompositeMapper = { ...MediaJobOutput.type.modelProperties, assetName: { serializedName: "assetName", - required: true, type: { name: "String" } @@ -6581,7 +6032,7 @@ export const MapsGeofenceEnteredEventData: coreClient.CompositeMapper = { name: "Composite", className: "MapsGeofenceEnteredEventData", modelProperties: { - ...MapsGeofenceEvent.type.modelProperties + ...MapsGeofenceEventProperties.type.modelProperties } } }; @@ -6591,7 +6042,7 @@ export const MapsGeofenceExitedEventData: coreClient.CompositeMapper = { name: "Composite", className: "MapsGeofenceExitedEventData", modelProperties: { - ...MapsGeofenceEvent.type.modelProperties + ...MapsGeofenceEventProperties.type.modelProperties } } }; @@ -6601,20 +6052,19 @@ export const MapsGeofenceResultEventData: coreClient.CompositeMapper = { name: "Composite", className: "MapsGeofenceResultEventData", modelProperties: { - ...MapsGeofenceEvent.type.modelProperties + ...MapsGeofenceEventProperties.type.modelProperties } } }; -export const AcsChatMessageEventBase: coreClient.CompositeMapper = { +export const AcsChatMessageEventBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatMessageEventBase", + className: "AcsChatMessageEventBaseProperties", modelProperties: { - ...AcsChatEventBase.type.modelProperties, + ...AcsChatEventBaseProperties.type.modelProperties, messageId: { serializedName: "messageId", - required: true, type: { name: "String" } @@ -6628,28 +6078,24 @@ export const AcsChatMessageEventBase: coreClient.CompositeMapper = { }, senderDisplayName: { serializedName: "senderDisplayName", - required: true, type: { name: "String" } }, composeTime: { serializedName: "composeTime", - required: true, type: { - name: "String" + name: "DateTime" } }, type: { serializedName: "type", - required: true, type: { name: "String" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -6658,22 +6104,20 @@ export const AcsChatMessageEventBase: coreClient.CompositeMapper = { } }; -export const AcsChatThreadEventBase: coreClient.CompositeMapper = { +export const AcsChatThreadEventBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatThreadEventBase", + className: "AcsChatThreadEventBaseProperties", modelProperties: { - ...AcsChatEventBase.type.modelProperties, + ...AcsChatEventBaseProperties.type.modelProperties, createTime: { serializedName: "createTime", - required: true, type: { - name: "String" + name: "DateTime" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -6682,15 +6126,14 @@ export const AcsChatThreadEventBase: coreClient.CompositeMapper = { } }; -export const AcsChatMessageEventInThreadBase: coreClient.CompositeMapper = { +export const AcsChatMessageEventInThreadBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatMessageEventInThreadBase", + className: "AcsChatMessageEventInThreadBaseProperties", modelProperties: { - ...AcsChatEventInThreadBase.type.modelProperties, + ...AcsChatEventInThreadBaseProperties.type.modelProperties, messageId: { serializedName: "messageId", - required: true, type: { name: "String" } @@ -6704,28 +6147,24 @@ export const AcsChatMessageEventInThreadBase: coreClient.CompositeMapper = { }, senderDisplayName: { serializedName: "senderDisplayName", - required: true, type: { name: "String" } }, composeTime: { serializedName: "composeTime", - required: true, type: { - name: "String" + name: "DateTime" } }, type: { serializedName: "type", - required: true, type: { name: "String" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -6734,22 +6173,20 @@ export const AcsChatMessageEventInThreadBase: coreClient.CompositeMapper = { } }; -export const AcsChatThreadEventInThreadBase: coreClient.CompositeMapper = { +export const AcsChatThreadEventInThreadBaseProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AcsChatThreadEventInThreadBase", + className: "AcsChatThreadEventInThreadBaseProperties", modelProperties: { - ...AcsChatEventInThreadBase.type.modelProperties, + ...AcsChatEventInThreadBaseProperties.type.modelProperties, createTime: { serializedName: "createTime", - required: true, type: { - name: "String" + name: "DateTime" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -6763,12 +6200,11 @@ export const AcsChatParticipantAddedToThreadEventData: coreClient.CompositeMappe name: "Composite", className: "AcsChatParticipantAddedToThreadEventData", modelProperties: { - ...AcsChatEventInThreadBase.type.modelProperties, + ...AcsChatEventInThreadBaseProperties.type.modelProperties, time: { serializedName: "time", - required: true, type: { - name: "String" + name: "DateTime" } }, addedByCommunicationIdentifier: { @@ -6782,12 +6218,11 @@ export const AcsChatParticipantAddedToThreadEventData: coreClient.CompositeMappe serializedName: "participantAdded", type: { name: "Composite", - className: "AcsChatThreadParticipant" + className: "AcsChatThreadParticipantProperties" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -6801,12 +6236,11 @@ export const AcsChatParticipantRemovedFromThreadEventData: coreClient.CompositeM name: "Composite", className: "AcsChatParticipantRemovedFromThreadEventData", modelProperties: { - ...AcsChatEventInThreadBase.type.modelProperties, + ...AcsChatEventInThreadBaseProperties.type.modelProperties, time: { serializedName: "time", - required: true, type: { - name: "String" + name: "DateTime" } }, removedByCommunicationIdentifier: { @@ -6820,12 +6254,11 @@ export const AcsChatParticipantRemovedFromThreadEventData: coreClient.CompositeM serializedName: "participantRemoved", type: { name: "Composite", - className: "AcsChatThreadParticipant" + className: "AcsChatThreadParticipantProperties" } }, version: { serializedName: "version", - required: true, type: { name: "Number" } @@ -6839,44 +6272,39 @@ export const AcsSmsDeliveryReportReceivedEventData: coreClient.CompositeMapper = name: "Composite", className: "AcsSmsDeliveryReportReceivedEventData", modelProperties: { - ...AcsSmsEventBase.type.modelProperties, + ...AcsSmsEventBaseProperties.type.modelProperties, deliveryStatus: { serializedName: "deliveryStatus", - required: true, type: { name: "String" } }, deliveryStatusDetails: { serializedName: "deliveryStatusDetails", - required: true, type: { name: "String" } }, deliveryAttempts: { serializedName: "deliveryAttempts", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "AcsSmsDeliveryAttempt" + className: "AcsSmsDeliveryAttemptProperties" } } } }, receivedTimestamp: { serializedName: "receivedTimestamp", - required: true, type: { - name: "String" + name: "DateTime" } }, tag: { serializedName: "tag", - required: true, type: { name: "String" } @@ -6890,19 +6318,17 @@ export const AcsSmsReceivedEventData: coreClient.CompositeMapper = { name: "Composite", className: "AcsSmsReceivedEventData", modelProperties: { - ...AcsSmsEventBase.type.modelProperties, + ...AcsSmsEventBaseProperties.type.modelProperties, message: { serializedName: "message", - required: true, type: { name: "String" } }, receivedTimestamp: { serializedName: "receivedTimestamp", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -6914,17 +6340,15 @@ export const AcsChatMessageReceivedEventData: coreClient.CompositeMapper = { name: "Composite", className: "AcsChatMessageReceivedEventData", modelProperties: { - ...AcsChatMessageEventBase.type.modelProperties, + ...AcsChatMessageEventBaseProperties.type.modelProperties, messageBody: { serializedName: "messageBody", - required: true, type: { name: "String" } }, metadata: { serializedName: "metadata", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -6939,17 +6363,15 @@ export const AcsChatMessageEditedEventData: coreClient.CompositeMapper = { name: "Composite", className: "AcsChatMessageEditedEventData", modelProperties: { - ...AcsChatMessageEventBase.type.modelProperties, + ...AcsChatMessageEventBaseProperties.type.modelProperties, messageBody: { serializedName: "messageBody", - required: true, type: { name: "String" } }, metadata: { serializedName: "metadata", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -6957,9 +6379,8 @@ export const AcsChatMessageEditedEventData: coreClient.CompositeMapper = { }, editTime: { serializedName: "editTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -6971,12 +6392,11 @@ export const AcsChatMessageDeletedEventData: coreClient.CompositeMapper = { name: "Composite", className: "AcsChatMessageDeletedEventData", modelProperties: { - ...AcsChatMessageEventBase.type.modelProperties, + ...AcsChatMessageEventBaseProperties.type.modelProperties, deleteTime: { serializedName: "deleteTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -6988,7 +6408,7 @@ export const AcsChatThreadCreatedWithUserEventData: coreClient.CompositeMapper = name: "Composite", className: "AcsChatThreadCreatedWithUserEventData", modelProperties: { - ...AcsChatThreadEventBase.type.modelProperties, + ...AcsChatThreadEventBaseProperties.type.modelProperties, createdByCommunicationIdentifier: { serializedName: "createdByCommunicationIdentifier", type: { @@ -6998,21 +6418,21 @@ export const AcsChatThreadCreatedWithUserEventData: coreClient.CompositeMapper = }, properties: { serializedName: "properties", - required: true, type: { name: "Dictionary", - value: { type: { name: "any" } } + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } } }, participants: { serializedName: "participants", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "AcsChatThreadParticipant" + className: "AcsChatThreadParticipantProperties" } } } @@ -7026,7 +6446,7 @@ export const AcsChatThreadWithUserDeletedEventData: coreClient.CompositeMapper = name: "Composite", className: "AcsChatThreadWithUserDeletedEventData", modelProperties: { - ...AcsChatThreadEventBase.type.modelProperties, + ...AcsChatThreadEventBaseProperties.type.modelProperties, deletedByCommunicationIdentifier: { serializedName: "deletedByCommunicationIdentifier", type: { @@ -7036,9 +6456,8 @@ export const AcsChatThreadWithUserDeletedEventData: coreClient.CompositeMapper = }, deleteTime: { serializedName: "deleteTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -7050,7 +6469,7 @@ export const AcsChatThreadPropertiesUpdatedPerUserEventData: coreClient.Composit name: "Composite", className: "AcsChatThreadPropertiesUpdatedPerUserEventData", modelProperties: { - ...AcsChatThreadEventBase.type.modelProperties, + ...AcsChatThreadEventBaseProperties.type.modelProperties, editedByCommunicationIdentifier: { serializedName: "editedByCommunicationIdentifier", type: { @@ -7060,17 +6479,17 @@ export const AcsChatThreadPropertiesUpdatedPerUserEventData: coreClient.Composit }, editTime: { serializedName: "editTime", - required: true, type: { - name: "String" + name: "DateTime" } }, properties: { serializedName: "properties", - required: true, type: { name: "Dictionary", - value: { type: { name: "any" } } + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } } } } @@ -7082,12 +6501,11 @@ export const AcsChatParticipantAddedToThreadWithUserEventData: coreClient.Compos name: "Composite", className: "AcsChatParticipantAddedToThreadWithUserEventData", modelProperties: { - ...AcsChatThreadEventBase.type.modelProperties, + ...AcsChatThreadEventBaseProperties.type.modelProperties, time: { serializedName: "time", - required: true, type: { - name: "String" + name: "DateTime" } }, addedByCommunicationIdentifier: { @@ -7101,7 +6519,7 @@ export const AcsChatParticipantAddedToThreadWithUserEventData: coreClient.Compos serializedName: "participantAdded", type: { name: "Composite", - className: "AcsChatThreadParticipant" + className: "AcsChatThreadParticipantProperties" } } } @@ -7113,12 +6531,11 @@ export const AcsChatParticipantRemovedFromThreadWithUserEventData: coreClient.Co name: "Composite", className: "AcsChatParticipantRemovedFromThreadWithUserEventData", modelProperties: { - ...AcsChatThreadEventBase.type.modelProperties, + ...AcsChatThreadEventBaseProperties.type.modelProperties, time: { serializedName: "time", - required: true, type: { - name: "String" + name: "DateTime" } }, removedByCommunicationIdentifier: { @@ -7132,7 +6549,7 @@ export const AcsChatParticipantRemovedFromThreadWithUserEventData: coreClient.Co serializedName: "participantRemoved", type: { name: "Composite", - className: "AcsChatThreadParticipant" + className: "AcsChatThreadParticipantProperties" } } } @@ -7144,17 +6561,15 @@ export const AcsChatMessageReceivedInThreadEventData: coreClient.CompositeMapper name: "Composite", className: "AcsChatMessageReceivedInThreadEventData", modelProperties: { - ...AcsChatMessageEventInThreadBase.type.modelProperties, + ...AcsChatMessageEventInThreadBaseProperties.type.modelProperties, messageBody: { serializedName: "messageBody", - required: true, type: { name: "String" } }, metadata: { serializedName: "metadata", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -7169,17 +6584,15 @@ export const AcsChatMessageEditedInThreadEventData: coreClient.CompositeMapper = name: "Composite", className: "AcsChatMessageEditedInThreadEventData", modelProperties: { - ...AcsChatMessageEventInThreadBase.type.modelProperties, + ...AcsChatMessageEventInThreadBaseProperties.type.modelProperties, messageBody: { serializedName: "messageBody", - required: true, type: { name: "String" } }, metadata: { serializedName: "metadata", - required: true, type: { name: "Dictionary", value: { type: { name: "String" } } @@ -7187,9 +6600,8 @@ export const AcsChatMessageEditedInThreadEventData: coreClient.CompositeMapper = }, editTime: { serializedName: "editTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -7201,12 +6613,11 @@ export const AcsChatMessageDeletedInThreadEventData: coreClient.CompositeMapper name: "Composite", className: "AcsChatMessageDeletedInThreadEventData", modelProperties: { - ...AcsChatMessageEventInThreadBase.type.modelProperties, + ...AcsChatMessageEventInThreadBaseProperties.type.modelProperties, deleteTime: { serializedName: "deleteTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -7218,7 +6629,7 @@ export const AcsChatThreadCreatedEventData: coreClient.CompositeMapper = { name: "Composite", className: "AcsChatThreadCreatedEventData", modelProperties: { - ...AcsChatThreadEventInThreadBase.type.modelProperties, + ...AcsChatThreadEventInThreadBaseProperties.type.modelProperties, createdByCommunicationIdentifier: { serializedName: "createdByCommunicationIdentifier", type: { @@ -7228,21 +6639,21 @@ export const AcsChatThreadCreatedEventData: coreClient.CompositeMapper = { }, properties: { serializedName: "properties", - required: true, type: { name: "Dictionary", - value: { type: { name: "any" } } + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } } }, participants: { serializedName: "participants", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "AcsChatThreadParticipant" + className: "AcsChatThreadParticipantProperties" } } } @@ -7256,7 +6667,7 @@ export const AcsChatThreadDeletedEventData: coreClient.CompositeMapper = { name: "Composite", className: "AcsChatThreadDeletedEventData", modelProperties: { - ...AcsChatThreadEventInThreadBase.type.modelProperties, + ...AcsChatThreadEventInThreadBaseProperties.type.modelProperties, deletedByCommunicationIdentifier: { serializedName: "deletedByCommunicationIdentifier", type: { @@ -7266,9 +6677,8 @@ export const AcsChatThreadDeletedEventData: coreClient.CompositeMapper = { }, deleteTime: { serializedName: "deleteTime", - required: true, type: { - name: "String" + name: "DateTime" } } } @@ -7280,7 +6690,7 @@ export const AcsChatThreadPropertiesUpdatedEventData: coreClient.CompositeMapper name: "Composite", className: "AcsChatThreadPropertiesUpdatedEventData", modelProperties: { - ...AcsChatThreadEventInThreadBase.type.modelProperties, + ...AcsChatThreadEventInThreadBaseProperties.type.modelProperties, editedByCommunicationIdentifier: { serializedName: "editedByCommunicationIdentifier", type: { @@ -7290,17 +6700,17 @@ export const AcsChatThreadPropertiesUpdatedEventData: coreClient.CompositeMapper }, editTime: { serializedName: "editTime", - required: true, type: { - name: "String" + name: "DateTime" } }, properties: { serializedName: "properties", - required: true, type: { name: "Dictionary", - value: { type: { name: "any" } } + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } } } } diff --git a/sdk/eventgrid/eventgrid/src/generated/models/parameters.ts b/sdk/eventgrid/eventgrid/src/models/parameters.ts similarity index 96% rename from sdk/eventgrid/eventgrid/src/generated/models/parameters.ts rename to sdk/eventgrid/eventgrid/src/models/parameters.ts index 9dc4de730f6a..dfaa21ea8fc6 100644 --- a/sdk/eventgrid/eventgrid/src/generated/models/parameters.ts +++ b/sdk/eventgrid/eventgrid/src/models/parameters.ts @@ -103,7 +103,8 @@ export const events2: OperationParameter = { name: "Sequence", element: { type: { - name: "any" + name: "Dictionary", + value: { type: { name: "any" } } } } } diff --git a/sdk/eventgrid/eventgrid/src/predicates.ts b/sdk/eventgrid/eventgrid/src/predicates.ts deleted file mode 100644 index 65caee638809..000000000000 --- a/sdk/eventgrid/eventgrid/src/predicates.ts +++ /dev/null @@ -1,450 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { - 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, - IotHubDeviceConnectedEventData, - IotHubDeviceCreatedEventData, - IotHubDeviceDeletedEventData, - IotHubDeviceDisconnectedEventData, - IotHubDeviceTelemetryEventData, - KeyVaultAccessPolicyChangedEventData, - KeyVaultCertificateExpiredEventData, - KeyVaultCertificateNearExpiryEventData, - KeyVaultCertificateNewVersionCreatedEventData, - KeyVaultKeyExpiredEventData, - KeyVaultKeyNearExpiryEventData, - KeyVaultKeyNewVersionCreatedEventData, - KeyVaultSecretExpiredEventData, - KeyVaultSecretNearExpiryEventData, - KeyVaultSecretNewVersionCreatedEventData, - MachineLearningServicesDatasetDriftDetectedEventData, - MachineLearningServicesModelDeployedEventData, - MachineLearningServicesModelRegisteredEventData, - MachineLearningServicesRunCompletedEventData, - MachineLearningServicesRunStatusChangedEventData, - MapsGeofenceEnteredEventData, - MapsGeofenceExitedEventData, - MapsGeofenceResultEventData, - MediaJobCanceledEventData, - MediaJobCancelingEventData, - MediaJobErroredEventData, - MediaJobFinishedEventData, - MediaJobOutputCanceledEventData, - MediaJobOutputCancelingEventData, - MediaJobOutputErroredEventData, - MediaJobOutputFinishedEventData, - MediaJobOutputProcessingEventData, - MediaJobOutputProgressEventData, - MediaJobOutputScheduledEventData, - MediaJobOutputStateChangeEventData, - MediaJobProcessingEventData, - MediaJobScheduledEventData, - MediaJobStateChangeEventData, - MediaLiveEventChannelArchiveHeartbeatEventData, - MediaLiveEventConnectionRejectedEventData, - MediaLiveEventEncoderConnectedEventData, - MediaLiveEventEncoderDisconnectedEventData, - MediaLiveEventIncomingDataChunkDroppedEventData, - MediaLiveEventIncomingStreamReceivedEventData, - MediaLiveEventIncomingStreamsOutOfSyncEventData, - MediaLiveEventIncomingVideoStreamsOutOfSyncEventData, - MediaLiveEventIngestHeartbeatEventData, - MediaLiveEventTrackDiscontinuityDetectedEventData, - 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 -} from "./generated/models"; - -import { CloudEvent, EventGridEvent } from "./models"; - -/** - * 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.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.Media.JobStateChange" event. */ - "Microsoft.Media.JobStateChange": MediaJobStateChangeEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputStateChange" event. */ - "Microsoft.Media.JobOutputStateChange": MediaJobOutputStateChangeEventData; - /** An interface for the event data of a "Microsoft.Media.JobScheduled" event. */ - "Microsoft.Media.JobScheduled": MediaJobScheduledEventData; - /** An interface for the event data of a "Microsoft.Media.JobProcessing" event. */ - "Microsoft.Media.JobProcessing": MediaJobProcessingEventData; - /** An interface for the event data of a "Microsoft.Media.JobCanceling" event. */ - "Microsoft.Media.JobCanceling": MediaJobCancelingEventData; - /** An interface for the event data of a "Microsoft.Media.JobFinished" event. */ - "Microsoft.Media.JobFinished": MediaJobFinishedEventData; - /** An interface for the event data of a "Microsoft.Media.JobCanceled" event. */ - "Microsoft.Media.JobCanceled": MediaJobCanceledEventData; - /** An interface for the event data of a "Microsoft.Media.JobErrored" event. */ - "Microsoft.Media.JobErrored": MediaJobErroredEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputCanceled" event. */ - "Microsoft.Media.JobOutputCanceled": MediaJobOutputCanceledEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputCanceling" event. */ - "Microsoft.Media.JobOutputCanceling": MediaJobOutputCancelingEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputErrored" event. */ - "Microsoft.Media.JobOutputErrored": MediaJobOutputErroredEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputFinished" event. */ - "Microsoft.Media.JobOutputFinished": MediaJobOutputFinishedEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputProcessing" event. */ - "Microsoft.Media.JobOutputProcessing": MediaJobOutputProcessingEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputScheduled" event. */ - "Microsoft.Media.JobOutputScheduled": MediaJobOutputScheduledEventData; - /** An interface for the event data of a "Microsoft.Media.JobOutputProgress" event. */ - "Microsoft.Media.JobOutputProgress": MediaJobOutputProgressEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventEncoderConnected" event. */ - "Microsoft.Media.LiveEventEncoderConnected": MediaLiveEventEncoderConnectedEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventChannelArchiveHeartbeat" event. */ - "Microsoft.Media.LiveEventChannelArchiveHeartbeat": MediaLiveEventChannelArchiveHeartbeatEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventConnectionRejected" event. */ - "Microsoft.Media.LiveEventConnectionRejected": MediaLiveEventConnectionRejectedEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventEncoderDisconnected" event. */ - "Microsoft.Media.LiveEventEncoderDisconnected": MediaLiveEventEncoderDisconnectedEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventIncomingStreamReceived" event. */ - "Microsoft.Media.LiveEventIncomingStreamReceived": MediaLiveEventIncomingStreamReceivedEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventIncomingStreamsOutOfSync" event. */ - "Microsoft.Media.LiveEventIncomingStreamsOutOfSync": MediaLiveEventIncomingStreamsOutOfSyncEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync" event. */ - "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync": MediaLiveEventIncomingVideoStreamsOutOfSyncEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventIncomingDataChunkDropped" event. */ - "Microsoft.Media.LiveEventIncomingDataChunkDropped": MediaLiveEventIncomingDataChunkDroppedEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventIngestHeartbeat" event. */ - "Microsoft.Media.LiveEventIngestHeartbeat": MediaLiveEventIngestHeartbeatEventData; - /** An interface for the event data of a "Microsoft.Media.LiveEventTrackDiscontinuityDetected" event. */ - "Microsoft.Media.LiveEventTrackDiscontinuityDetected": MediaLiveEventTrackDiscontinuityDetectedEventData; - /** 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; -} - -/** - * 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/src/tracing.ts b/sdk/eventgrid/eventgrid/src/tracing.ts deleted file mode 100644 index 8b6c476e60ed..000000000000 --- a/sdk/eventgrid/eventgrid/src/tracing.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { createSpanFunction } from "@azure/core-tracing"; - -/** - * Creates a span using the global tracer. - * @internal - */ -export const createSpan = createSpanFunction({ - packagePrefix: "Azure.Data.EventGrid", - namespace: "Microsoft.Messaging.EventGrid" -}); diff --git a/sdk/eventgrid/eventgrid/src/util.ts b/sdk/eventgrid/eventgrid/src/util.ts deleted file mode 100644 index 7fec0bfaa291..000000000000 --- a/sdk/eventgrid/eventgrid/src/util.ts +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { KeyCredential } from "@azure/core-auth"; - -/** - * Stringifies a Date object in the format expected by the Event Grid service, for use in a Shared Access Signiture. - * - * The service expects this time string to be in the same format as what is returned by the .NET DateTime.ToString - * method, using the "en-US" culture. - * - * This corresponds to the .NET format string: "M/d/yyyy h:mm:ss tt". For example, the date "June 5th, 2020, 12:09:03 PM" - * is represented as the string "6/5/2020 12:09:03 PM" - * - * The service expects a UTC time, so this method returns a string based on the UTC time of the provided Date. - * - * @param d - The Date object to convert to a string. - */ -export function dateToServiceTimeString(d: Date): string { - const month = d.getUTCMonth() + 1; // getUTCMonth returns 0-11 not 1-12. - const day = d.getUTCDate(); - const year = d.getUTCFullYear(); - - const hour = d.getUTCHours() === 0 ? 12 : d.getUTCHours() % 12; // getUTCHours returns 0-23, and we want this in 12 hour format. - const minute = d - .getUTCMinutes() - .toString() - .padStart(2, "0"); - const second = d - .getUTCSeconds() - .toString() - .padStart(2, "0"); - const am = d.getUTCHours() >= 13 ? "PM" : "AM"; - - return `${month}/${day}/${year} ${hour}:${minute}:${second} ${am}`; -} - -/** - * Returns `true` if the credential object is like the KeyCredential interface (i.e. it has a - * key property). - * - * @param credential - The object to test - */ -export function isKeyCredentialLike(o: unknown): o is KeyCredential { - const castO = o as { - key: unknown; - }; - return castO.key !== undefined; -} - -export function parseAndWrap(jsonStringOrObject: string | Record): any[] { - if (typeof jsonStringOrObject === "string") { - const o = JSON.parse(jsonStringOrObject); - if (Array.isArray(o)) { - return o; - } else { - return [o]; - } - } - - if (Array.isArray(jsonStringOrObject)) { - return jsonStringOrObject; - } else { - return [jsonStringOrObject]; - } -} - -const EVENT_GRID_SCHEMA_METADATA_VERSION = "1"; - -export function validateEventGridEvent(o: unknown): void { - if (typeof o !== "object") { - throw new TypeError("event is not an object"); - } - - const castO = o as { - metadataVersion: unknown; - }; - validateRequiredStringProperties(o, [ - "eventType", - "eventTime", - "id", - "subject", - "topic", - "dataVersion", - "metadataVersion" - ]); - - validateRequiredAnyProperties(o, ["data"]); - - if (castO.metadataVersion !== EVENT_GRID_SCHEMA_METADATA_VERSION) { - throw new TypeError("event is not in the Event Grid schema"); - } -} - -const CLOUD_EVENT_1_0_SPEC_VERSION = "1.0"; - -export function validateCloudEventEvent(o: unknown): void { - validateRequiredStringProperties(o, ["type", "source", "id", "specversion"]); - validateOptionalStringProperties(o, ["time", "dataschema", "datacontenttype", "subject"]); - - if (typeof o !== "object") { - throw new TypeError("event is not an object"); - } - - const castO = o as { - specversion: unknown; - }; - - if (castO.specversion !== CLOUD_EVENT_1_0_SPEC_VERSION) { - throw new Error("event is not in the Cloud Event 1.0 schema"); - } -} - -function validateRequiredStringProperties(o: any, propertyNames: string[]): void { - for (const propertyName of propertyNames) { - if (typeof o[propertyName] === "undefined") { - throw new Error(`event is missing required property '${propertyName}'`); - } - - if (typeof o[propertyName] !== "string") { - throw new TypeError( - `event property '${propertyName} should be a 'string', but is '${typeof o[propertyName]}'` - ); - } - } -} - -function validateRequiredAnyProperties(o: any, propertyNames: string[]): void { - for (const propertyName of propertyNames) { - if (typeof o[propertyName] === "undefined") { - throw new Error(`event is missing required property '${propertyName}'`); - } - } -} - -function validateOptionalStringProperties(o: any, propertyNames: string[]): void { - for (const propertyName of propertyNames) { - if (typeof o[propertyName] !== "undefined" && typeof o[propertyName] !== "string") { - throw new TypeError( - `event property '${propertyName}' should be a 'string' but it is a '${typeof o[ - propertyName - ]}'` - ); - } - } -} diff --git a/sdk/eventgrid/eventgrid/test/sampleTest.ts b/sdk/eventgrid/eventgrid/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/eventgrid/eventgrid/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/eventgrid/eventgrid/tsconfig.json b/sdk/eventgrid/eventgrid/tsconfig.json index 64103107beea..6e3251194117 100644 --- a/sdk/eventgrid/eventgrid/tsconfig.json +++ b/sdk/eventgrid/eventgrid/tsconfig.json @@ -1,12 +1,19 @@ { - "extends": "../../../tsconfig.package", "compilerOptions": { + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es6", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, "outDir": "./dist-esm", - "declarationDir": "./types", - "lib": ["ES2018.AsyncIterable"], - "paths": { - "@azure/eventgrid": ["./src/index"] - } + "importHelpers": true }, - "include": ["src/**/*.ts", "test/**/*.ts", "samples-dev/**/*.ts"] + "include": ["./src/**/*.ts", "./test/**/*.ts"], + "exclude": ["node_modules"] }