From ca694006b1a62b2e3714335824688579c134cc07 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 8 Jul 2021 05:35:47 +0000 Subject: [PATCH] CodeGen from PR 15118 in Azure/azure-rest-api-specs Merge f736a8b6e19724c018b1b2592b1474e803c27116 into 55558c4b2a1ee05064b1ce6733edf72a0345cfb8 --- sdk/eventgrid/eventgrid/LICENSE.txt | 21 + sdk/eventgrid/eventgrid/README.md | 381 +- sdk/eventgrid/eventgrid/package.json | 168 +- sdk/eventgrid/eventgrid/rollup.config.js | 47 +- .../eventgrid/src/eventGridClient.ts | 428 +- .../eventgrid/src/eventGridClientContext.ts | 60 + sdk/eventgrid/eventgrid/src/models/index.ts | 4362 +++++++++++ sdk/eventgrid/eventgrid/src/models/mappers.ts | 6523 +++++++++++++++++ .../eventgrid/src/models/parameters.ts | 43 + sdk/eventgrid/eventgrid/tsconfig.json | 23 +- 10 files changed, 11417 insertions(+), 639 deletions(-) create mode 100644 sdk/eventgrid/eventgrid/LICENSE.txt create mode 100644 sdk/eventgrid/eventgrid/src/eventGridClientContext.ts create mode 100644 sdk/eventgrid/eventgrid/src/models/index.ts create mode 100644 sdk/eventgrid/eventgrid/src/models/mappers.ts create mode 100644 sdk/eventgrid/eventgrid/src/models/parameters.ts diff --git a/sdk/eventgrid/eventgrid/LICENSE.txt b/sdk/eventgrid/eventgrid/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/eventgrid/eventgrid/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/eventgrid/eventgrid/README.md b/sdk/eventgrid/eventgrid/README.md index 6f1e21cb518a..2fc4160be780 100644 --- a/sdk/eventgrid/eventgrid/README.md +++ b/sdk/eventgrid/eventgrid/README.md @@ -1,311 +1,126 @@ -# Azure Event Grid client library for JavaScript +## Azure EventGridClient SDK 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. - -Use the client library to: - -- 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 - -[Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/eventgrid/eventgrid/) | -[Package (NPM)](https://www.npmjs.com/package/@azure/eventgrid/v/next) | -[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) - -## Getting started - -### Currently supported environments +This package contains an isomorphic SDK (runs both in node.js and in browsers) for EventGridClient. ### 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`: - -```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: - -```bash -az eventgrid topic show --name --resource-group --query "endpoint" -``` - -#### Using an Access Key - -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: - -```bash -az eventgrid topic key list --resource-group --name -``` - -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: - -```js -const { EventGridPublisherClient, AzureSASCredential } = require("@azure/eventgrid"); - -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") -); -``` - -## Key concepts - -### EventGridPublisherClient - -`EventGridPublisherClient` is used sending events to an Event Grid Topic or an Event Grid Domain. - -### Event Schemas +You must have an [Azure subscription](https://azure.microsoft.com/free/). -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: +### How to install -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("") -); -``` - -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: +To use this SDK in your project, you will need to install two packages. +- `@azure/eventgrid` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. +Install both packages using the below command: ```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 - -### 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" - } - } -]); +npm install --save @azure/eventgrid @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. -### Publish a Custom Event to a Topic in an Event Grid Domain using the Event Grid Schema +### How to use -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: +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -```js -const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid"); +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and publishEvents as an example written in JavaScript. -const client = new EventGridPublisherClient( - "", - "EventGrid", - new AzureKeyCredential("") -); +##### Sample code -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"); +```javascript 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(); -} - -console.log("starting receiver"); - -receiver.subscribe({ - processError: async (err) => { - console.error(err); - }, - processMessage +const { EventGridClient } = require("@azure/eventgrid"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new EventGridClient(creds, subscriptionId); +const topicHostname = "testtopicHostname"; +const events = [{ + id: "testid", + topic: "testtopic", + subject: "testsubject", + data: {}, + eventType: "testeventType", + eventTime: new Date().toISOString(), + dataVersion: "testdataVersion" +}]; +client.publishEvents(topicHostname, events).then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log("An error occurred:"); + console.error(err); }); ``` -## Troubleshooting - -### Logging - -Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: - -```javascript -import { setLogLevel } from "@azure/logger"; - -setLogLevel("info"); +#### browser - Authentication, client creation, and publishEvents as an example written in JavaScript. + +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. + +##### Sample code + +- index.html + +```html + + + + @azure/eventgrid sample + + + + + + + ``` -For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). - -## 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. - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - ## Related projects - [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_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/master/extensions/distributed-tracing.md -[eventgrid-on-kubernetes-using-azure-arc]: https://docs.microsoft.com/azure/event-grid/kubernetes/ +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/eventgrid/eventgrid/README.png) diff --git a/sdk/eventgrid/eventgrid/package.json b/sdk/eventgrid/eventgrid/package.json index ae6378409ff7..2249d2e1f18c 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -1,151 +1,59 @@ { "name": "@azure/eventgrid", - "sdk-type": "client", "author": "Microsoft Corporation", - "description": "An isomorphic client library for the Azure Event Grid service.", + "description": "EventGridClient Library with typescript type definitions for node.js and browser.", "version": "4.4.0", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", + "tslib": "^1.10.0" + }, "keywords": [ "node", "azure", "typescript", "browser", - "isomorphic", - "cloud" + "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", + "main": "./dist/eventgrid.js", + "module": "./esm/eventGridClient.js", + "types": "./esm/eventGridClient.d.ts", + "devDependencies": { + "typescript": "^3.6.0", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/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" }, - "engines": { - "node": ">=12.0.0" - }, "files": [ - "dist/", - "dist-esm/src/", - "types/eventgrid.d.ts", + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", "README.md", - "LICENSE" + "rollup.config.js", + "tsconfig.json" ], - "//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/constants.ts", - "prefix": "SDK_VERSION" - } - ] - }, - "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:autorest": "autorest ./swagger/README.md --typescript --v3 && node ./scripts/setPathToEmpty.js", - "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 rollup.test.config.js 2>&1", - "build": "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}\"", - "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", - "pack": "npm pack 2>&1", - "prebuild": "npm run clean", - "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 --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"dist-test/index.node.js\"", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src" + "build": "tsc && rollup -c rollup.config.js && npm run minify", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/eventgrid.js.map'\" -o ./dist/eventgrid.min.js ./dist/eventgrid.js", + "prepack": "npm install && npm run build" }, "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.12", - "@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-recorder": "^1.0.0", - "@microsoft/api-extractor": "7.7.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": "^1.18.0", - "nyc": "^14.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": "^9.0.0", - "typescript": "~4.2.0", - "typedoc": "0.15.2" - } + "autoPublish": true } diff --git a/sdk/eventgrid/eventgrid/rollup.config.js b/sdk/eventgrid/eventgrid/rollup.config.js index 49a26bd6fdd6..6cb130add98b 100644 --- a/sdk/eventgrid/eventgrid/rollup.config.js +++ b/sdk/eventgrid/eventgrid/rollup.config.js @@ -1,14 +1,37 @@ -import * as base from "./rollup.base.config"; +import rollup from "rollup"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; -const inputs = []; +/** + * @type {rollup.RollupFileOptions} + */ +const config = { + input: "./esm/eventGridClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], + output: { + file: "./dist/eventgrid.js", + format: "umd", + name: "Azure.Eventgrid", + sourcemap: true, + globals: { + "@azure/ms-rest-js": "msRest", + "@azure/ms-rest-azure-js": "msRestAzure" + }, + banner: `/* + * 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. + */` + }, + plugins: [ + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() + ] +}; -if (!process.env.ONLY_BROWSER) { - inputs.push(base.nodeConfig()); -} - -if (!process.env.ONLY_NODE) { - inputs.push(base.browserConfig()); - inputs.push(base.browserConfig(false, true)); -} - -export default inputs; +export default config; diff --git a/sdk/eventgrid/eventgrid/src/eventGridClient.ts b/sdk/eventgrid/eventgrid/src/eventGridClient.ts index d2db9cf008d1..dd760de92470 100644 --- a/sdk/eventgrid/eventgrid/src/eventGridClient.ts +++ b/sdk/eventgrid/eventgrid/src/eventGridClient.ts @@ -1,238 +1,254 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { 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 { SDK_VERSION } from "./constants"; -import { - SendCloudEventInput, - SendEventGridEventInput, - cloudEventReservedPropertyNames -} 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 * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "./models"; +import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; +import { EventGridClientContext } from "./eventGridClientContext"; -/** - * Options for the Event Grid Client. - */ -export type EventGridPublisherClientOptions = CommonClientOptions; -/** - * Options for the send events operation. - */ -export type SendOptions = OperationOptions; +class EventGridClient extends EventGridClientContext { + /** + * Initializes a new instance of the EventGridClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: msRest.AzureServiceClientOptions) { + super(credentials, options); + } -/** - * 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. + * 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 optional parameters + * @returns Promise */ - EventGrid: SendEventGridEventInput; + publishEvents(topicHostname: string, events: Models.EventGridEvent[], options?: msRest.RequestOptionsBase): Promise; /** - * The shape of the input to `send` when the client is configured to send events using the Cloud Event schema. + * @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 callback The callback */ - CloudEvent: SendCloudEventInput; + publishEvents(topicHostname: string, events: Models.EventGridEvent[], callback: msRest.ServiceCallback): void; /** - * The shape of the input to `send` when the client is configured to send events using a custom schema. + * @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 optional parameters + * @param callback The callback */ + publishEvents(topicHostname: string, events: Models.EventGridEvent[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + publishEvents(topicHostname: string, events: Models.EventGridEvent[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + topicHostname, + events, + options + }, + publishEventsOperationSpec, + callback); + } - 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. + * 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 optional parameters + * @returns Promise */ - public readonly endpointUrl: string; - + publishCloudEventEvents(topicHostname: string, events: Models.CloudEventEvent[], options?: msRest.RequestOptionsBase): Promise; /** - * The version of the Even Grid service. + * @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 callback The callback */ - public readonly apiVersion: string; - + publishCloudEventEvents(topicHostname: string, events: Models.CloudEventEvent[], callback: msRest.ServiceCallback): void; /** - * The AutoRest generated client for the EventGrid dataplane. + * @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 optional parameters + * @param callback The callback */ - private readonly client: GeneratedClient; + publishCloudEventEvents(topicHostname: string, events: Models.CloudEventEvent[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + publishCloudEventEvents(topicHostname: string, events: Models.CloudEventEvent[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + topicHostname, + events, + options + }, + publishCloudEventEventsOperationSpec, + callback); + } /** - * The schema that will be used when sending events. + * 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 optional parameters + * @returns Promise */ - private readonly inputSchema: InputSchema; - + publishCustomEventEvents(topicHostname: string, events: any[], options?: msRest.RequestOptionsBase): Promise; /** - * 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. + * @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 callback The callback */ - constructor( - endpointUrl: string, - inputSchema: T, - credential: KeyCredential | SASCredential, - options: EventGridPublisherClientOptions = {} - ) { - this.endpointUrl = endpointUrl; - this.inputSchema = inputSchema; - - const libInfo = `azsdk-js-eventgrid/${SDK_VERSION}`; - const pipelineOptions = { ...options }; - - if (!pipelineOptions.userAgentOptions) { - pipelineOptions.userAgentOptions = {}; - } - - if (pipelineOptions.userAgentOptions.userAgentPrefix) { - pipelineOptions.userAgentOptions.userAgentPrefix = `${pipelineOptions.userAgentOptions.userAgentPrefix} ${libInfo}`; - } else { - pipelineOptions.userAgentOptions.userAgentPrefix = libInfo; - } - - this.client = new GeneratedClient(pipelineOptions); - const authPolicy = eventGridCredentialPolicy(credential); - this.client.pipeline.addPolicy(authPolicy); - this.client.pipeline.addPolicy(cloudEventDistributedTracingEnricherPolicy()); - this.apiVersion = this.client.apiVersion; - } - + publishCustomEventEvents(topicHostname: string, events: any[], callback: msRest.ServiceCallback): void; /** - * 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. + * @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 optional parameters + * @param callback The callback */ - async send(events: InputSchemaToInputTypeMap[T][], options?: SendOptions): Promise { - const { span, updatedOptions } = createSpan("EventGridPublisherClient-send", options || {}); + publishCustomEventEvents(topicHostname: string, events: any[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + publishCustomEventEvents(topicHostname: string, events: any[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + topicHostname, + events, + options + }, + publishCustomEventEventsOperationSpec, + callback); + } +} - 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 - ); +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const publishEventsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "api/events", + urlParameters: [ + Parameters.topicHostname + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "events", + mapper: { + required: true, + serializedName: "events", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EventGridEvent" + } } - case "Custom": { - return await this.client.publishCustomEventEvents( - this.endpointUrl, - events as InputSchemaToInputTypeMap["Custom"][], - updatedOptions - ); - } - default: { - throw new Error(`Unknown input schema type '${this.inputSchema}'`); + } + } + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const publishCloudEventEventsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "api/events", + urlParameters: [ + Parameters.topicHostname + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "events", + mapper: { + required: true, + serializedName: "events", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CloudEventEvent", + additionalProperties: { + type: { + name: "Object" + } + } + } } } - } catch (e) { - span.setStatus({ code: SpanStatusCode.ERROR, message: e.message }); - throw e; - } finally { - span.end(); } - } -} - -/** - * @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}`); + }, + contentType: "application/cloudevents-batch+json; charset=utf-8", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const publishCustomEventEventsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "api/events", + urlParameters: [ + Parameters.topicHostname + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "events", + mapper: { + required: true, + serializedName: "events", + type: { + name: "Sequence", + element: { + type: { + name: "Object" + } + } } } - } - - 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" - ); + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError } - - converted.datacontenttype = event.datacontenttype; - converted.dataBase64 = event.data; - } else { - converted.datacontenttype = event.datacontenttype ?? "application/json"; - converted.data = event.data; - } - - return converted; -} + }, + serializer +}; + +export { + EventGridClient, + EventGridClientContext, + Models as EventGridModels, + Mappers as EventGridMappers +}; diff --git a/sdk/eventgrid/eventgrid/src/eventGridClientContext.ts b/sdk/eventgrid/eventgrid/src/eventGridClientContext.ts new file mode 100644 index 000000000000..895798255102 --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/eventGridClientContext.ts @@ -0,0 +1,60 @@ +/* + * 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 msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; + +const packageName = "@azure/eventgrid"; +const packageVersion = "4.4.0"; + +export class EventGridClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials | TokenCredential; + apiVersion?: string; + + /** + * Initializes a new instance of the EventGridClient class. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: msRestAzure.AzureServiceClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if (!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2018-01-01'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = "https://{topicHostname}"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/sdk/eventgrid/eventgrid/src/models/index.ts b/sdk/eventgrid/eventgrid/src/models/index.ts new file mode 100644 index 000000000000..e2c02cc6f294 --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/models/index.ts @@ -0,0 +1,4362 @@ +/* + * 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 { BaseResource, CloudError } from "@azure/ms-rest-azure-js"; + +export { BaseResource, CloudError }; + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the Storage service for the storage API operation that triggered + * this event. + */ + requestId?: string; + /** + * The etag of the blob at the time this event was triggered. + */ + 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; + /** + * 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; + /** + * The offset of the blob in bytes. + */ + contentOffset?: number; + /** + * The type of blob. + */ + blobType?: string; + /** + * The path to the blob. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the Storage service for the storage API operation that triggered + * this event. + */ + 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; + /** + * The type of blob. + */ + blobType?: string; + /** + * The path to the blob. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the storage service for the storage API operation that triggered + * this event. + */ + requestId?: string; + /** + * The etag of the directory at the time this event was triggered. + */ + eTag?: string; + /** + * The path to the directory. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the storage service for the storage API operation that triggered + * this event. + */ + requestId?: string; + /** + * The path to the deleted directory. + */ + url?: string; + /** + * Is this event for a recursive delete operation. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the storage service for the storage API operation that triggered + * this event. + */ + requestId?: string; + /** + * The path to the blob that was renamed. + */ + sourceUrl?: string; + /** + * The new path to the blob after the rename operation. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the storage service for the storage API operation that triggered + * this event. + */ + requestId?: string; + /** + * The path to the directory that was renamed. + */ + sourceUrl?: string; + /** + * The new path to the directory after the rename operation. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * Number of success operations of this action. + */ + successCount?: number; + /** + * Error messages of this action if any. + */ + errorList?: string; +} + +/** + * 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; + deleteSummary?: StorageLifecyclePolicyActionSummaryDetail; + tierToCoolSummary?: StorageLifecyclePolicyActionSummaryDetail; + tierToArchiveSummary?: StorageLifecyclePolicyActionSummaryDetail; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the Storage service for the storage API operation that triggered + * this event. + */ + 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; + /** + * 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; + /** + * The type of blob. + */ + blobType?: string; + /** + * The path to the blob. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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; + /** + * A request id provided by the client of the storage API operation that triggered this event. + */ + clientRequestId?: string; + /** + * The request id generated by the Storage service for the storage API operation that triggered + * this event. + */ + 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; + /** + * 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; + /** + * The type of blob. + */ + blobType?: string; + /** + * The path to the blob. + */ + 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; + /** + * The identity of the requester that triggered this event. + */ + 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; +} + +/** + * 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?: Date; + /** + * The account name for which inventory policy is registered. + */ + accountName?: string; + /** + * The rule name for inventory policy. + */ + ruleName?: string; + /** + * The status of inventory run, it can be Succeeded/PartiallySucceeded/Failed. + */ + policyRunStatus?: string; + /** + * The status message for inventory run. + */ + policyRunStatusMessage?: string; + /** + * The policy run id for inventory run. + */ + policyRunId?: string; + /** + * The blob URL for manifest file for inventory run. + */ + 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; + /** + * The file type of the capture file. + */ + fileType?: string; + /** + * The shard ID. + */ + partitionId?: string; + /** + * The file size. + */ + sizeInBytes?: number; + /** + * The number of events in the file. + */ + eventCount?: number; + /** + * The smallest sequence number from the queue. + */ + firstSequenceNumber?: number; + /** + * The last sequence number from the queue. + */ + lastSequenceNumber?: number; + /** + * The first time from the queue. + */ + firstEnqueueTime?: Date; + /** + * The last time from the queue. + */ + 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 ResourceWriteSuccessData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceWriteFailureData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceWriteCancelData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceDeleteSuccessData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceDeleteFailureData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceDeleteCancelData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceActionSuccessData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceActionFailureData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + 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 ResourceActionCancelData { + /** + * The tenant ID of the resource. + */ + tenantId?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The resource group of the resource. + */ + resourceGroup?: string; + /** + * The resource provider performing the operation. + */ + resourceProvider?: string; + /** + * The URI of the resource in the operation. + */ + resourceUri?: string; + /** + * The operation that was performed. + */ + operationName?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The requested authorization for the operation. + */ + authorization?: string; + /** + * The properties of the claims. + */ + claims?: string; + /** + * An operation ID used for troubleshooting. + */ + correlationId?: string; + /** + * The details of the operation. + */ + httpRequest?: string; +} + +/** + * Properties of an event published to an Event Grid topic using the EventGrid Schema. + */ +export interface EventGridEvent { + /** + * 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; + /** + * Event data specific to the event type. + */ + data: any; + /** + * The type of the event that occurred. + */ + eventType: string; + /** + * The time (in UTC) the event was generated. + */ + eventTime: Date; + /** + * The schema version of the event metadata. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly metadataVersion?: string; + /** + * The schema version of the data object. + */ + dataVersion: string; +} + +/** + * Properties of an event published to an Event Grid topic using the CloudEvent 1.0 Schema + */ +export interface CloudEventEvent { + /** + * An identifier for the event. The combination of id and source must be unique for each distinct + * event. + */ + id: string; + /** + * 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; + /** + * Event data specific to the event type, encoded as a base64 string. + */ + dataBase64?: Uint8Array; + /** + * Type of event related to the originating occurrence. + */ + type: string; + /** + * The time (in UTC) the event was generated, in RFC3339 format. + */ + time?: Date; + /** + * The version of the CloudEvents specification which the event uses. + */ + specversion: string; + /** + * Identifies the schema that data adheres to. + */ + dataschema?: string; + /** + * Content type of data value. + */ + datacontenttype?: string; + /** + * This describes the subject of the event in the context of the event producer (identified by + * source). + */ + subject?: string; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [property: string]: any; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionValidationEvent event. + */ +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; + /** + * 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; +} + +/** + * 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; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionDeletedEvent event. + */ +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; +} + +/** + * Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, + * DeviceDeleted). + */ +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; + /** + * Name of the IoT Hub where the device was created or deleted. + */ + hubName?: string; + /** + * Information about the device twin, which is the cloud representation of application device + * metadata. + */ + twin?: DeviceTwinInfo; +} + +/** + * Event data for Microsoft.Devices.DeviceCreated event. + */ +export interface IotHubDeviceCreatedEventData extends DeviceLifeCycleEventProperties { +} + +/** + * Event data for Microsoft.Devices.DeviceDeleted event. + */ +export interface IotHubDeviceDeletedEventData extends DeviceLifeCycleEventProperties { +} + +/** + * Schema of the Data property of an EventGridEvent for a device connection state event + * (DeviceConnected, DeviceDisconnected). + */ +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; + /** + * 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; + /** + * Name of the IoT Hub where the device was created or deleted. + */ + hubName?: string; + /** + * Information about the device connection state event. + */ + deviceConnectionStateEventInfo?: DeviceConnectionStateEventInfo; +} + +/** + * Event data for Microsoft.Devices.DeviceConnected event. + */ +export interface IotHubDeviceConnectedEventData extends DeviceConnectionStateEventProperties { +} + +/** + * Event data for Microsoft.Devices.DeviceDisconnected event. + */ +export interface IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEventProperties { +} + +/** + * Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). + */ +export interface DeviceTelemetryEventProperties { + /** + * The content of the message from the device. + */ + body?: any; + /** + * Application properties are user-defined strings that can be added to the message. These fields + * are optional. + */ + properties?: { [propertyName: string]: string }; + /** + * System properties help identify contents and source of the messages. + */ + systemProperties?: { [propertyName: string]: string }; +} + +/** + * Event data for Microsoft.Devices.DeviceTelemetry event. + */ +export interface IotHubDeviceTelemetryEventData extends DeviceTelemetryEventProperties { +} + +/** + * Metadata information for the properties JSON document. + */ +export interface DeviceTwinMetadata { + /** + * The ISO8601 timestamp of the last time the properties were updated. + */ + lastUpdated?: string; +} + +/** + * A portion of the properties that can be written only by the application back-end, and read by + * the device. + */ +export interface DeviceTwinProperties { + /** + * Metadata information for the properties JSON document. + */ + metadata?: DeviceTwinMetadata; + /** + * Version of device twin properties. + */ + version?: number; +} + +/** + * 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?: DeviceTwinProperties; + /** + * A portion of the properties that can be written only by the device, and read by the + * application back-end. + */ + reported?: DeviceTwinProperties; +} + +/** + * The thumbprint is a unique value for the x509 certificate, commonly used to find a particular + * certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 + * algorithm, and does not physically exist in the certificate. + */ +export interface DeviceTwinInfoX509Thumbprint { + /** + * Primary thumbprint for the x509 certificate. + */ + primaryThumbprint?: string; + /** + * Secondary thumbprint for the x509 certificate. + */ + secondaryThumbprint?: string; +} + +/** + * 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; + /** + * Count of cloud to device messages sent to this device. + */ + cloudToDeviceMessageCount?: number; + /** + * Whether the device is connected or disconnected. + */ + connectionState?: string; + /** + * The unique identifier of the device twin. + */ + 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; + /** + * The ISO8601 timestamp of the last activity. + */ + lastActivityTime?: string; + /** + * Properties JSON element. + */ + properties?: DeviceTwinInfoProperties; + /** + * Whether the device twin is enabled or disabled. + */ + status?: string; + /** + * The ISO8601 timestamp of the last device twin status update. + */ + statusUpdateTime?: string; + /** + * An integer that is incremented by one each time the device twin is updated. + */ + 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; +} + +/** + * 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; +} + +/** + * The content of the event request message. + */ +export interface ContainerRegistryEventData { + /** + * The event ID. + */ + id?: string; + /** + * The time at which the event occurred. + */ + timestamp?: Date; + /** + * The action that encompasses the provided event. + */ + action?: string; + /** + * The target of the event. + */ + target?: ContainerRegistryEventTarget; + /** + * The request that generated the event. + */ + request?: ContainerRegistryEventRequest; + /** + * The agent that initiated the event. For most situations, this could be from the authorization + * context of the request. + */ + actor?: ContainerRegistryEventActor; + /** + * The registry node that generated the event. Put differently, while the actor initiates the + * event, the source generates it. + */ + source?: ContainerRegistryEventSource; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImagePushed + * event. + */ +export interface ContainerRegistryImagePushedEventData extends ContainerRegistryEventData { +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ImageDeleted + * event. + */ +export interface ContainerRegistryImageDeletedEventData extends ContainerRegistryEventData { +} + +/** + * The content of the event request message. + */ +export interface ContainerRegistryArtifactEventData { + /** + * The event ID. + */ + id?: string; + /** + * The time at which the event occurred. + */ + timestamp?: Date; + /** + * The action that encompasses the provided event. + */ + action?: string; + /** + * The target of the event. + */ + target?: ContainerRegistryArtifactEventTarget; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartPushed + * event. + */ +export interface ContainerRegistryChartPushedEventData extends ContainerRegistryArtifactEventData { +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.ContainerRegistry.ChartDeleted + * event. + */ +export interface ContainerRegistryChartDeletedEventData extends ContainerRegistryArtifactEventData { +} + +/** + * The target of the event. + */ +export interface ContainerRegistryEventTarget { + /** + * The MIME type of the referenced object. + */ + mediaType?: string; + /** + * The number of bytes of the content. Same as Length field. + */ + size?: number; + /** + * The digest of the content, as defined by the Registry V2 HTTP API Specification. + */ + digest?: string; + /** + * The number of bytes of the content. Same as Size field. + */ + length?: number; + /** + * The repository name. + */ + repository?: string; + /** + * The direct URL to the content. + */ + url?: string; + /** + * The tag name. + */ + tag?: string; +} + +/** + * The request that generated the event. + */ +export interface ContainerRegistryEventRequest { + /** + * The ID of the request that initiated the event. + */ + 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; + /** + * The externally accessible hostname of the registry instance, as specified by the http host + * header on incoming requests. + */ + host?: string; + /** + * The request method that generated the event. + */ + method?: string; + /** + * The user agent header of the request. + */ + 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; +} + +/** + * 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; + /** + * The running instance of an application. Changes after each restart. + */ + instanceID?: string; +} + +/** + * The target of the event. + */ +export interface ContainerRegistryArtifactEventTarget { + /** + * The MIME type of the artifact. + */ + mediaType?: string; + /** + * The size in bytes of the artifact. + */ + size?: number; + /** + * The digest of the artifact. + */ + digest?: string; + /** + * The repository name of the artifact. + */ + repository?: string; + /** + * The tag of the artifact. + */ + tag?: string; + /** + * The name of the artifact. + */ + name?: string; + /** + * The version of the artifact. + */ + 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; + /** + * The endpoint of the Microsoft.ServiceBus resource. + */ + requestUri?: string; + /** + * The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. + */ + 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; + /** + * The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this + * value will be null. + */ + 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; +} + +/** + * 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; + /** + * The endpoint of the Microsoft.ServiceBus resource. + */ + requestUri?: string; + /** + * The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. + */ + 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; + /** + * The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this + * value will be null. + */ + 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; +} + +/** + * 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; + /** + * The endpoint of the Microsoft.ServiceBus resource. + */ + requestUri?: string; + /** + * The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. + */ + 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; + /** + * The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this + * value will be null. + */ + 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; +} + +/** + * 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; + /** + * The endpoint of the Microsoft.ServiceBus resource. + */ + requestUri?: string; + /** + * The entity type of the Microsoft.ServiceBus resource. Could be one of 'queue' or 'subscriber'. + */ + 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; + /** + * The name of the Microsoft.ServiceBus topic. If the entity type is of type 'queue', then this + * value will be null. + */ + 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; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobStateChange event. + */ +export interface MediaJobStateChangeEventData { + /** + * The previous state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', + * 'Finished', 'Processing', 'Queued', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly previousState?: MediaJobState; + /** + * The new state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', + * 'Finished', 'Processing', 'Queued', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly state?: MediaJobState; + /** + * Gets the Job correlation data. + */ + correlationData?: { [propertyName: string]: string }; +} + +/** + * Details of JobOutput errors. + */ +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; + /** + * 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; +} + +/** + * Details of JobOutput errors. + */ +export interface MediaJobError { + /** + * Error code describing the error. Possible values include: 'ServiceError', + * 'ServiceTransientError', 'DownloadNotAccessible', 'DownloadTransientError', + * 'UploadNotAccessible', 'UploadTransientError', 'ConfigurationUnsupported', 'ContentMalformed', + * 'ContentUnsupported' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Helps with categorization of errors. Possible values include: 'Service', 'Download', 'Upload', + * 'Configuration', 'Content' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly category?: MediaJobErrorCategory; + /** + * Indicates that it may be possible to retry the Job. If retry is unsuccessful, please contact + * Azure support via Azure Portal. Possible values include: 'DoNotRetry', 'MayRetry' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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[]; +} + +/** + * Contains the possible cases for MediaJobOutput. + */ +export type MediaJobOutputUnion = MediaJobOutput | MediaJobOutputAsset; + +/** + * The event data for a Job output. + */ +export interface MediaJobOutput { + /** + * Polymorphic Discriminator + */ + odatatype: "MediaJobOutput"; + /** + * Gets the Job output error. + */ + error?: MediaJobError; + /** + * Gets the Job output label. + */ + label?: string; + /** + * Gets the Job output progress. + */ + progress: number; + /** + * Gets the Job output state. Possible values include: 'Canceled', 'Canceling', 'Error', + * 'Finished', 'Processing', 'Queued', 'Scheduled' + */ + state: MediaJobState; +} + +/** + * The event data for a Job output asset. + */ +export interface MediaJobOutputAsset { + /** + * Polymorphic Discriminator + */ + odatatype: "#Microsoft.Media.JobOutputAsset"; + /** + * Gets the Job output error. + */ + error?: MediaJobError; + /** + * Gets the Job output label. + */ + label?: string; + /** + * Gets the Job output progress. + */ + progress: number; + /** + * Gets the Job output state. Possible values include: 'Canceled', 'Canceling', 'Error', + * 'Finished', 'Processing', 'Queued', 'Scheduled' + */ + state: MediaJobState; + /** + * Gets the Job output asset name. + */ + assetName?: string; +} + +/** + * 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; + /** + * Gets the Job output progress. + */ + progress?: number; + /** + * Gets the Job correlation data. + */ + jobCorrelationData?: { [propertyName: string]: string }; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobOutputStateChange + * event. + */ +export interface MediaJobOutputStateChangeEventData { + /** + * The previous state of the Job. Possible values include: 'Canceled', 'Canceling', 'Error', + * 'Finished', 'Processing', 'Queued', 'Scheduled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly previousState?: MediaJobState; + /** + * Gets the output. + */ + output?: MediaJobOutputUnion; + /** + * Gets the Job correlation data. + */ + jobCorrelationData?: { [propertyName: string]: string }; +} + +/** + * Job scheduled event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobScheduled event. + */ +export interface MediaJobScheduledEventData extends MediaJobStateChangeEventData { +} + +/** + * Job processing event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobProcessing event. + */ +export interface MediaJobProcessingEventData extends MediaJobStateChangeEventData { +} + +/** + * Job canceling event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobCanceling event. + */ +export interface MediaJobCancelingEventData extends MediaJobStateChangeEventData { +} + +/** + * Job finished event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobFinished event. + */ +export interface MediaJobFinishedEventData extends MediaJobStateChangeEventData { + /** + * Gets the Job outputs. + */ + outputs?: MediaJobOutputUnion[]; +} + +/** + * Job canceled event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobCanceled event. + */ +export interface MediaJobCanceledEventData extends MediaJobStateChangeEventData { + /** + * Gets the Job outputs. + */ + outputs?: MediaJobOutputUnion[]; +} + +/** + * Job error state event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobErrored event. + */ +export interface MediaJobErroredEventData extends MediaJobStateChangeEventData { + /** + * Gets the Job outputs. + */ + outputs?: MediaJobOutputUnion[]; +} + +/** + * Job output canceled event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobOutputCanceled event. + */ +export interface MediaJobOutputCanceledEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output canceling event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobOutputCanceling event. + */ +export interface MediaJobOutputCancelingEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output error event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobOutputErrored event. + */ +export interface MediaJobOutputErroredEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output finished event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobOutputFinished event. + */ +export interface MediaJobOutputFinishedEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output processing event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobOutputProcessing event. + */ +export interface MediaJobOutputProcessingEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output scheduled event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.JobOutputScheduled event. + */ +export interface MediaJobOutputScheduledEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Encoder connect event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.LiveEventEncoderConnected event. + */ +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; + /** + * Gets the stream Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets the remote port. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly encoderPort?: string; +} + +/** + * Encoder connection rejected event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.LiveEventConnectionRejected event. + */ +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; + /** + * Gets the stream Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets the remote port. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; +} + +/** + * Encoder disconnected event data. Schema of the Data property of an EventGridEvent for a + * Microsoft.Media.LiveEventEncoderDisconnected event. + */ +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; + /** + * Gets the stream Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets the remote port. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; +} + +/** + * Encoder connect event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.LiveEventIncomingStreamReceived event. + */ +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; + /** + * 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; + /** + * Gets the track name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets the remote IP. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * 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; + /** + * 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; + /** + * 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; +} + +/** + * Incoming streams out of sync event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.LiveEventIncomingStreamsOutOfSync event. + */ +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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; +} + +/** + * Incoming video stream out of synch event data. Schema of the data property of an EventGridEvent + * for a Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync event. + */ +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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; +} + +/** + * Ingest fragment dropped event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.LiveEventIncomingDataChunkDropped event. + */ +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; + /** + * 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; + /** + * Gets the bitrate of the track. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * 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; + /** + * 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; +} + +/** + * Ingest fragment dropped event data. Schema of the data property of an EventGridEvent for a + * Microsoft.Media.LiveEventIngestHeartbeat event. + */ +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; + /** + * Gets the track name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets the incoming bitrate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly incomingBitrate?: number; + /** + * Gets the last timestamp. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets the fragment Overlap count. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * Gets Non increasing count. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * 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; + /** + * 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; +} + +/** + * Ingest track discontinuity detected event data. Schema of the data property of an EventGridEvent + * for a Microsoft.Media.LiveEventTrackDiscontinuityDetected event. + */ +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; + /** + * Gets the track name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly trackName?: string; + /** + * Gets the bitrate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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; + /** + * 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; + /** + * 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; + /** + * 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; +} + +/** + * Schema of the Data property of an EventGridEvent for a Geofence event (GeofenceEntered, + * GeofenceExited, GeofenceResult). + */ +export interface MapsGeofenceEventProperties { + /** + * Lists of the geometry ID of the geofence which is expired relative to the user time in the + * request. + */ + expiredGeofenceGeometryId?: string[]; + /** + * Lists the fence geometries that either fully contain the coordinate position or have an + * overlap with the searchBuffer around the fence. + */ + geometries?: MapsGeofenceGeometry[]; + /** + * Lists of the geometry ID of the geofence which is in invalid period relative to the user time + * in the request. + */ + invalidPeriodGeofenceGeometryId?: string[]; + /** + * 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; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceEntered event. + */ +export interface MapsGeofenceEnteredEventData extends MapsGeofenceEventProperties { +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceExited event. + */ +export interface MapsGeofenceExitedEventData extends MapsGeofenceEventProperties { +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Maps.GeofenceResult event. + */ +export interface MapsGeofenceResultEventData extends MapsGeofenceEventProperties { +} + +/** + * The geofence geometry. + */ +export interface MapsGeofenceGeometry { + /** + * ID of the device. + */ + 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; + /** + * The unique ID for the geofence geometry. + */ + geometryId?: string; + /** + * Latitude of the nearest point of the geometry. + */ + nearestLat?: number; + /** + * Longitude of the nearest point of the geometry. + */ + nearestLon?: number; + /** + * The unique id returned from user upload service when uploading a geofence. Will not be + * included in geofencing post API. + */ + 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; + /** + * The label, if any, used to identify the key-value that was modified. + */ + label?: string; + /** + * The etag representing the new state of the key-value. + */ + etag?: string; + /** + * The sync token representing the server state after the event. + */ + 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; + /** + * The label, if any, used to identify the key-value that was deleted. + */ + label?: string; + /** + * The etag representing the key-value that was deleted. + */ + etag?: string; + /** + * The sync token representing the server state after the event. + */ + 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?: Date; + /** + * The hub of connected client connection. + */ + hubName?: string; + /** + * The connection Id of connected client connection. + */ + connectionId?: string; + /** + * The user Id of connected client connection. + */ + 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?: Date; + /** + * The hub of connected client connection. + */ + hubName?: string; + /** + * The connection Id of connected client connection. + */ + connectionId?: string; + /** + * The user Id of connected client connection. + */ + userId?: string; + /** + * The message of error that cause the client connection disconnected. + */ + 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; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateNearExpiry + * event. + */ +export interface KeyVaultCertificateNearExpiryEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.CertificateExpired + * event. + */ +export interface KeyVaultCertificateExpiredEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyNewVersionCreated + * event. + */ +export interface KeyVaultKeyNewVersionCreatedEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyNearExpiry event. + */ +export interface KeyVaultKeyNearExpiryEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.KeyExpired event. + */ +export interface KeyVaultKeyExpiredEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.KeyVault.SecretNewVersionCreated event. + */ +export interface KeyVaultSecretNewVersionCreatedEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretNearExpiry + * event. + */ +export interface KeyVaultSecretNearExpiryEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.KeyVault.SecretExpired event. + */ +export interface KeyVaultSecretExpiredEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.KeyVault.VaultAccessPolicyChanged event. + */ +export interface KeyVaultVaultAccessPolicyChangedEventData { + /** + * The id of the object that triggered this event. + */ + id?: string; + /** + * Key vault name of the object that triggered this event. + */ + vaultName?: string; + /** + * The type of the object that triggered this event + */ + objectType?: string; + /** + * The name of the object that triggered this event + */ + objectName?: string; + /** + * The version of the object that triggered this event + */ + version?: string; + /** + * Not before date of the object that triggered this event + */ + nbf?: number; + /** + * The expiration date of the object that triggered this event + */ + exp?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.MachineLearningServices.ModelRegistered event. + */ +export interface MachineLearningServicesModelRegisteredEventData { + /** + * The name of the model that was registered. + */ + modelName?: string; + /** + * The version of the model that was registered. + */ + modelVersion?: string; + /** + * The tags of the model that was registered. + */ + modelTags?: any; + /** + * The properties of the model that was registered. + */ + modelProperties?: any; +} + +/** + * 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; + /** + * The compute type (e.g. ACI, AKS) of the deployed service. + */ + serviceComputeType?: string; + /** + * A common separated list of model IDs. The IDs of the models deployed in the service. + */ + modelIds?: string; + /** + * The tags of the deployed service. + */ + serviceTags?: any; + /** + * The properties of the deployed service. + */ + serviceProperties?: any; +} + +/** + * 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; + /** + * The name of the experiment that the run belongs to. + */ + experimentName?: string; + /** + * The ID of the Run that was completed. + */ + runId?: string; + /** + * The Run Type of the completed Run. + */ + runType?: string; + /** + * The tags of the completed Run. + */ + runTags?: any; + /** + * The properties of the completed Run. + */ + runProperties?: any; +} + +/** + * 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; + /** + * The name of the data drift monitor that triggered the event. + */ + dataDriftName?: string; + /** + * The ID of the Run that detected data drift. + */ + runId?: string; + /** + * The ID of the base Dataset used to detect drift. + */ + baseDatasetId?: string; + /** + * The ID of the target Dataset used to detect drift. + */ + targetDatasetId?: string; + /** + * The coefficient result that triggered the event. + */ + driftCoefficient?: number; + /** + * The start time of the target dataset time series that resulted in drift detection. + */ + startTime?: Date; + /** + * The end time of the target dataset time series that resulted in drift detection. + */ + 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; + /** + * The name of the experiment that the Machine Learning Run belongs to. + */ + experimentName?: string; + /** + * The ID of the Machine Learning Run. + */ + runId?: string; + /** + * The Run Type of the Machine Learning Run. + */ + runType?: string; + /** + * The tags of the Machine Learning Run. + */ + runTags?: any; + /** + * The properties of the Machine Learning Run. + */ + runProperties?: any; + /** + * The status of the Machine Learning Run. + */ + 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?: Date; + /** + * The name of this event. + */ + name?: string; + /** + * The status of this event. Failed or succeeded + */ + 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?: Date; + /** + * The name of this event. + */ + name?: string; + /** + * The status of this event. Failed or succeeded + */ + 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?: Date; + /** + * The name of this event. + */ + name?: string; + /** + * The status of this event. Failed or succeeded + */ + 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?: Date; + /** + * The name of this event. + */ + name?: string; + /** + * The status of this event. Failed or succeeded + */ + status?: string; +} + +/** + * Detail of action on the app. + */ +export interface AppEventTypeDetail { + /** + * Type of action of the operation. Possible values include: 'Restarted', 'Stopped', + * 'ChangedAppSettings', 'Started', 'Completed', 'Failed' + */ + action?: AppAction; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.AppUpdated event. + */ +export interface WebAppUpdatedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationStarted + * event. + */ +export interface WebBackupOperationStartedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationCompleted + * event. + */ +export interface WebBackupOperationCompletedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.BackupOperationFailed + * event. + */ +export interface WebBackupOperationFailedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationStarted + * event. + */ +export interface WebRestoreOperationStartedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationCompleted + * event. + */ +export interface WebRestoreOperationCompletedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.RestoreOperationFailed + * event. + */ +export interface WebRestoreOperationFailedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapStarted event. + */ +export interface WebSlotSwapStartedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapCompleted event. + */ +export interface WebSlotSwapCompletedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapFailed event. + */ +export interface WebSlotSwapFailedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.SlotSwapWithPreviewStarted + * event. + */ +export interface WebSlotSwapWithPreviewStartedEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Web.SlotSwapWithPreviewCancelled event. + */ +export interface WebSlotSwapWithPreviewCancelledEventData { + appEventTypeDetail?: AppEventTypeDetail; + /** + * name of the web site that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the site API operation that triggered + * this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the site API operation that + * triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the site API operation that triggered this + * event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Detail of action on the app service plan. + */ +export interface AppServicePlanEventTypeDetail { + /** + * Kind of environment where app service plan is. Possible values include: 'Public', 'AseV1', + * 'AseV2' + */ + stampKind?: StampKind; + /** + * Type of action on the app service plan. Possible values include: 'Updated' + */ + action?: AppServicePlanAction; + /** + * Possible values include: 'Started', 'Completed', 'Failed' + */ + status?: AsyncStatus; +} + +/** + * sku of app service plan. + */ +export interface WebAppServicePlanUpdatedEventDataSku { + /** + * name of app service plan sku. + */ + name?: string; + /** + * tier of app service plan sku. + */ + tier?: string; + /** + * size of app service plan sku. + */ + size?: string; + /** + * family of app service plan sku. + */ + family?: string; + /** + * capacity of app service plan sku. + */ + capacity?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Web.AppServicePlanUpdated + * event. + */ +export interface WebAppServicePlanUpdatedEventData { + appServicePlanEventTypeDetail?: AppServicePlanEventTypeDetail; + /** + * sku of app service plan. + */ + sku?: WebAppServicePlanUpdatedEventDataSku; + /** + * name of the app service plan that had this event. + */ + name?: string; + /** + * The client request id generated by the app service for the app service plan API operation that + * triggered this event. + */ + clientRequestId?: string; + /** + * The correlation request id generated by the app service for the app service plan API operation + * that triggered this event. + */ + correlationRequestId?: string; + /** + * The request id generated by the app service for the app service plan API operation that + * triggered this event. + */ + requestId?: string; + /** + * HTTP request URL of this operation. + */ + address?: string; + /** + * HTTP verb of this operation. + */ + verb?: string; +} + +/** + * Schema of common properties of all chat events + */ +export interface AcsChatEventBaseProperties { + /** + * The communication identifier of the target user + */ + recipientCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The transaction id will be used as co-relation vector + */ + transactionId?: string; + /** + * The chat thread id + */ + threadId?: string; +} + +/** + * Schema of common properties of all chat message events + */ +export interface AcsChatMessageEventBaseProperties extends AcsChatEventBaseProperties { + /** + * The chat message id + */ + messageId?: string; + /** + * The communication identifier of the sender + */ + senderCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The display name of the sender + */ + senderDisplayName?: string; + /** + * The original compose time of the message + */ + composeTime?: Date; + /** + * The type of the message + */ + type?: string; + /** + * The version of the message + */ + version?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatMessageReceived event. + */ +export interface AcsChatMessageReceivedEventData extends AcsChatMessageEventBaseProperties { + /** + * The body of the chat message + */ + messageBody?: string; + /** + * The chat message metadata + */ + metadata?: { [propertyName: string]: string }; +} + +/** + * Schema of common properties of all thread-level chat events + */ +export interface AcsChatEventInThreadBaseProperties { + /** + * The transaction id will be used as co-relation vector + */ + transactionId?: string; + /** + * The chat thread id + */ + threadId?: string; +} + +/** + * Schema of common properties of all thread-level chat message events + */ +export interface AcsChatMessageEventInThreadBaseProperties extends AcsChatEventInThreadBaseProperties { + /** + * The chat message id + */ + messageId?: string; + /** + * The communication identifier of the sender + */ + senderCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The display name of the sender + */ + senderDisplayName?: string; + /** + * The original compose time of the message + */ + composeTime?: Date; + /** + * The type of the message + */ + type?: string; + /** + * The version of the message + */ + version?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatMessageReceivedInThread event. + */ +export interface AcsChatMessageReceivedInThreadEventData extends AcsChatMessageEventInThreadBaseProperties { + /** + * The body of the chat message + */ + messageBody?: string; + /** + * The chat message metadata + */ + metadata?: { [propertyName: string]: string }; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatMessageEdited + * event. + */ +export interface AcsChatMessageEditedEventData extends AcsChatMessageEventBaseProperties { + /** + * The body of the chat message + */ + messageBody?: string; + /** + * The chat message metadata + */ + metadata?: { [propertyName: string]: string }; + /** + * The time at which the message was edited + */ + editTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatMessageEditedInThread event. + */ +export interface AcsChatMessageEditedInThreadEventData extends AcsChatMessageEventInThreadBaseProperties { + /** + * The body of the chat message + */ + messageBody?: string; + /** + * The chat message metadata + */ + metadata?: { [propertyName: string]: string }; + /** + * The time at which the message was edited + */ + editTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatMessageDeleted event. + */ +export interface AcsChatMessageDeletedEventData extends AcsChatMessageEventBaseProperties { + /** + * The time at which the message was deleted + */ + deleteTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatMessageDeletedInThread event. + */ +export interface AcsChatMessageDeletedInThreadEventData extends AcsChatMessageEventInThreadBaseProperties { + /** + * The time at which the message was deleted + */ + deleteTime?: Date; +} + +/** + * A user that got created with an Azure Communication Services resource. + */ +export interface CommunicationUserIdentifierModel { + /** + * The Id of the communication user. + */ + id: string; +} + +/** + * A phone number. + */ +export interface PhoneNumberIdentifierModel { + /** + * The phone number in E.164 format. + */ + value: string; +} + +/** + * A Microsoft Teams user. + */ +export interface MicrosoftTeamsUserIdentifierModel { + /** + * The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the user. + */ + userId: string; + /** + * True if the Microsoft Teams user is anonymous. By default false if missing. + */ + isAnonymous?: boolean; + /** + * The cloud that the Microsoft Teams user belongs to. By default 'public' if missing. Possible + * values include: 'public', 'dod', 'gcch' + */ + cloud?: CommunicationCloudEnvironmentModel; +} + +/** + * 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; + /** + * The communication user. + */ + communicationUser?: CommunicationUserIdentifierModel; + /** + * The phone number. + */ + phoneNumber?: PhoneNumberIdentifierModel; + /** + * The Microsoft Teams user. + */ + microsoftTeamsUser?: MicrosoftTeamsUserIdentifierModel; +} + +/** + * Schema of the chat thread participant + */ +export interface AcsChatThreadParticipantProperties { + /** + * The name of the user + */ + displayName?: string; + /** + * The communication identifier of the user + */ + participantCommunicationIdentifier?: CommunicationIdentifierModel; +} + +/** + * Schema of common properties of all chat thread events + */ +export interface AcsChatThreadEventBaseProperties extends AcsChatEventBaseProperties { + /** + * The original creation time of the thread + */ + createTime?: Date; + /** + * The version of the thread + */ + version?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatThreadCreatedWithUser event. + */ +export interface AcsChatThreadCreatedWithUserEventData extends AcsChatThreadEventBaseProperties { + /** + * The communication identifier of the user who created the thread + */ + createdByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The thread properties + */ + properties?: { [propertyName: string]: any }; + /** + * The list of properties of participants who are part of the thread + */ + participants?: AcsChatThreadParticipantProperties[]; +} + +/** + * Schema of common properties of all chat thread events + */ +export interface AcsChatThreadEventInThreadBaseProperties extends AcsChatEventInThreadBaseProperties { + /** + * The original creation time of the thread + */ + createTime?: Date; + /** + * The version of the thread + */ + version?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadCreated + * event. + */ +export interface AcsChatThreadCreatedEventData extends AcsChatThreadEventInThreadBaseProperties { + /** + * The communication identifier of the user who created the thread + */ + createdByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The thread properties + */ + properties?: { [propertyName: string]: any }; + /** + * The list of properties of participants who are part of the thread + */ + participants?: AcsChatThreadParticipantProperties[]; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatThreadWithUserDeleted event. + */ +export interface AcsChatThreadWithUserDeletedEventData extends AcsChatThreadEventBaseProperties { + /** + * The communication identifier of the user who deleted the thread + */ + deletedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The deletion time of the thread + */ + deleteTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatThreadDeleted + * event. + */ +export interface AcsChatThreadDeletedEventData extends AcsChatThreadEventInThreadBaseProperties { + /** + * The communication identifier of the user who deleted the thread + */ + deletedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The deletion time of the thread + */ + deleteTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser event. + */ +export interface AcsChatThreadPropertiesUpdatedPerUserEventData extends AcsChatThreadEventBaseProperties { + /** + * The communication identifier of the user who updated the thread properties + */ + editedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The time at which the properties of the thread were updated + */ + editTime?: Date; + /** + * The updated thread properties + */ + properties?: { [propertyName: string]: any }; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatThreadPropertiesUpdated event. + */ +export interface AcsChatThreadPropertiesUpdatedEventData extends AcsChatThreadEventInThreadBaseProperties { + /** + * The communication identifier of the user who updated the thread properties + */ + editedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The time at which the properties of the thread were updated + */ + editTime?: Date; + /** + * The updated thread properties + */ + properties?: { [propertyName: string]: any }; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatParticipantAddedToThreadWithUser event. + */ +export interface AcsChatParticipantAddedToThreadWithUserEventData extends AcsChatThreadEventBaseProperties { + /** + * The time at which the user was added to the thread + */ + time?: Date; + /** + * The communication identifier of the user who added the user + */ + addedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The details of the user who was added + */ + participantAdded?: AcsChatThreadParticipantProperties; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser event. + */ +export interface AcsChatParticipantRemovedFromThreadWithUserEventData extends AcsChatThreadEventBaseProperties { + /** + * The time at which the user was removed to the thread + */ + time?: Date; + /** + * The communication identifier of the user who removed the user + */ + removedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The details of the user who was removed + */ + participantRemoved?: AcsChatThreadParticipantProperties; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatThreadParticipantAdded event. + */ +export interface AcsChatParticipantAddedToThreadEventData extends AcsChatEventInThreadBaseProperties { + /** + * The time at which the user was added to the thread + */ + time?: Date; + /** + * The communication identifier of the user who added the user + */ + addedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The details of the user who was added + */ + participantAdded?: AcsChatThreadParticipantProperties; + /** + * The version of the thread + */ + version?: number; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.ChatThreadParticipantRemoved event. + */ +export interface AcsChatParticipantRemovedFromThreadEventData extends AcsChatEventInThreadBaseProperties { + /** + * The time at which the user was removed to the thread + */ + time?: Date; + /** + * The communication identifier of the user who removed the user + */ + removedByCommunicationIdentifier?: CommunicationIdentifierModel; + /** + * The details of the user who was removed + */ + participantRemoved?: AcsChatThreadParticipantProperties; + /** + * The version of the thread + */ + version?: number; +} + +/** + * Schema for details of a delivery attempt + */ +export interface AcsSmsDeliveryAttemptProperties { + /** + * TimeStamp when delivery was attempted + */ + timestamp?: Date; + /** + * Number of segments that were successfully delivered + */ + segmentsSucceeded?: number; + /** + * Number of segments whose delivery failed + */ + segmentsFailed?: number; +} + +/** + * Schema of common properties of all SMS events + */ +export interface AcsSmsEventBaseProperties { + /** + * The identity of the SMS message + */ + messageId?: string; + /** + * The identity of SMS message sender + */ + from?: string; + /** + * The identity of SMS message receiver + */ + to?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.SMSDeliveryReportReceived event. + */ +export interface AcsSmsDeliveryReportReceivedEventData extends AcsSmsEventBaseProperties { + /** + * Status of Delivery + */ + deliveryStatus?: string; + /** + * Details about Delivery Status + */ + deliveryStatusDetails?: string; + /** + * List of details of delivery attempts made + */ + deliveryAttempts?: AcsSmsDeliveryAttemptProperties[]; + /** + * The time at which the SMS delivery report was received + */ + receivedTimestamp?: Date; + /** + * Customer Content + */ + tag?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived + * event. + */ +export interface AcsSmsReceivedEventData extends AcsSmsEventBaseProperties { + /** + * The SMS content + */ + message?: string; + /** + * The time at which the SMS was received + */ + receivedTimestamp?: Date; +} + +/** + * Schema for all properties of Recording Chunk Information. + */ +export interface AcsRecordingChunkInfoProperties { + /** + * The documentId of the recording chunk + */ + documentId?: string; + /** + * The index of the recording chunk + */ + index?: number; + /** + * The reason for ending the recording chunk + */ + endReason?: string; + /** + * The location of the metadata for this chunk + */ + metadataLocation?: string; + /** + * The location of the content for this chunk + */ + contentLocation?: string; +} + +/** + * Schema for all properties of Recording Storage Information. + */ +export interface AcsRecordingStorageInfoProperties { + /** + * List of details of recording chunks information + */ + recordingChunks?: AcsRecordingChunkInfoProperties[]; +} + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Communication.RecordingFileStatusUpdated event. + */ +export interface AcsRecordingFileStatusUpdatedEventData { + /** + * The details of recording storage information + */ + recordingStorageInfo?: AcsRecordingStorageInfoProperties; + /** + * The time at which the recording started + */ + recordingStartTime?: Date; + /** + * The recording duration in milliseconds + */ + recordingDurationMs?: number; + /** + * The reason for ending recording session + */ + sessionEndReason?: 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?: Date; + /** + * The resource ID of the policy assignment. + */ + policyAssignmentId?: string; + /** + * The resource ID of the policy definition. + */ + 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; + /** + * The compliance state of the resource with respect to the policy assignment. + */ + complianceState?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The compliance reason code. May be empty. + */ + 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?: Date; + /** + * The resource ID of the policy assignment. + */ + policyAssignmentId?: string; + /** + * The resource ID of the policy definition. + */ + 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; + /** + * The compliance state of the resource with respect to the policy assignment. + */ + complianceState?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The compliance reason code. May be empty. + */ + 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?: Date; + /** + * The resource ID of the policy assignment. + */ + policyAssignmentId?: string; + /** + * The resource ID of the policy definition. + */ + 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; + /** + * The compliance state of the resource with respect to the policy assignment. + */ + complianceState?: string; + /** + * The subscription ID of the resource. + */ + subscriptionId?: string; + /** + * The compliance reason code. May be empty. + */ + complianceReasonCode?: string; +} + +/** + * Defines values for MediaJobState. + * Possible values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + * 'Scheduled' + * @readonly + * @enum {string} + */ +export type MediaJobState = 'Canceled' | 'Canceling' | 'Error' | 'Finished' | 'Processing' | 'Queued' | 'Scheduled'; + +/** + * Defines values for MediaJobErrorCode. + * Possible values include: 'ServiceError', 'ServiceTransientError', 'DownloadNotAccessible', + * 'DownloadTransientError', 'UploadNotAccessible', 'UploadTransientError', + * 'ConfigurationUnsupported', 'ContentMalformed', 'ContentUnsupported' + * @readonly + * @enum {string} + */ +export type MediaJobErrorCode = 'ServiceError' | 'ServiceTransientError' | 'DownloadNotAccessible' | 'DownloadTransientError' | 'UploadNotAccessible' | 'UploadTransientError' | 'ConfigurationUnsupported' | 'ContentMalformed' | 'ContentUnsupported'; + +/** + * Defines values for MediaJobErrorCategory. + * Possible values include: 'Service', 'Download', 'Upload', 'Configuration', 'Content' + * @readonly + * @enum {string} + */ +export type MediaJobErrorCategory = 'Service' | 'Download' | 'Upload' | 'Configuration' | 'Content'; + +/** + * Defines values for MediaJobRetry. + * Possible values include: 'DoNotRetry', 'MayRetry' + * @readonly + * @enum {string} + */ +export type MediaJobRetry = 'DoNotRetry' | 'MayRetry'; + +/** + * Defines values for AppAction. + * Possible values include: 'Restarted', 'Stopped', 'ChangedAppSettings', 'Started', 'Completed', + * 'Failed' + * @readonly + * @enum {string} + */ +export type AppAction = 'Restarted' | 'Stopped' | 'ChangedAppSettings' | 'Started' | 'Completed' | 'Failed'; + +/** + * Defines values for StampKind. + * Possible values include: 'Public', 'AseV1', 'AseV2' + * @readonly + * @enum {string} + */ +export type StampKind = 'Public' | 'AseV1' | 'AseV2'; + +/** + * Defines values for AppServicePlanAction. + * Possible values include: 'Updated' + * @readonly + * @enum {string} + */ +export type AppServicePlanAction = 'Updated'; + +/** + * Defines values for AsyncStatus. + * Possible values include: 'Started', 'Completed', 'Failed' + * @readonly + * @enum {string} + */ +export type AsyncStatus = 'Started' | 'Completed' | 'Failed'; + +/** + * Defines values for CommunicationCloudEnvironmentModel. + * Possible values include: 'public', 'dod', 'gcch' + * @readonly + * @enum {string} + */ +export type CommunicationCloudEnvironmentModel = 'public' | 'dod' | 'gcch'; diff --git a/sdk/eventgrid/eventgrid/src/models/mappers.ts b/sdk/eventgrid/eventgrid/src/models/mappers.ts new file mode 100644 index 000000000000..5f5dbb08cc50 --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/models/mappers.ts @@ -0,0 +1,6523 @@ +/* + * 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 { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; +import * as msRest from "@azure/ms-rest-js"; + +export const CloudError = CloudErrorMapper; +export const BaseResource = BaseResourceMapper; + +export const StorageBlobCreatedEventData: msRest.CompositeMapper = { + serializedName: "StorageBlobCreatedEventData", + type: { + name: "Composite", + className: "StorageBlobCreatedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "contentLength", + type: { + name: "Number" + } + }, + contentOffset: { + serializedName: "contentOffset", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "blobType", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageBlobDeletedEventData: msRest.CompositeMapper = { + serializedName: "StorageBlobDeletedEventData", + type: { + name: "Composite", + className: "StorageBlobDeletedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, + blobType: { + serializedName: "blobType", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageDirectoryCreatedEventData: msRest.CompositeMapper = { + serializedName: "StorageDirectoryCreatedEventData", + type: { + name: "Composite", + className: "StorageDirectoryCreatedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageDirectoryDeletedEventData: msRest.CompositeMapper = { + serializedName: "StorageDirectoryDeletedEventData", + type: { + name: "Composite", + className: "StorageDirectoryDeletedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + recursive: { + serializedName: "recursive", + type: { + name: "Boolean" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageBlobRenamedEventData: msRest.CompositeMapper = { + serializedName: "StorageBlobRenamedEventData", + type: { + name: "Composite", + className: "StorageBlobRenamedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + sourceUrl: { + serializedName: "sourceUrl", + type: { + name: "String" + } + }, + destinationUrl: { + serializedName: "destinationUrl", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageDirectoryRenamedEventData: msRest.CompositeMapper = { + serializedName: "StorageDirectoryRenamedEventData", + type: { + name: "Composite", + className: "StorageDirectoryRenamedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + sourceUrl: { + serializedName: "sourceUrl", + type: { + name: "String" + } + }, + destinationUrl: { + serializedName: "destinationUrl", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageLifecyclePolicyActionSummaryDetail: msRest.CompositeMapper = { + serializedName: "StorageLifecyclePolicyActionSummaryDetail", + type: { + name: "Composite", + className: "StorageLifecyclePolicyActionSummaryDetail", + modelProperties: { + totalObjectsCount: { + serializedName: "totalObjectsCount", + type: { + name: "Number" + } + }, + successCount: { + serializedName: "successCount", + type: { + name: "Number" + } + }, + errorList: { + serializedName: "errorList", + type: { + name: "String" + } + } + } + } +}; + +export const StorageLifecyclePolicyCompletedEventData: msRest.CompositeMapper = { + serializedName: "StorageLifecyclePolicyCompletedEventData", + type: { + name: "Composite", + className: "StorageLifecyclePolicyCompletedEventData", + modelProperties: { + scheduleTime: { + serializedName: "scheduleTime", + type: { + name: "String" + } + }, + deleteSummary: { + serializedName: "deleteSummary", + type: { + name: "Composite", + className: "StorageLifecyclePolicyActionSummaryDetail" + } + }, + tierToCoolSummary: { + serializedName: "tierToCoolSummary", + type: { + name: "Composite", + className: "StorageLifecyclePolicyActionSummaryDetail" + } + }, + tierToArchiveSummary: { + serializedName: "tierToArchiveSummary", + type: { + name: "Composite", + className: "StorageLifecyclePolicyActionSummaryDetail" + } + } + } + } +}; + +export const StorageBlobTierChangedEventData: msRest.CompositeMapper = { + serializedName: "StorageBlobTierChangedEventData", + type: { + name: "Composite", + className: "StorageBlobTierChangedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "contentLength", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "blobType", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageAsyncOperationInitiatedEventData: msRest.CompositeMapper = { + serializedName: "StorageAsyncOperationInitiatedEventData", + type: { + name: "Composite", + className: "StorageAsyncOperationInitiatedEventData", + modelProperties: { + api: { + serializedName: "api", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + contentType: { + serializedName: "contentType", + type: { + name: "String" + } + }, + contentLength: { + serializedName: "contentLength", + type: { + name: "Number" + } + }, + blobType: { + serializedName: "blobType", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + sequencer: { + serializedName: "sequencer", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + storageDiagnostics: { + serializedName: "storageDiagnostics", + type: { + name: "Object" + } + } + } + } +}; + +export const StorageBlobInventoryPolicyCompletedEventData: msRest.CompositeMapper = { + serializedName: "StorageBlobInventoryPolicyCompletedEventData", + type: { + name: "Composite", + className: "StorageBlobInventoryPolicyCompletedEventData", + modelProperties: { + scheduleDateTime: { + serializedName: "scheduleDateTime", + type: { + name: "DateTime" + } + }, + accountName: { + serializedName: "accountName", + type: { + name: "String" + } + }, + ruleName: { + serializedName: "ruleName", + type: { + name: "String" + } + }, + policyRunStatus: { + serializedName: "policyRunStatus", + type: { + name: "String" + } + }, + policyRunStatusMessage: { + serializedName: "policyRunStatusMessage", + type: { + name: "String" + } + }, + policyRunId: { + serializedName: "policyRunId", + type: { + name: "String" + } + }, + manifestBlobUrl: { + serializedName: "manifestBlobUrl", + type: { + name: "String" + } + } + } + } +}; + +export const EventHubCaptureFileCreatedEventData: msRest.CompositeMapper = { + serializedName: "EventHubCaptureFileCreatedEventData", + type: { + name: "Composite", + className: "EventHubCaptureFileCreatedEventData", + modelProperties: { + fileurl: { + serializedName: "fileurl", + type: { + name: "String" + } + }, + fileType: { + serializedName: "fileType", + type: { + name: "String" + } + }, + partitionId: { + serializedName: "partitionId", + type: { + name: "String" + } + }, + sizeInBytes: { + serializedName: "sizeInBytes", + type: { + name: "Number" + } + }, + eventCount: { + serializedName: "eventCount", + type: { + name: "Number" + } + }, + firstSequenceNumber: { + serializedName: "firstSequenceNumber", + type: { + name: "Number" + } + }, + lastSequenceNumber: { + serializedName: "lastSequenceNumber", + type: { + name: "Number" + } + }, + firstEnqueueTime: { + serializedName: "firstEnqueueTime", + type: { + name: "DateTime" + } + }, + lastEnqueueTime: { + serializedName: "lastEnqueueTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ResourceWriteSuccessData: msRest.CompositeMapper = { + serializedName: "ResourceWriteSuccessData", + type: { + name: "Composite", + className: "ResourceWriteSuccessData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceWriteFailureData: msRest.CompositeMapper = { + serializedName: "ResourceWriteFailureData", + type: { + name: "Composite", + className: "ResourceWriteFailureData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceWriteCancelData: msRest.CompositeMapper = { + serializedName: "ResourceWriteCancelData", + type: { + name: "Composite", + className: "ResourceWriteCancelData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceDeleteSuccessData: msRest.CompositeMapper = { + serializedName: "ResourceDeleteSuccessData", + type: { + name: "Composite", + className: "ResourceDeleteSuccessData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceDeleteFailureData: msRest.CompositeMapper = { + serializedName: "ResourceDeleteFailureData", + type: { + name: "Composite", + className: "ResourceDeleteFailureData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceDeleteCancelData: msRest.CompositeMapper = { + serializedName: "ResourceDeleteCancelData", + type: { + name: "Composite", + className: "ResourceDeleteCancelData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceActionSuccessData: msRest.CompositeMapper = { + serializedName: "ResourceActionSuccessData", + type: { + name: "Composite", + className: "ResourceActionSuccessData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceActionFailureData: msRest.CompositeMapper = { + serializedName: "ResourceActionFailureData", + type: { + name: "Composite", + className: "ResourceActionFailureData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceActionCancelData: msRest.CompositeMapper = { + serializedName: "ResourceActionCancelData", + type: { + name: "Composite", + className: "ResourceActionCancelData", + modelProperties: { + tenantId: { + serializedName: "tenantId", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + resourceGroup: { + serializedName: "resourceGroup", + type: { + name: "String" + } + }, + resourceProvider: { + serializedName: "resourceProvider", + type: { + name: "String" + } + }, + resourceUri: { + serializedName: "resourceUri", + type: { + name: "String" + } + }, + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + authorization: { + serializedName: "authorization", + type: { + name: "String" + } + }, + claims: { + serializedName: "claims", + type: { + name: "String" + } + }, + correlationId: { + serializedName: "correlationId", + type: { + name: "String" + } + }, + httpRequest: { + serializedName: "httpRequest", + type: { + name: "String" + } + } + } + } +}; + +export const EventGridEvent: msRest.CompositeMapper = { + serializedName: "EventGridEvent", + type: { + name: "Composite", + className: "EventGridEvent", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + topic: { + serializedName: "topic", + type: { + name: "String" + } + }, + subject: { + required: true, + serializedName: "subject", + type: { + name: "String" + } + }, + data: { + required: true, + serializedName: "data", + type: { + name: "Object" + } + }, + eventType: { + required: true, + serializedName: "eventType", + type: { + name: "String" + } + }, + eventTime: { + required: true, + serializedName: "eventTime", + type: { + name: "DateTime" + } + }, + metadataVersion: { + readOnly: true, + serializedName: "metadataVersion", + type: { + name: "String" + } + }, + dataVersion: { + required: true, + serializedName: "dataVersion", + type: { + name: "String" + } + } + } + } +}; + +export const CloudEventEvent: msRest.CompositeMapper = { + serializedName: "CloudEventEvent", + type: { + name: "Composite", + className: "CloudEventEvent", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + source: { + required: true, + serializedName: "source", + type: { + name: "String" + } + }, + data: { + serializedName: "data", + type: { + name: "Object" + } + }, + dataBase64: { + serializedName: "data_base64", + type: { + name: "ByteArray" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "String" + } + }, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + specversion: { + required: true, + serializedName: "specversion", + type: { + name: "String" + } + }, + dataschema: { + serializedName: "dataschema", + type: { + name: "String" + } + }, + datacontenttype: { + serializedName: "datacontenttype", + type: { + name: "String" + } + }, + subject: { + serializedName: "subject", + type: { + name: "String" + } + } + }, + additionalProperties: { + type: { + name: "Object" + } + } + } +}; + +export const SubscriptionValidationEventData: msRest.CompositeMapper = { + serializedName: "SubscriptionValidationEventData", + type: { + name: "Composite", + className: "SubscriptionValidationEventData", + modelProperties: { + validationCode: { + readOnly: true, + serializedName: "validationCode", + type: { + name: "String" + } + }, + validationUrl: { + readOnly: true, + serializedName: "validationUrl", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionValidationResponse: msRest.CompositeMapper = { + serializedName: "SubscriptionValidationResponse", + type: { + name: "Composite", + className: "SubscriptionValidationResponse", + modelProperties: { + validationResponse: { + serializedName: "validationResponse", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionDeletedEventData: msRest.CompositeMapper = { + serializedName: "SubscriptionDeletedEventData", + type: { + name: "Composite", + className: "SubscriptionDeletedEventData", + modelProperties: { + eventSubscriptionId: { + readOnly: true, + serializedName: "eventSubscriptionId", + type: { + name: "String" + } + } + } + } +}; + +export const DeviceLifeCycleEventProperties: msRest.CompositeMapper = { + serializedName: "DeviceLifeCycleEventProperties", + type: { + name: "Composite", + className: "DeviceLifeCycleEventProperties", + modelProperties: { + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + }, + hubName: { + serializedName: "hubName", + type: { + name: "String" + } + }, + twin: { + serializedName: "twin", + type: { + name: "Composite", + className: "DeviceTwinInfo" + } + } + } + } +}; + +export const IotHubDeviceCreatedEventData: msRest.CompositeMapper = { + serializedName: "IotHubDeviceCreatedEventData", + type: { + name: "Composite", + className: "IotHubDeviceCreatedEventData", + modelProperties: { + ...DeviceLifeCycleEventProperties.type.modelProperties + } + } +}; + +export const IotHubDeviceDeletedEventData: msRest.CompositeMapper = { + serializedName: "IotHubDeviceDeletedEventData", + type: { + name: "Composite", + className: "IotHubDeviceDeletedEventData", + modelProperties: { + ...DeviceLifeCycleEventProperties.type.modelProperties + } + } +}; + +export const DeviceConnectionStateEventProperties: msRest.CompositeMapper = { + serializedName: "DeviceConnectionStateEventProperties", + type: { + name: "Composite", + className: "DeviceConnectionStateEventProperties", + modelProperties: { + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + }, + moduleId: { + serializedName: "moduleId", + type: { + name: "String" + } + }, + hubName: { + serializedName: "hubName", + type: { + name: "String" + } + }, + deviceConnectionStateEventInfo: { + serializedName: "deviceConnectionStateEventInfo", + type: { + name: "Composite", + className: "DeviceConnectionStateEventInfo" + } + } + } + } +}; + +export const IotHubDeviceConnectedEventData: msRest.CompositeMapper = { + serializedName: "IotHubDeviceConnectedEventData", + type: { + name: "Composite", + className: "IotHubDeviceConnectedEventData", + modelProperties: { + ...DeviceConnectionStateEventProperties.type.modelProperties + } + } +}; + +export const IotHubDeviceDisconnectedEventData: msRest.CompositeMapper = { + serializedName: "IotHubDeviceDisconnectedEventData", + type: { + name: "Composite", + className: "IotHubDeviceDisconnectedEventData", + modelProperties: { + ...DeviceConnectionStateEventProperties.type.modelProperties + } + } +}; + +export const DeviceTelemetryEventProperties: msRest.CompositeMapper = { + serializedName: "DeviceTelemetryEventProperties", + type: { + name: "Composite", + className: "DeviceTelemetryEventProperties", + modelProperties: { + body: { + serializedName: "body", + type: { + name: "Object" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + systemProperties: { + serializedName: "systemProperties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IotHubDeviceTelemetryEventData: msRest.CompositeMapper = { + serializedName: "IotHubDeviceTelemetryEventData", + type: { + name: "Composite", + className: "IotHubDeviceTelemetryEventData", + modelProperties: { + ...DeviceTelemetryEventProperties.type.modelProperties + } + } +}; + +export const DeviceTwinMetadata: msRest.CompositeMapper = { + serializedName: "DeviceTwinMetadata", + type: { + name: "Composite", + className: "DeviceTwinMetadata", + modelProperties: { + lastUpdated: { + serializedName: "lastUpdated", + type: { + name: "String" + } + } + } + } +}; + +export const DeviceTwinProperties: msRest.CompositeMapper = { + serializedName: "DeviceTwinProperties", + type: { + name: "Composite", + className: "DeviceTwinProperties", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "DeviceTwinMetadata" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const DeviceTwinInfoProperties: msRest.CompositeMapper = { + serializedName: "DeviceTwinInfo_properties", + type: { + name: "Composite", + className: "DeviceTwinInfoProperties", + modelProperties: { + desired: { + serializedName: "desired", + type: { + name: "Composite", + className: "DeviceTwinProperties" + } + }, + reported: { + serializedName: "reported", + type: { + name: "Composite", + className: "DeviceTwinProperties" + } + } + } + } +}; + +export const DeviceTwinInfoX509Thumbprint: msRest.CompositeMapper = { + serializedName: "DeviceTwinInfo_x509Thumbprint", + type: { + name: "Composite", + className: "DeviceTwinInfoX509Thumbprint", + modelProperties: { + primaryThumbprint: { + serializedName: "primaryThumbprint", + type: { + name: "String" + } + }, + secondaryThumbprint: { + serializedName: "secondaryThumbprint", + type: { + name: "String" + } + } + } + } +}; + +export const DeviceTwinInfo: msRest.CompositeMapper = { + serializedName: "DeviceTwinInfo", + type: { + name: "Composite", + className: "DeviceTwinInfo", + modelProperties: { + authenticationType: { + serializedName: "authenticationType", + type: { + name: "String" + } + }, + cloudToDeviceMessageCount: { + serializedName: "cloudToDeviceMessageCount", + type: { + name: "Number" + } + }, + connectionState: { + serializedName: "connectionState", + type: { + name: "String" + } + }, + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + lastActivityTime: { + serializedName: "lastActivityTime", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DeviceTwinInfoProperties" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + statusUpdateTime: { + serializedName: "statusUpdateTime", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + }, + x509Thumbprint: { + serializedName: "x509Thumbprint", + type: { + name: "Composite", + className: "DeviceTwinInfoX509Thumbprint" + } + } + } + } +}; + +export const DeviceConnectionStateEventInfo: msRest.CompositeMapper = { + serializedName: "DeviceConnectionStateEventInfo", + type: { + name: "Composite", + className: "DeviceConnectionStateEventInfo", + modelProperties: { + sequenceNumber: { + serializedName: "sequenceNumber", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryEventData", + type: { + name: "Composite", + className: "ContainerRegistryEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "Composite", + className: "ContainerRegistryEventTarget" + } + }, + request: { + serializedName: "request", + type: { + name: "Composite", + className: "ContainerRegistryEventRequest" + } + }, + actor: { + serializedName: "actor", + type: { + name: "Composite", + className: "ContainerRegistryEventActor" + } + }, + source: { + serializedName: "source", + type: { + name: "Composite", + className: "ContainerRegistryEventSource" + } + } + } + } +}; + +export const ContainerRegistryImagePushedEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryImagePushedEventData", + type: { + name: "Composite", + className: "ContainerRegistryImagePushedEventData", + modelProperties: { + ...ContainerRegistryEventData.type.modelProperties + } + } +}; + +export const ContainerRegistryImageDeletedEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryImageDeletedEventData", + type: { + name: "Composite", + className: "ContainerRegistryImageDeletedEventData", + modelProperties: { + ...ContainerRegistryEventData.type.modelProperties + } + } +}; + +export const ContainerRegistryArtifactEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryArtifactEventData", + type: { + name: "Composite", + className: "ContainerRegistryArtifactEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "Composite", + className: "ContainerRegistryArtifactEventTarget" + } + } + } + } +}; + +export const ContainerRegistryChartPushedEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryChartPushedEventData", + type: { + name: "Composite", + className: "ContainerRegistryChartPushedEventData", + modelProperties: { + ...ContainerRegistryArtifactEventData.type.modelProperties + } + } +}; + +export const ContainerRegistryChartDeletedEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryChartDeletedEventData", + type: { + name: "Composite", + className: "ContainerRegistryChartDeletedEventData", + modelProperties: { + ...ContainerRegistryArtifactEventData.type.modelProperties + } + } +}; + +export const ContainerRegistryEventTarget: msRest.CompositeMapper = { + serializedName: "ContainerRegistryEventTarget", + type: { + name: "Composite", + className: "ContainerRegistryEventTarget", + modelProperties: { + mediaType: { + serializedName: "mediaType", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "Number" + } + }, + digest: { + serializedName: "digest", + type: { + name: "String" + } + }, + length: { + serializedName: "length", + type: { + name: "Number" + } + }, + repository: { + serializedName: "repository", + type: { + name: "String" + } + }, + url: { + serializedName: "url", + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryEventRequest: msRest.CompositeMapper = { + serializedName: "ContainerRegistryEventRequest", + type: { + name: "Composite", + className: "ContainerRegistryEventRequest", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + addr: { + serializedName: "addr", + type: { + name: "String" + } + }, + host: { + serializedName: "host", + type: { + name: "String" + } + }, + method: { + serializedName: "method", + type: { + name: "String" + } + }, + useragent: { + serializedName: "useragent", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryEventActor: msRest.CompositeMapper = { + serializedName: "ContainerRegistryEventActor", + type: { + name: "Composite", + className: "ContainerRegistryEventActor", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryEventSource: msRest.CompositeMapper = { + serializedName: "ContainerRegistryEventSource", + type: { + name: "Composite", + className: "ContainerRegistryEventSource", + modelProperties: { + addr: { + serializedName: "addr", + type: { + name: "String" + } + }, + instanceID: { + serializedName: "instanceID", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerRegistryArtifactEventTarget: msRest.CompositeMapper = { + serializedName: "ContainerRegistryArtifactEventTarget", + type: { + name: "Composite", + className: "ContainerRegistryArtifactEventTarget", + modelProperties: { + mediaType: { + serializedName: "mediaType", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "Number" + } + }, + digest: { + serializedName: "digest", + type: { + name: "String" + } + }, + repository: { + serializedName: "repository", + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceBusActiveMessagesAvailableWithNoListenersEventData: msRest.CompositeMapper = { + serializedName: "ServiceBusActiveMessagesAvailableWithNoListenersEventData", + type: { + name: "Composite", + className: "ServiceBusActiveMessagesAvailableWithNoListenersEventData", + modelProperties: { + namespaceName: { + serializedName: "namespaceName", + type: { + name: "String" + } + }, + requestUri: { + serializedName: "requestUri", + type: { + name: "String" + } + }, + entityType: { + serializedName: "entityType", + type: { + name: "String" + } + }, + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + topicName: { + serializedName: "topicName", + type: { + name: "String" + } + }, + subscriptionName: { + serializedName: "subscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceBusDeadletterMessagesAvailableWithNoListenersEventData: msRest.CompositeMapper = { + serializedName: "ServiceBusDeadletterMessagesAvailableWithNoListenersEventData", + type: { + name: "Composite", + className: "ServiceBusDeadletterMessagesAvailableWithNoListenersEventData", + modelProperties: { + namespaceName: { + serializedName: "namespaceName", + type: { + name: "String" + } + }, + requestUri: { + serializedName: "requestUri", + type: { + name: "String" + } + }, + entityType: { + serializedName: "entityType", + type: { + name: "String" + } + }, + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + topicName: { + serializedName: "topicName", + type: { + name: "String" + } + }, + subscriptionName: { + serializedName: "subscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData: msRest.CompositeMapper = { + serializedName: "ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData", + type: { + name: "Composite", + className: "ServiceBusActiveMessagesAvailablePeriodicNotificationsEventData", + modelProperties: { + namespaceName: { + serializedName: "namespaceName", + type: { + name: "String" + } + }, + requestUri: { + serializedName: "requestUri", + type: { + name: "String" + } + }, + entityType: { + serializedName: "entityType", + type: { + name: "String" + } + }, + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + topicName: { + serializedName: "topicName", + type: { + name: "String" + } + }, + subscriptionName: { + serializedName: "subscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData: msRest.CompositeMapper = { + serializedName: "ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData", + type: { + name: "Composite", + className: "ServiceBusDeadletterMessagesAvailablePeriodicNotificationsEventData", + modelProperties: { + namespaceName: { + serializedName: "namespaceName", + type: { + name: "String" + } + }, + requestUri: { + serializedName: "requestUri", + type: { + name: "String" + } + }, + entityType: { + serializedName: "entityType", + type: { + name: "String" + } + }, + queueName: { + serializedName: "queueName", + type: { + name: "String" + } + }, + topicName: { + serializedName: "topicName", + type: { + name: "String" + } + }, + subscriptionName: { + serializedName: "subscriptionName", + type: { + name: "String" + } + } + } + } +}; + +export const MediaJobStateChangeEventData: msRest.CompositeMapper = { + serializedName: "MediaJobStateChangeEventData", + type: { + name: "Composite", + className: "MediaJobStateChangeEventData", + modelProperties: { + previousState: { + nullable: false, + readOnly: true, + serializedName: "previousState", + type: { + name: "Enum", + allowedValues: [ + "Canceled", + "Canceling", + "Error", + "Finished", + "Processing", + "Queued", + "Scheduled" + ] + } + }, + state: { + nullable: false, + readOnly: true, + serializedName: "state", + type: { + name: "Enum", + allowedValues: [ + "Canceled", + "Canceling", + "Error", + "Finished", + "Processing", + "Queued", + "Scheduled" + ] + } + }, + correlationData: { + serializedName: "correlationData", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MediaJobErrorDetail: msRest.CompositeMapper = { + serializedName: "MediaJobErrorDetail", + type: { + name: "Composite", + className: "MediaJobErrorDetail", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const MediaJobError: msRest.CompositeMapper = { + serializedName: "MediaJobError", + type: { + name: "Composite", + className: "MediaJobError", + modelProperties: { + code: { + nullable: false, + readOnly: true, + serializedName: "code", + type: { + name: "Enum", + allowedValues: [ + "ServiceError", + "ServiceTransientError", + "DownloadNotAccessible", + "DownloadTransientError", + "UploadNotAccessible", + "UploadTransientError", + "ConfigurationUnsupported", + "ContentMalformed", + "ContentUnsupported" + ] + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + category: { + nullable: false, + readOnly: true, + serializedName: "category", + type: { + name: "Enum", + allowedValues: [ + "Service", + "Download", + "Upload", + "Configuration", + "Content" + ] + } + }, + retry: { + nullable: false, + readOnly: true, + serializedName: "retry", + type: { + name: "Enum", + allowedValues: [ + "DoNotRetry", + "MayRetry" + ] + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MediaJobErrorDetail" + } + } + } + } + } + } +}; + +export const MediaJobOutput: msRest.CompositeMapper = { + serializedName: "MediaJobOutput", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "MediaJobOutput", + className: "MediaJobOutput", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "MediaJobError" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + progress: { + required: true, + serializedName: "progress", + type: { + name: "Number" + } + }, + state: { + required: true, + serializedName: "state", + type: { + name: "Enum", + allowedValues: [ + "Canceled", + "Canceling", + "Error", + "Finished", + "Processing", + "Queued", + "Scheduled" + ] + } + }, + odatatype: { + required: true, + serializedName: "@odata\\.type", + type: { + name: "String" + } + } + } + } +}; + +export const MediaJobOutputAsset: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputAsset", + type: { + name: "Composite", + polymorphicDiscriminator: MediaJobOutput.type.polymorphicDiscriminator, + uberParent: "MediaJobOutput", + className: "MediaJobOutputAsset", + modelProperties: { + ...MediaJobOutput.type.modelProperties, + assetName: { + serializedName: "assetName", + type: { + name: "String" + } + } + } + } +}; + +export const MediaJobOutputProgressEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputProgress", + type: { + name: "Composite", + className: "MediaJobOutputProgressEventData", + modelProperties: { + label: { + serializedName: "label", + type: { + name: "String" + } + }, + progress: { + serializedName: "progress", + type: { + name: "Number" + } + }, + jobCorrelationData: { + serializedName: "jobCorrelationData", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MediaJobOutputStateChangeEventData: msRest.CompositeMapper = { + serializedName: "MediaJobOutputStateChangeEventData", + type: { + name: "Composite", + className: "MediaJobOutputStateChangeEventData", + modelProperties: { + previousState: { + nullable: false, + readOnly: true, + serializedName: "previousState", + type: { + name: "Enum", + allowedValues: [ + "Canceled", + "Canceling", + "Error", + "Finished", + "Processing", + "Queued", + "Scheduled" + ] + } + }, + output: { + serializedName: "output", + type: { + name: "Composite", + className: "MediaJobOutput" + } + }, + jobCorrelationData: { + serializedName: "jobCorrelationData", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const MediaJobScheduledEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobScheduled", + type: { + name: "Composite", + className: "MediaJobScheduledEventData", + modelProperties: { + ...MediaJobStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobProcessingEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobProcessing", + type: { + name: "Composite", + className: "MediaJobProcessingEventData", + modelProperties: { + ...MediaJobStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobCancelingEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobCanceling", + type: { + name: "Composite", + className: "MediaJobCancelingEventData", + modelProperties: { + ...MediaJobStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobFinishedEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobFinished", + type: { + name: "Composite", + className: "MediaJobFinishedEventData", + modelProperties: { + ...MediaJobStateChangeEventData.type.modelProperties, + outputs: { + serializedName: "outputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MediaJobOutput" + } + } + } + } + } + } +}; + +export const MediaJobCanceledEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobCanceled", + type: { + name: "Composite", + className: "MediaJobCanceledEventData", + modelProperties: { + ...MediaJobStateChangeEventData.type.modelProperties, + outputs: { + serializedName: "outputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MediaJobOutput" + } + } + } + } + } + } +}; + +export const MediaJobErroredEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobErrored", + type: { + name: "Composite", + className: "MediaJobErroredEventData", + modelProperties: { + ...MediaJobStateChangeEventData.type.modelProperties, + outputs: { + serializedName: "outputs", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MediaJobOutput" + } + } + } + } + } + } +}; + +export const MediaJobOutputCanceledEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputCanceled", + type: { + name: "Composite", + className: "MediaJobOutputCanceledEventData", + modelProperties: { + ...MediaJobOutputStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobOutputCancelingEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputCanceling", + type: { + name: "Composite", + className: "MediaJobOutputCancelingEventData", + modelProperties: { + ...MediaJobOutputStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobOutputErroredEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputErrored", + type: { + name: "Composite", + className: "MediaJobOutputErroredEventData", + modelProperties: { + ...MediaJobOutputStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobOutputFinishedEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputFinished", + type: { + name: "Composite", + className: "MediaJobOutputFinishedEventData", + modelProperties: { + ...MediaJobOutputStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobOutputProcessingEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputProcessing", + type: { + name: "Composite", + className: "MediaJobOutputProcessingEventData", + modelProperties: { + ...MediaJobOutputStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaJobOutputScheduledEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputScheduled", + type: { + name: "Composite", + className: "MediaJobOutputScheduledEventData", + modelProperties: { + ...MediaJobOutputStateChangeEventData.type.modelProperties + } + } +}; + +export const MediaLiveEventEncoderConnectedEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventEncoderConnectedEventData", + type: { + name: "Composite", + className: "MediaLiveEventEncoderConnectedEventData", + modelProperties: { + ingestUrl: { + readOnly: true, + serializedName: "ingestUrl", + type: { + name: "String" + } + }, + streamId: { + readOnly: true, + serializedName: "streamId", + type: { + name: "String" + } + }, + encoderIp: { + readOnly: true, + serializedName: "encoderIp", + type: { + name: "String" + } + }, + encoderPort: { + readOnly: true, + serializedName: "encoderPort", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventConnectionRejectedEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventConnectionRejectedEventData", + type: { + name: "Composite", + className: "MediaLiveEventConnectionRejectedEventData", + modelProperties: { + ingestUrl: { + readOnly: true, + serializedName: "ingestUrl", + type: { + name: "String" + } + }, + streamId: { + readOnly: true, + serializedName: "streamId", + type: { + name: "String" + } + }, + encoderIp: { + readOnly: true, + serializedName: "encoderIp", + type: { + name: "String" + } + }, + encoderPort: { + readOnly: true, + serializedName: "encoderPort", + type: { + name: "String" + } + }, + resultCode: { + readOnly: true, + serializedName: "resultCode", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventEncoderDisconnectedEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventEncoderDisconnectedEventData", + type: { + name: "Composite", + className: "MediaLiveEventEncoderDisconnectedEventData", + modelProperties: { + ingestUrl: { + readOnly: true, + serializedName: "ingestUrl", + type: { + name: "String" + } + }, + streamId: { + readOnly: true, + serializedName: "streamId", + type: { + name: "String" + } + }, + encoderIp: { + readOnly: true, + serializedName: "encoderIp", + type: { + name: "String" + } + }, + encoderPort: { + readOnly: true, + serializedName: "encoderPort", + type: { + name: "String" + } + }, + resultCode: { + readOnly: true, + serializedName: "resultCode", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventIncomingStreamReceivedEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventIncomingStreamReceivedEventData", + type: { + name: "Composite", + className: "MediaLiveEventIncomingStreamReceivedEventData", + modelProperties: { + ingestUrl: { + readOnly: true, + serializedName: "ingestUrl", + type: { + name: "String" + } + }, + trackType: { + readOnly: true, + serializedName: "trackType", + type: { + name: "String" + } + }, + trackName: { + readOnly: true, + serializedName: "trackName", + type: { + name: "String" + } + }, + bitrate: { + readOnly: true, + serializedName: "bitrate", + type: { + name: "Number" + } + }, + encoderIp: { + readOnly: true, + serializedName: "encoderIp", + type: { + name: "String" + } + }, + encoderPort: { + readOnly: true, + serializedName: "encoderPort", + type: { + name: "String" + } + }, + timestamp: { + readOnly: true, + serializedName: "timestamp", + type: { + name: "String" + } + }, + duration: { + readOnly: true, + serializedName: "duration", + type: { + name: "String" + } + }, + timescale: { + readOnly: true, + serializedName: "timescale", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventIncomingStreamsOutOfSyncEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventIncomingStreamsOutOfSyncEventData", + type: { + name: "Composite", + className: "MediaLiveEventIncomingStreamsOutOfSyncEventData", + modelProperties: { + minLastTimestamp: { + readOnly: true, + serializedName: "minLastTimestamp", + type: { + name: "String" + } + }, + typeOfStreamWithMinLastTimestamp: { + readOnly: true, + serializedName: "typeOfStreamWithMinLastTimestamp", + type: { + name: "String" + } + }, + maxLastTimestamp: { + readOnly: true, + serializedName: "maxLastTimestamp", + type: { + name: "String" + } + }, + typeOfStreamWithMaxLastTimestamp: { + readOnly: true, + serializedName: "typeOfStreamWithMaxLastTimestamp", + type: { + name: "String" + } + }, + timescaleOfMinLastTimestamp: { + readOnly: true, + serializedName: "timescaleOfMinLastTimestamp", + type: { + name: "String" + } + }, + timescaleOfMaxLastTimestamp: { + readOnly: true, + serializedName: "timescaleOfMaxLastTimestamp", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventIncomingVideoStreamsOutOfSyncEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventIncomingVideoStreamsOutOfSyncEventData", + type: { + name: "Composite", + className: "MediaLiveEventIncomingVideoStreamsOutOfSyncEventData", + modelProperties: { + firstTimestamp: { + readOnly: true, + serializedName: "firstTimestamp", + type: { + name: "String" + } + }, + firstDuration: { + readOnly: true, + serializedName: "firstDuration", + type: { + name: "String" + } + }, + secondTimestamp: { + readOnly: true, + serializedName: "secondTimestamp", + type: { + name: "String" + } + }, + secondDuration: { + readOnly: true, + serializedName: "secondDuration", + type: { + name: "String" + } + }, + timescale: { + readOnly: true, + serializedName: "timescale", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventIncomingDataChunkDroppedEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventIncomingDataChunkDroppedEventData", + type: { + name: "Composite", + className: "MediaLiveEventIncomingDataChunkDroppedEventData", + modelProperties: { + timestamp: { + readOnly: true, + serializedName: "timestamp", + type: { + name: "String" + } + }, + trackType: { + readOnly: true, + serializedName: "trackType", + type: { + name: "String" + } + }, + bitrate: { + readOnly: true, + serializedName: "bitrate", + type: { + name: "Number" + } + }, + timescale: { + readOnly: true, + serializedName: "timescale", + type: { + name: "String" + } + }, + resultCode: { + readOnly: true, + serializedName: "resultCode", + type: { + name: "String" + } + }, + trackName: { + readOnly: true, + serializedName: "trackName", + type: { + name: "String" + } + } + } + } +}; + +export const MediaLiveEventIngestHeartbeatEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventIngestHeartbeatEventData", + type: { + name: "Composite", + className: "MediaLiveEventIngestHeartbeatEventData", + modelProperties: { + trackType: { + readOnly: true, + serializedName: "trackType", + type: { + name: "String" + } + }, + trackName: { + readOnly: true, + serializedName: "trackName", + type: { + name: "String" + } + }, + bitrate: { + readOnly: true, + serializedName: "bitrate", + type: { + name: "Number" + } + }, + incomingBitrate: { + readOnly: true, + serializedName: "incomingBitrate", + type: { + name: "Number" + } + }, + lastTimestamp: { + readOnly: true, + serializedName: "lastTimestamp", + type: { + name: "String" + } + }, + timescale: { + readOnly: true, + serializedName: "timescale", + type: { + name: "String" + } + }, + overlapCount: { + readOnly: true, + serializedName: "overlapCount", + type: { + name: "Number" + } + }, + discontinuityCount: { + readOnly: true, + serializedName: "discontinuityCount", + type: { + name: "Number" + } + }, + nonincreasingCount: { + readOnly: true, + serializedName: "nonincreasingCount", + type: { + name: "Number" + } + }, + unexpectedBitrate: { + readOnly: true, + serializedName: "unexpectedBitrate", + type: { + name: "Boolean" + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + }, + healthy: { + readOnly: true, + serializedName: "healthy", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MediaLiveEventTrackDiscontinuityDetectedEventData: msRest.CompositeMapper = { + serializedName: "MediaLiveEventTrackDiscontinuityDetectedEventData", + type: { + name: "Composite", + className: "MediaLiveEventTrackDiscontinuityDetectedEventData", + modelProperties: { + trackType: { + readOnly: true, + serializedName: "trackType", + type: { + name: "String" + } + }, + trackName: { + readOnly: true, + serializedName: "trackName", + type: { + name: "String" + } + }, + bitrate: { + readOnly: true, + serializedName: "bitrate", + type: { + name: "Number" + } + }, + previousTimestamp: { + readOnly: true, + serializedName: "previousTimestamp", + type: { + name: "String" + } + }, + newTimestamp: { + readOnly: true, + serializedName: "newTimestamp", + type: { + name: "String" + } + }, + timescale: { + readOnly: true, + serializedName: "timescale", + type: { + name: "String" + } + }, + discontinuityGap: { + readOnly: true, + serializedName: "discontinuityGap", + type: { + name: "String" + } + } + } + } +}; + +export const MapsGeofenceEventProperties: msRest.CompositeMapper = { + serializedName: "MapsGeofenceEventProperties", + type: { + name: "Composite", + className: "MapsGeofenceEventProperties", + modelProperties: { + expiredGeofenceGeometryId: { + serializedName: "expiredGeofenceGeometryId", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + geometries: { + serializedName: "geometries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MapsGeofenceGeometry" + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + serializedName: "invalidPeriodGeofenceGeometryId", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isEventPublished: { + serializedName: "isEventPublished", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MapsGeofenceEnteredEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceEnteredEventData", + type: { + name: "Composite", + className: "MapsGeofenceEnteredEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceExitedEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceExitedEventData", + type: { + name: "Composite", + className: "MapsGeofenceExitedEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceResultEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceResultEventData", + type: { + name: "Composite", + className: "MapsGeofenceResultEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceGeometry: msRest.CompositeMapper = { + serializedName: "MapsGeofenceGeometry", + type: { + name: "Composite", + className: "MapsGeofenceGeometry", + modelProperties: { + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + }, + distance: { + serializedName: "distance", + type: { + name: "Number" + } + }, + geometryId: { + serializedName: "geometryId", + type: { + name: "String" + } + }, + nearestLat: { + serializedName: "nearestLat", + type: { + name: "Number" + } + }, + nearestLon: { + serializedName: "nearestLon", + type: { + name: "Number" + } + }, + udId: { + serializedName: "udId", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationKeyValueModifiedEventData: msRest.CompositeMapper = { + serializedName: "AppConfigurationKeyValueModifiedEventData", + type: { + name: "Composite", + className: "AppConfigurationKeyValueModifiedEventData", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + syncToken: { + serializedName: "syncToken", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationKeyValueDeletedEventData: msRest.CompositeMapper = { + serializedName: "AppConfigurationKeyValueDeletedEventData", + type: { + name: "Composite", + className: "AppConfigurationKeyValueDeletedEventData", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + }, + syncToken: { + serializedName: "syncToken", + type: { + name: "String" + } + } + } + } +}; + +export const SignalRServiceClientConnectionConnectedEventData: msRest.CompositeMapper = { + serializedName: "SignalRServiceClientConnectionConnectedEventData", + type: { + name: "Composite", + className: "SignalRServiceClientConnectionConnectedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + hubName: { + serializedName: "hubName", + type: { + name: "String" + } + }, + connectionId: { + serializedName: "connectionId", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + type: { + name: "String" + } + } + } + } +}; + +export const SignalRServiceClientConnectionDisconnectedEventData: msRest.CompositeMapper = { + serializedName: "SignalRServiceClientConnectionDisconnectedEventData", + type: { + name: "Composite", + className: "SignalRServiceClientConnectionDisconnectedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + hubName: { + serializedName: "hubName", + type: { + name: "String" + } + }, + connectionId: { + serializedName: "connectionId", + type: { + name: "String" + } + }, + userId: { + serializedName: "userId", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const KeyVaultCertificateNewVersionCreatedEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultCertificateNewVersionCreatedEventData", + type: { + name: "Composite", + className: "KeyVaultCertificateNewVersionCreatedEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultCertificateNearExpiryEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultCertificateNearExpiryEventData", + type: { + name: "Composite", + className: "KeyVaultCertificateNearExpiryEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultCertificateExpiredEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultCertificateExpiredEventData", + type: { + name: "Composite", + className: "KeyVaultCertificateExpiredEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultKeyNewVersionCreatedEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultKeyNewVersionCreatedEventData", + type: { + name: "Composite", + className: "KeyVaultKeyNewVersionCreatedEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultKeyNearExpiryEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultKeyNearExpiryEventData", + type: { + name: "Composite", + className: "KeyVaultKeyNearExpiryEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultKeyExpiredEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultKeyExpiredEventData", + type: { + name: "Composite", + className: "KeyVaultKeyExpiredEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultSecretNewVersionCreatedEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultSecretNewVersionCreatedEventData", + type: { + name: "Composite", + className: "KeyVaultSecretNewVersionCreatedEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultSecretNearExpiryEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultSecretNearExpiryEventData", + type: { + name: "Composite", + className: "KeyVaultSecretNearExpiryEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultSecretExpiredEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultSecretExpiredEventData", + type: { + name: "Composite", + className: "KeyVaultSecretExpiredEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const KeyVaultVaultAccessPolicyChangedEventData: msRest.CompositeMapper = { + serializedName: "KeyVaultVaultAccessPolicyChangedEventData", + type: { + name: "Composite", + className: "KeyVaultVaultAccessPolicyChangedEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + vaultName: { + serializedName: "vaultName", + type: { + name: "String" + } + }, + objectType: { + serializedName: "objectType", + type: { + name: "String" + } + }, + objectName: { + serializedName: "objectName", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + }, + nbf: { + serializedName: "nbf", + type: { + name: "Number" + } + }, + exp: { + serializedName: "exp", + type: { + name: "Number" + } + } + } + } +}; + +export const MachineLearningServicesModelRegisteredEventData: msRest.CompositeMapper = { + serializedName: "MachineLearningServicesModelRegisteredEventData", + type: { + name: "Composite", + className: "MachineLearningServicesModelRegisteredEventData", + modelProperties: { + modelName: { + serializedName: "modelName", + type: { + name: "String" + } + }, + modelVersion: { + serializedName: "modelVersion", + type: { + name: "String" + } + }, + modelTags: { + serializedName: "modelTags", + type: { + name: "Object" + } + }, + modelProperties: { + serializedName: "modelProperties", + type: { + name: "Object" + } + } + } + } +}; + +export const MachineLearningServicesModelDeployedEventData: msRest.CompositeMapper = { + serializedName: "MachineLearningServicesModelDeployedEventData", + type: { + name: "Composite", + className: "MachineLearningServicesModelDeployedEventData", + modelProperties: { + serviceName: { + serializedName: "serviceName", + type: { + name: "String" + } + }, + serviceComputeType: { + serializedName: "serviceComputeType", + type: { + name: "String" + } + }, + modelIds: { + serializedName: "modelIds", + type: { + name: "String" + } + }, + serviceTags: { + serializedName: "serviceTags", + type: { + name: "Object" + } + }, + serviceProperties: { + serializedName: "serviceProperties", + type: { + name: "Object" + } + } + } + } +}; + +export const MachineLearningServicesRunCompletedEventData: msRest.CompositeMapper = { + serializedName: "MachineLearningServicesRunCompletedEventData", + type: { + name: "Composite", + className: "MachineLearningServicesRunCompletedEventData", + modelProperties: { + experimentId: { + serializedName: "experimentId", + type: { + name: "String" + } + }, + experimentName: { + serializedName: "experimentName", + type: { + name: "String" + } + }, + runId: { + serializedName: "runId", + type: { + name: "String" + } + }, + runType: { + serializedName: "runType", + type: { + name: "String" + } + }, + runTags: { + serializedName: "runTags", + type: { + name: "Object" + } + }, + runProperties: { + serializedName: "runProperties", + type: { + name: "Object" + } + } + } + } +}; + +export const MachineLearningServicesDatasetDriftDetectedEventData: msRest.CompositeMapper = { + serializedName: "MachineLearningServicesDatasetDriftDetectedEventData", + type: { + name: "Composite", + className: "MachineLearningServicesDatasetDriftDetectedEventData", + modelProperties: { + dataDriftId: { + serializedName: "dataDriftId", + type: { + name: "String" + } + }, + dataDriftName: { + serializedName: "dataDriftName", + type: { + name: "String" + } + }, + runId: { + serializedName: "runId", + type: { + name: "String" + } + }, + baseDatasetId: { + serializedName: "baseDatasetId", + type: { + name: "String" + } + }, + targetDatasetId: { + serializedName: "targetDatasetId", + type: { + name: "String" + } + }, + driftCoefficient: { + serializedName: "driftCoefficient", + type: { + name: "Number" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const MachineLearningServicesRunStatusChangedEventData: msRest.CompositeMapper = { + serializedName: "MachineLearningServicesRunStatusChangedEventData", + type: { + name: "Composite", + className: "MachineLearningServicesRunStatusChangedEventData", + modelProperties: { + experimentId: { + serializedName: "experimentId", + type: { + name: "String" + } + }, + experimentName: { + serializedName: "experimentName", + type: { + name: "String" + } + }, + runId: { + serializedName: "runId", + type: { + name: "String" + } + }, + runType: { + serializedName: "runType", + type: { + name: "String" + } + }, + runTags: { + serializedName: "runTags", + type: { + name: "Object" + } + }, + runProperties: { + serializedName: "runProperties", + type: { + name: "Object" + } + }, + runStatus: { + serializedName: "runStatus", + type: { + name: "String" + } + } + } + } +}; + +export const RedisPatchingCompletedEventData: msRest.CompositeMapper = { + serializedName: "RedisPatchingCompletedEventData", + type: { + name: "Composite", + className: "RedisPatchingCompletedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const RedisScalingCompletedEventData: msRest.CompositeMapper = { + serializedName: "RedisScalingCompletedEventData", + type: { + name: "Composite", + className: "RedisScalingCompletedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const RedisExportRDBCompletedEventData: msRest.CompositeMapper = { + serializedName: "RedisExportRDBCompletedEventData", + type: { + name: "Composite", + className: "RedisExportRDBCompletedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const RedisImportRDBCompletedEventData: msRest.CompositeMapper = { + serializedName: "RedisImportRDBCompletedEventData", + type: { + name: "Composite", + className: "RedisImportRDBCompletedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const AppEventTypeDetail: msRest.CompositeMapper = { + serializedName: "AppEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail", + modelProperties: { + action: { + serializedName: "action", + type: { + name: "String" + } + } + } + } +}; + +export const WebAppUpdatedEventData: msRest.CompositeMapper = { + serializedName: "WebAppUpdatedEventData", + type: { + name: "Composite", + className: "WebAppUpdatedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebBackupOperationStartedEventData: msRest.CompositeMapper = { + serializedName: "WebBackupOperationStartedEventData", + type: { + name: "Composite", + className: "WebBackupOperationStartedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebBackupOperationCompletedEventData: msRest.CompositeMapper = { + serializedName: "WebBackupOperationCompletedEventData", + type: { + name: "Composite", + className: "WebBackupOperationCompletedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebBackupOperationFailedEventData: msRest.CompositeMapper = { + serializedName: "WebBackupOperationFailedEventData", + type: { + name: "Composite", + className: "WebBackupOperationFailedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebRestoreOperationStartedEventData: msRest.CompositeMapper = { + serializedName: "WebRestoreOperationStartedEventData", + type: { + name: "Composite", + className: "WebRestoreOperationStartedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebRestoreOperationCompletedEventData: msRest.CompositeMapper = { + serializedName: "WebRestoreOperationCompletedEventData", + type: { + name: "Composite", + className: "WebRestoreOperationCompletedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebRestoreOperationFailedEventData: msRest.CompositeMapper = { + serializedName: "WebRestoreOperationFailedEventData", + type: { + name: "Composite", + className: "WebRestoreOperationFailedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebSlotSwapStartedEventData: msRest.CompositeMapper = { + serializedName: "WebSlotSwapStartedEventData", + type: { + name: "Composite", + className: "WebSlotSwapStartedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebSlotSwapCompletedEventData: msRest.CompositeMapper = { + serializedName: "WebSlotSwapCompletedEventData", + type: { + name: "Composite", + className: "WebSlotSwapCompletedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebSlotSwapFailedEventData: msRest.CompositeMapper = { + serializedName: "WebSlotSwapFailedEventData", + type: { + name: "Composite", + className: "WebSlotSwapFailedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebSlotSwapWithPreviewStartedEventData: msRest.CompositeMapper = { + serializedName: "WebSlotSwapWithPreviewStartedEventData", + type: { + name: "Composite", + className: "WebSlotSwapWithPreviewStartedEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const WebSlotSwapWithPreviewCancelledEventData: msRest.CompositeMapper = { + serializedName: "WebSlotSwapWithPreviewCancelledEventData", + type: { + name: "Composite", + className: "WebSlotSwapWithPreviewCancelledEventData", + modelProperties: { + appEventTypeDetail: { + serializedName: "appEventTypeDetail", + type: { + name: "Composite", + className: "AppEventTypeDetail" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const AppServicePlanEventTypeDetail: msRest.CompositeMapper = { + serializedName: "AppServicePlanEventTypeDetail", + type: { + name: "Composite", + className: "AppServicePlanEventTypeDetail", + modelProperties: { + stampKind: { + serializedName: "stampKind", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const WebAppServicePlanUpdatedEventDataSku: msRest.CompositeMapper = { + serializedName: "WebAppServicePlanUpdatedEventData_sku", + type: { + name: "Composite", + className: "WebAppServicePlanUpdatedEventDataSku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "Tier", + type: { + name: "String" + } + }, + size: { + serializedName: "Size", + type: { + name: "String" + } + }, + family: { + serializedName: "Family", + type: { + name: "String" + } + }, + capacity: { + serializedName: "Capacity", + type: { + name: "String" + } + } + } + } +}; + +export const WebAppServicePlanUpdatedEventData: msRest.CompositeMapper = { + serializedName: "WebAppServicePlanUpdatedEventData", + type: { + name: "Composite", + className: "WebAppServicePlanUpdatedEventData", + modelProperties: { + appServicePlanEventTypeDetail: { + serializedName: "appServicePlanEventTypeDetail", + type: { + name: "Composite", + className: "AppServicePlanEventTypeDetail" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "WebAppServicePlanUpdatedEventDataSku" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + clientRequestId: { + serializedName: "clientRequestId", + type: { + name: "String" + } + }, + correlationRequestId: { + serializedName: "correlationRequestId", + type: { + name: "String" + } + }, + requestId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + address: { + serializedName: "address", + type: { + name: "String" + } + }, + verb: { + serializedName: "verb", + type: { + name: "String" + } + } + } + } +}; + +export const AcsChatEventBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsChatEventBaseProperties", + type: { + name: "Composite", + className: "AcsChatEventBaseProperties", + modelProperties: { + recipientCommunicationIdentifier: { + serializedName: "recipientCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + transactionId: { + serializedName: "transactionId", + type: { + name: "String" + } + }, + threadId: { + serializedName: "threadId", + type: { + name: "String" + } + } + } + } +}; + +export const AcsChatMessageEventBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsChatMessageEventBaseProperties", + type: { + name: "Composite", + className: "AcsChatMessageEventBaseProperties", + modelProperties: { + ...AcsChatEventBaseProperties.type.modelProperties, + messageId: { + serializedName: "messageId", + type: { + name: "String" + } + }, + senderCommunicationIdentifier: { + serializedName: "senderCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + senderDisplayName: { + serializedName: "senderDisplayName", + type: { + name: "String" + } + }, + composeTime: { + serializedName: "composeTime", + type: { + name: "DateTime" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsChatMessageReceivedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatMessageReceivedEventData", + type: { + name: "Composite", + className: "AcsChatMessageReceivedEventData", + modelProperties: { + ...AcsChatMessageEventBaseProperties.type.modelProperties, + messageBody: { + serializedName: "messageBody", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AcsChatEventInThreadBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsChatEventInThreadBaseProperties", + type: { + name: "Composite", + className: "AcsChatEventInThreadBaseProperties", + modelProperties: { + transactionId: { + serializedName: "transactionId", + type: { + name: "String" + } + }, + threadId: { + serializedName: "threadId", + type: { + name: "String" + } + } + } + } +}; + +export const AcsChatMessageEventInThreadBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsChatMessageEventInThreadBaseProperties", + type: { + name: "Composite", + className: "AcsChatMessageEventInThreadBaseProperties", + modelProperties: { + ...AcsChatEventInThreadBaseProperties.type.modelProperties, + messageId: { + serializedName: "messageId", + type: { + name: "String" + } + }, + senderCommunicationIdentifier: { + serializedName: "senderCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + senderDisplayName: { + serializedName: "senderDisplayName", + type: { + name: "String" + } + }, + composeTime: { + serializedName: "composeTime", + type: { + name: "DateTime" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsChatMessageReceivedInThreadEventData: msRest.CompositeMapper = { + serializedName: "AcsChatMessageReceivedInThreadEventData", + type: { + name: "Composite", + className: "AcsChatMessageReceivedInThreadEventData", + modelProperties: { + ...AcsChatMessageEventInThreadBaseProperties.type.modelProperties, + messageBody: { + serializedName: "messageBody", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const AcsChatMessageEditedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatMessageEditedEventData", + type: { + name: "Composite", + className: "AcsChatMessageEditedEventData", + modelProperties: { + ...AcsChatMessageEventBaseProperties.type.modelProperties, + messageBody: { + serializedName: "messageBody", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + editTime: { + serializedName: "editTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AcsChatMessageEditedInThreadEventData: msRest.CompositeMapper = { + serializedName: "AcsChatMessageEditedInThreadEventData", + type: { + name: "Composite", + className: "AcsChatMessageEditedInThreadEventData", + modelProperties: { + ...AcsChatMessageEventInThreadBaseProperties.type.modelProperties, + messageBody: { + serializedName: "messageBody", + type: { + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + editTime: { + serializedName: "editTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AcsChatMessageDeletedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatMessageDeletedEventData", + type: { + name: "Composite", + className: "AcsChatMessageDeletedEventData", + modelProperties: { + ...AcsChatMessageEventBaseProperties.type.modelProperties, + deleteTime: { + serializedName: "deleteTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AcsChatMessageDeletedInThreadEventData: msRest.CompositeMapper = { + serializedName: "AcsChatMessageDeletedInThreadEventData", + type: { + name: "Composite", + className: "AcsChatMessageDeletedInThreadEventData", + modelProperties: { + ...AcsChatMessageEventInThreadBaseProperties.type.modelProperties, + deleteTime: { + serializedName: "deleteTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const CommunicationUserIdentifierModel: msRest.CompositeMapper = { + serializedName: "CommunicationUserIdentifierModel", + type: { + name: "Composite", + className: "CommunicationUserIdentifierModel", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PhoneNumberIdentifierModel: msRest.CompositeMapper = { + serializedName: "PhoneNumberIdentifierModel", + type: { + name: "Composite", + className: "PhoneNumberIdentifierModel", + modelProperties: { + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const MicrosoftTeamsUserIdentifierModel: msRest.CompositeMapper = { + serializedName: "MicrosoftTeamsUserIdentifierModel", + type: { + name: "Composite", + className: "MicrosoftTeamsUserIdentifierModel", + modelProperties: { + userId: { + required: true, + serializedName: "userId", + type: { + name: "String" + } + }, + isAnonymous: { + serializedName: "isAnonymous", + type: { + name: "Boolean" + } + }, + cloud: { + serializedName: "cloud", + type: { + name: "String" + } + } + } + } +}; + +export const CommunicationIdentifierModel: msRest.CompositeMapper = { + serializedName: "CommunicationIdentifierModel", + type: { + name: "Composite", + className: "CommunicationIdentifierModel", + modelProperties: { + rawId: { + serializedName: "rawId", + type: { + name: "String" + } + }, + communicationUser: { + serializedName: "communicationUser", + type: { + name: "Composite", + className: "CommunicationUserIdentifierModel" + } + }, + phoneNumber: { + serializedName: "phoneNumber", + type: { + name: "Composite", + className: "PhoneNumberIdentifierModel" + } + }, + microsoftTeamsUser: { + serializedName: "microsoftTeamsUser", + type: { + name: "Composite", + className: "MicrosoftTeamsUserIdentifierModel" + } + } + } + } +}; + +export const AcsChatThreadParticipantProperties: msRest.CompositeMapper = { + serializedName: "AcsChatThreadParticipantProperties", + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + participantCommunicationIdentifier: { + serializedName: "participantCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + } + } + } +}; + +export const AcsChatThreadEventBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsChatThreadEventBaseProperties", + type: { + name: "Composite", + className: "AcsChatThreadEventBaseProperties", + modelProperties: { + ...AcsChatEventBaseProperties.type.modelProperties, + createTime: { + serializedName: "createTime", + type: { + name: "DateTime" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsChatThreadCreatedWithUserEventData: msRest.CompositeMapper = { + serializedName: "AcsChatThreadCreatedWithUserEventData", + type: { + name: "Composite", + className: "AcsChatThreadCreatedWithUserEventData", + modelProperties: { + ...AcsChatThreadEventBaseProperties.type.modelProperties, + createdByCommunicationIdentifier: { + serializedName: "createdByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, + participants: { + serializedName: "participants", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties" + } + } + } + } + } + } +}; + +export const AcsChatThreadEventInThreadBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsChatThreadEventInThreadBaseProperties", + type: { + name: "Composite", + className: "AcsChatThreadEventInThreadBaseProperties", + modelProperties: { + ...AcsChatEventInThreadBaseProperties.type.modelProperties, + createTime: { + serializedName: "createTime", + type: { + name: "DateTime" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsChatThreadCreatedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatThreadCreatedEventData", + type: { + name: "Composite", + className: "AcsChatThreadCreatedEventData", + modelProperties: { + ...AcsChatThreadEventInThreadBaseProperties.type.modelProperties, + createdByCommunicationIdentifier: { + serializedName: "createdByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, + participants: { + serializedName: "participants", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties" + } + } + } + } + } + } +}; + +export const AcsChatThreadWithUserDeletedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatThreadWithUserDeletedEventData", + type: { + name: "Composite", + className: "AcsChatThreadWithUserDeletedEventData", + modelProperties: { + ...AcsChatThreadEventBaseProperties.type.modelProperties, + deletedByCommunicationIdentifier: { + serializedName: "deletedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + deleteTime: { + serializedName: "deleteTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AcsChatThreadDeletedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatThreadDeletedEventData", + type: { + name: "Composite", + className: "AcsChatThreadDeletedEventData", + modelProperties: { + ...AcsChatThreadEventInThreadBaseProperties.type.modelProperties, + deletedByCommunicationIdentifier: { + serializedName: "deletedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + deleteTime: { + serializedName: "deleteTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AcsChatThreadPropertiesUpdatedPerUserEventData: msRest.CompositeMapper = { + serializedName: "AcsChatThreadPropertiesUpdatedPerUserEventData", + type: { + name: "Composite", + className: "AcsChatThreadPropertiesUpdatedPerUserEventData", + modelProperties: { + ...AcsChatThreadEventBaseProperties.type.modelProperties, + editedByCommunicationIdentifier: { + serializedName: "editedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + editTime: { + serializedName: "editTime", + type: { + name: "DateTime" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + } + } + } +}; + +export const AcsChatThreadPropertiesUpdatedEventData: msRest.CompositeMapper = { + serializedName: "AcsChatThreadPropertiesUpdatedEventData", + type: { + name: "Composite", + className: "AcsChatThreadPropertiesUpdatedEventData", + modelProperties: { + ...AcsChatThreadEventInThreadBaseProperties.type.modelProperties, + editedByCommunicationIdentifier: { + serializedName: "editedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + editTime: { + serializedName: "editTime", + type: { + name: "DateTime" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + } + } + } +}; + +export const AcsChatParticipantAddedToThreadWithUserEventData: msRest.CompositeMapper = { + serializedName: "AcsChatParticipantAddedToThreadWithUserEventData", + type: { + name: "Composite", + className: "AcsChatParticipantAddedToThreadWithUserEventData", + modelProperties: { + ...AcsChatThreadEventBaseProperties.type.modelProperties, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + addedByCommunicationIdentifier: { + serializedName: "addedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + participantAdded: { + serializedName: "participantAdded", + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties" + } + } + } + } +}; + +export const AcsChatParticipantRemovedFromThreadWithUserEventData: msRest.CompositeMapper = { + serializedName: "AcsChatParticipantRemovedFromThreadWithUserEventData", + type: { + name: "Composite", + className: "AcsChatParticipantRemovedFromThreadWithUserEventData", + modelProperties: { + ...AcsChatThreadEventBaseProperties.type.modelProperties, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + removedByCommunicationIdentifier: { + serializedName: "removedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + participantRemoved: { + serializedName: "participantRemoved", + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties" + } + } + } + } +}; + +export const AcsChatParticipantAddedToThreadEventData: msRest.CompositeMapper = { + serializedName: "AcsChatParticipantAddedToThreadEventData", + type: { + name: "Composite", + className: "AcsChatParticipantAddedToThreadEventData", + modelProperties: { + ...AcsChatEventInThreadBaseProperties.type.modelProperties, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + addedByCommunicationIdentifier: { + serializedName: "addedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + participantAdded: { + serializedName: "participantAdded", + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsChatParticipantRemovedFromThreadEventData: msRest.CompositeMapper = { + serializedName: "AcsChatParticipantRemovedFromThreadEventData", + type: { + name: "Composite", + className: "AcsChatParticipantRemovedFromThreadEventData", + modelProperties: { + ...AcsChatEventInThreadBaseProperties.type.modelProperties, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + removedByCommunicationIdentifier: { + serializedName: "removedByCommunicationIdentifier", + type: { + name: "Composite", + className: "CommunicationIdentifierModel" + } + }, + participantRemoved: { + serializedName: "participantRemoved", + type: { + name: "Composite", + className: "AcsChatThreadParticipantProperties" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsSmsDeliveryAttemptProperties: msRest.CompositeMapper = { + serializedName: "AcsSmsDeliveryAttemptProperties", + type: { + name: "Composite", + className: "AcsSmsDeliveryAttemptProperties", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + segmentsSucceeded: { + serializedName: "segmentsSucceeded", + type: { + name: "Number" + } + }, + segmentsFailed: { + serializedName: "segmentsFailed", + type: { + name: "Number" + } + } + } + } +}; + +export const AcsSmsEventBaseProperties: msRest.CompositeMapper = { + serializedName: "AcsSmsEventBaseProperties", + type: { + name: "Composite", + className: "AcsSmsEventBaseProperties", + modelProperties: { + messageId: { + serializedName: "messageId", + type: { + name: "String" + } + }, + from: { + serializedName: "from", + type: { + name: "String" + } + }, + to: { + serializedName: "to", + type: { + name: "String" + } + } + } + } +}; + +export const AcsSmsDeliveryReportReceivedEventData: msRest.CompositeMapper = { + serializedName: "AcsSmsDeliveryReportReceivedEventData", + type: { + name: "Composite", + className: "AcsSmsDeliveryReportReceivedEventData", + modelProperties: { + ...AcsSmsEventBaseProperties.type.modelProperties, + deliveryStatus: { + serializedName: "deliveryStatus", + type: { + name: "String" + } + }, + deliveryStatusDetails: { + serializedName: "deliveryStatusDetails", + type: { + name: "String" + } + }, + deliveryAttempts: { + serializedName: "deliveryAttempts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AcsSmsDeliveryAttemptProperties" + } + } + } + }, + receivedTimestamp: { + serializedName: "receivedTimestamp", + type: { + name: "DateTime" + } + }, + tag: { + serializedName: "tag", + type: { + name: "String" + } + } + } + } +}; + +export const AcsSmsReceivedEventData: msRest.CompositeMapper = { + serializedName: "AcsSmsReceivedEventData", + type: { + name: "Composite", + className: "AcsSmsReceivedEventData", + modelProperties: { + ...AcsSmsEventBaseProperties.type.modelProperties, + message: { + serializedName: "message", + type: { + name: "String" + } + }, + receivedTimestamp: { + serializedName: "receivedTimestamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const AcsRecordingChunkInfoProperties: msRest.CompositeMapper = { + serializedName: "AcsRecordingChunkInfoProperties", + type: { + name: "Composite", + className: "AcsRecordingChunkInfoProperties", + modelProperties: { + documentId: { + serializedName: "documentId", + type: { + name: "String" + } + }, + index: { + serializedName: "index", + type: { + name: "Number" + } + }, + endReason: { + serializedName: "endReason", + type: { + name: "String" + } + }, + metadataLocation: { + serializedName: "metadataLocation", + type: { + name: "String" + } + }, + contentLocation: { + serializedName: "contentLocation", + type: { + name: "String" + } + } + } + } +}; + +export const AcsRecordingStorageInfoProperties: msRest.CompositeMapper = { + serializedName: "AcsRecordingStorageInfoProperties", + type: { + name: "Composite", + className: "AcsRecordingStorageInfoProperties", + modelProperties: { + recordingChunks: { + serializedName: "recordingChunks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AcsRecordingChunkInfoProperties" + } + } + } + } + } + } +}; + +export const AcsRecordingFileStatusUpdatedEventData: msRest.CompositeMapper = { + serializedName: "AcsRecordingFileStatusUpdatedEventData", + type: { + name: "Composite", + className: "AcsRecordingFileStatusUpdatedEventData", + modelProperties: { + recordingStorageInfo: { + serializedName: "recordingStorageInfo", + type: { + name: "Composite", + className: "AcsRecordingStorageInfoProperties" + } + }, + recordingStartTime: { + serializedName: "recordingStartTime", + type: { + name: "DateTime" + } + }, + recordingDurationMs: { + serializedName: "recordingDurationMs", + type: { + name: "Number" + } + }, + sessionEndReason: { + serializedName: "sessionEndReason", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyInsightsPolicyStateCreatedEventData: msRest.CompositeMapper = { + serializedName: "PolicyInsightsPolicyStateCreatedEventData", + type: { + name: "Composite", + className: "PolicyInsightsPolicyStateCreatedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + policyAssignmentId: { + serializedName: "policyAssignmentId", + type: { + name: "String" + } + }, + policyDefinitionId: { + serializedName: "policyDefinitionId", + type: { + name: "String" + } + }, + policyDefinitionReferenceId: { + serializedName: "policyDefinitionReferenceId", + type: { + name: "String" + } + }, + complianceState: { + serializedName: "complianceState", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + complianceReasonCode: { + serializedName: "complianceReasonCode", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyInsightsPolicyStateChangedEventData: msRest.CompositeMapper = { + serializedName: "PolicyInsightsPolicyStateChangedEventData", + type: { + name: "Composite", + className: "PolicyInsightsPolicyStateChangedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + policyAssignmentId: { + serializedName: "policyAssignmentId", + type: { + name: "String" + } + }, + policyDefinitionId: { + serializedName: "policyDefinitionId", + type: { + name: "String" + } + }, + policyDefinitionReferenceId: { + serializedName: "policyDefinitionReferenceId", + type: { + name: "String" + } + }, + complianceState: { + serializedName: "complianceState", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + complianceReasonCode: { + serializedName: "complianceReasonCode", + type: { + name: "String" + } + } + } + } +}; + +export const PolicyInsightsPolicyStateDeletedEventData: msRest.CompositeMapper = { + serializedName: "PolicyInsightsPolicyStateDeletedEventData", + type: { + name: "Composite", + className: "PolicyInsightsPolicyStateDeletedEventData", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + policyAssignmentId: { + serializedName: "policyAssignmentId", + type: { + name: "String" + } + }, + policyDefinitionId: { + serializedName: "policyDefinitionId", + type: { + name: "String" + } + }, + policyDefinitionReferenceId: { + serializedName: "policyDefinitionReferenceId", + type: { + name: "String" + } + }, + complianceState: { + serializedName: "complianceState", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String" + } + }, + complianceReasonCode: { + serializedName: "complianceReasonCode", + type: { + name: "String" + } + } + } + } +}; + +export const discriminators = { + 'MediaJobOutput' : MediaJobOutput, + 'MediaJobOutput.#Microsoft.Media.JobOutputAsset' : MediaJobOutputAsset + +}; diff --git a/sdk/eventgrid/eventgrid/src/models/parameters.ts b/sdk/eventgrid/eventgrid/src/models/parameters.ts new file mode 100644 index 000000000000..f1cc9e57121a --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/models/parameters.ts @@ -0,0 +1,43 @@ +/* + * 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 msRest from "@azure/ms-rest-js"; + +export const acceptLanguage: msRest.OperationParameter = { + parameterPath: "acceptLanguage", + mapper: { + serializedName: "accept-language", + defaultValue: 'en-US', + type: { + name: "String" + } + } +}; +export const apiVersion: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; +export const topicHostname: msRest.OperationURLParameter = { + parameterPath: "topicHostname", + mapper: { + required: true, + serializedName: "topicHostname", + defaultValue: '', + type: { + name: "String" + } + }, + skipEncoding: true +}; diff --git a/sdk/eventgrid/eventgrid/tsconfig.json b/sdk/eventgrid/eventgrid/tsconfig.json index 64103107beea..422b584abd5e 100644 --- a/sdk/eventgrid/eventgrid/tsconfig.json +++ b/sdk/eventgrid/eventgrid/tsconfig.json @@ -1,12 +1,19 @@ { - "extends": "../../../tsconfig.package", "compilerOptions": { - "outDir": "./dist-esm", - "declarationDir": "./types", - "lib": ["ES2018.AsyncIterable"], - "paths": { - "@azure/eventgrid": ["./src/index"] - } + "module": "es6", + "moduleResolution": "node", + "strict": true, + "target": "es5", + "sourceMap": true, + "declarationMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "lib": ["es6", "dom"], + "declaration": true, + "outDir": "./esm", + "importHelpers": true }, - "include": ["src/**/*.ts", "test/**/*.ts", "samples-dev/**/*.ts"] + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] }