From 6bdebfb8357cca71792dd609392b305d22e319f0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 4 Dec 2020 00:05:45 +0000 Subject: [PATCH] CodeGen from PR 11935 in Azure/azure-rest-api-specs Merge a3fd91391efd1cea30545d2218ea983c3e868cc8 into 6000b6fde3431e4008b895f87cf39dfe598b24d1 --- sdk/eventgrid/eventgrid/LICENSE.txt | 21 + sdk/eventgrid/eventgrid/README.md | 318 +- sdk/eventgrid/eventgrid/package.json | 139 +- sdk/eventgrid/eventgrid/rollup.config.js | 47 +- .../eventgrid/src/eventGridClient.ts | 475 +- .../eventgrid/src/eventGridClientContext.ts | 54 + sdk/eventgrid/eventgrid/src/models/index.ts | 3735 +++++++++++ sdk/eventgrid/eventgrid/src/models/mappers.ts | 5584 +++++++++++++++++ .../eventgrid/src/models/parameters.ts | 43 + sdk/eventgrid/eventgrid/tsconfig.json | 28 +- 10 files changed, 9825 insertions(+), 619 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..ea8fb1516028 --- /dev/null +++ b/sdk/eventgrid/eventgrid/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 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 cf0b5c64db50..c5d26599bced 100644 --- a/sdk/eventgrid/eventgrid/README.md +++ b/sdk/eventgrid/eventgrid/README.md @@ -1,260 +1,118 @@ -# 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/master/sdk/eventgrid/eventgrid/) | -[Package (NPM)](https://www.npmjs.com/package/@azure/eventgrid/v/next) | -[API reference documentation](https://aka.ms/azsdk-js-eventgrid-ref-docs) | -[Product documentation](https://docs.microsoft.com/azure/event-grid/) | -[Samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventgrid/eventgrid/samples) - -## Getting started +This package contains an isomorphic SDK for EventGridClient. ### Currently supported environments -- Node.js version 8.x.x or higher +- Node.js version 6.x.x or higher - Browser JavaScript - - Apple Safari: latest two versions - - Google Chrome: latest two versions - - Microsoft Edge: all supported versions - - Mozilla FireFox: latest two versions - -### 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`: +### How to Install ```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" -``` +### How to use -#### Using an Access Key +#### nodejs - client creation and publishEvents as an example written in TypeScript. -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: +##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```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 `EventGridSharedAccesSignatureCredential` as follows: - -```js -const { - EventGridPublisherClient, - EventGridSharedAccessSignatureCredential -} = require("@azure/eventgrid"); - -const client = new EventGridPublisherClient( - "", - new EventGridSharedAccessSignatureCredential("") -); -``` - -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 - -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. Regardless of what schmea your topic or domain is configured to use, `EventGridPublisherClient` will be used to publish events to it. However, you must use the correct method for publishing: - -| Schema | Publishing Method | -| ------------ | --------------------- | -| Event Grid | `publishEvents` | -| Cloud Events | `publishCloudEvents` | -| Custom | `publishCustomEvents` | - -Using the wrong method will result in an error from the service and your events will not be published. - -### EventGridConsumer - -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 `EventGridConsumer`. - -Compared with using `JSON.parse` directly, `EventGridConsumer` does some additional conversions while deserializng events: - -1. `EventGridConsumer` validates that the required properties of an event are present and are the right types. -2. `EventGridConsumer` 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. `EventGridConsumer` will decode this data back into an instance of `Uint8Array`. -4. When deserilizing a _System Event_ (an event generated by another Azure service), `EventGridConsumer` 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 `EventGridConsumer` you may supply custom deserializers that are used to further convert the `data` object. - -## Examples - -### Publish a Custom Event to an Event Grid Topic - -```js -const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid"); - -const client = new EventGridPublisherClient("", new AzureKeyCredential("")); - -await client.sendEvents([ - { - eventType: "Azure.Sdk.SampleEvent", - subject: "Event Subject", - dataVersion: "1.0", - data: { - hello: "world" - } - } -]); -``` - -### Publish a Custom Event to a Topic in an Event Grid Domain - -Publishing events to an Event Grid Domain is similar to publish to an Event Grid Topic, except that when using the Event Grid schema for events, you must include the `topic` property. When publishing events in the Cloud Events 1.0 schema, the required `source` property is used as the name of the topic in the domain to publish to: - -```js -const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid"); - -const client = new EventGridPublisherClient("", new AzureKeyCredential("")); - -await client.sendEvents([ - { - topic: "my-sample-topic", - eventType: "Azure.Sdk.SampleEvent", - subject: "Event Subject", - dataVersion: "1.0", - data: { - hello: "world" - } - } -]); +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` -### Deserializing an Event - -`EventGridConsumer` 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 Topic in the Cloud Events schema. Using the Service Bus SDK we can recieve these events from the Service Bus Topic and then deserialize them using `EventGridConsumer` and use `isSystemEvent` to detect what type of events they are. - -```js -const { ServiceBusClient } = require("@azure/service-bus"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { EventGridConsumer, isSystemEvent } = require("@azure/eventgrid"); - -const client = new ServiceBusClient("", new DefaultAzureCredential()); - -const receiver = client.createReceiver("", "peekLock"); - -const consumer = new EventGridConsumer(); - -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.decodeCloudEvents(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 +##### Sample code + +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package +```typescript +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { EventGridClient } = require("@azure/eventgrid"); +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + 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.error(err); }); ``` -## Troubleshooting - -### Enable logs - -You can set the following environment variable to get the debug logging output when using this library. +#### browser - Authentication, client creation and publishEvents as an example written in JavaScript. -- Getting debug logs from the Azure Event Grid client library +##### Install @azure/ms-rest-browserauth ```bash -export AZURE_LOG_LEVEL=verbose +npm install @azure/ms-rest-browserauth ``` -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/master/sdk/core/logger). - -## Next steps - -Please take a look at the -[samples](https://github.com/Azure/azure-sdk-for-js/tree/master/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/master/CONTRIBUTING.md) to learn more about how to build and test the code. +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/eventgrid sample + + + + + + + + +``` ## 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 +![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 cab165f835db..f8758f9aefcb 100644 --- a/sdk/eventgrid/eventgrid/package.json +++ b/sdk/eventgrid/eventgrid/package.json @@ -1,9 +1,13 @@ { "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": "3.0.0-beta.3", + "dependencies": { + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" + }, "keywords": [ "node", "azure", @@ -12,9 +16,16 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/src/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/eventgrid.d.ts", + "main": "./dist/eventgrid.js", + "module": "./esm/eventGridClient.js", + "types": "./esm/eventGridClient.d.ts", + "devDependencies": { + "typescript": "^3.5.3", + "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", @@ -24,112 +35,24 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/", - "dist-esm/src/", - "types/eventgrid.d.ts", + "dist/**/*.js", + "dist/**/*.js.map", + "dist/**/*.d.ts", + "dist/**/*.d.ts.map", + "esm/**/*.js", + "esm/**/*.js.map", + "esm/**/*.d.ts", + "esm/**/*.d.ts.map", + "src/**/*.ts", "README.md", - "LICENSE" + "rollup.config.js", + "tsconfig.json" ], - "//metadata": { - "constantPaths": [ - { - "path": "src/generated/generatedClientContext.ts", - "prefix": "packageVersion" - }, - { - "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", - "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": "node ../../../common/scripts/prep-samples.js && cd samples && tsc -p .", - "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\" \"*.{js,json}\"", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:js-samples": "node ../../../common/scripts/run-samples.js samples/javascript/", - "execute:ts-samples": "node ../../../common/scripts/run-samples.js samples/typescript/dist/samples/typescript/src/", - "execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples", - "extract-api": "tsc -p . && api-extractor run --local", - "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.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 \"src/**/*.ts\" --fix --fix-type [problem,suggestion]", - "lint": "eslint src --ext .ts -f html -o textAnalytics-lintReport.html", - "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" + "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.1.3", - "@azure/core-http": "^1.2.0", - "@azure/core-tracing": "1.0.0-preview.9", - "@azure/logger": "^1.0.0", - "@opentelemetry/api": "^0.10.2", - "tslib": "^2.0.0" - }, - "devDependencies": { - "@azure/eslint-plugin-azure-sdk": "^3.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": "^8.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": "^6.1.0", - "karma": "^5.1.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-remap-istanbul": "^0.6.0", - "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": "^8.3.0", - "typescript": "~3.9.3" - } + "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 4ca93dbec698..fffea7e35b5a 100644 --- a/sdk/eventgrid/eventgrid/src/eventGridClient.ts +++ b/sdk/eventgrid/eventgrid/src/eventGridClient.ts @@ -1,285 +1,248 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { KeyCredential } from "@azure/core-auth"; -import { - PipelineOptions, - createPipelineFromOptions, - OperationOptions, - generateUuid, - HttpResponse, - RequestPolicyFactory, - RestResponse -} from "@azure/core-http"; - -import { createEventGridCredentialPolicy } from "./eventGridAuthenticationPolicy"; -import { SignatureCredential } from "./sharedAccessSignitureCredential"; -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 { CanonicalCode } from "@opentelemetry/api"; - -/** - * Options for the Event Grid Client. - */ -export type EventGridPublisherClientOptions = PipelineOptions; - -/** - * Options for the send events operation. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ -export type SendEventsOptions = OperationOptions; -/** - * Options for the send cloud events operation. - */ -export type SendCloudEventsOptions = OperationOptions; +import * as msRest from "@azure/ms-rest-js"; +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 send custom schema events operation. - */ -export type SendCustomSchemaEventsOptions = OperationOptions; -/** - * The response when sending events to the Event Grid service. - */ -export interface SendEventsResponse { - _response: HttpResponse; -} - -/** - * Client class for publishing events to the Event Grid Service. - */ -export class EventGridPublisherClient { +class EventGridClient extends EventGridClientContext { /** - * The URL to the Event Grid endpoint. + * Initializes a new instance of the EventGridClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param [options] The parameter options */ - public readonly endpointUrl: string; + constructor(credentials: msRest.ServiceClientCredentials, options?: msRest.AzureServiceClientOptions) { + super(credentials, options); + } /** - * The version of the Even Grid service. + * 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 apiVersion: string; - + publishEvents(topicHostname: string, events: Models.EventGridEvent[], options?: msRest.RequestOptionsBase): Promise; /** - * 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 callback The callback */ - private readonly client: GeneratedClient; - + publishEvents(topicHostname: string, events: Models.EventGridEvent[], callback: msRest.ServiceCallback): void; /** - * Creates an instance of EventGridPublisherClient. - * - * Example usage: - * ```ts - * import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid"; - * - * const client = new EventGridPublisherClient( - * "", - * new AzureKeyCredential("") - * ); - * ``` - * - * @param endpointUrl The URL to the EventGrid endpoint, e.g. https://eg-topic.westus2-1.eventgrid.azure.net/api/events - * @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 options The optional parameters + * @param callback The callback */ - constructor( - endpointUrl: string, - credential: KeyCredential | SignatureCredential, - options: EventGridPublisherClientOptions = {} - ) { - this.endpointUrl = endpointUrl; - - 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; - } - - const authPolicy = createEventGridCredentialPolicy(credential); - const pipeline = createPipelineFromOptions(options, authPolicy); - - (pipeline.requestPolicyFactories as RequestPolicyFactory[]).push( - cloudEventDistributedTracingEnricherPolicy() - ); - - this.client = new GeneratedClient(pipeline); - this.apiVersion = this.client.apiVersion; + 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); } /** - * Publishes events in the Event Grid scheama. The topic must be configured to expect events in the Event Grid schema. - * - * @param message One or more events to publish + * 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 */ - async sendEvents( - events: SendEventGridEventInput[], - options?: SendEventsOptions - ): Promise { - const { span, updatedOptions } = createSpan( - "EventGridPublisherClient-sendEvents", - options || {} - ); - - try { - const r = await this.client.publishEvents( - this.endpointUrl, - (events || []).map(convertEventGridEventToModelType), - updatedOptions - ); - return buildResponse(r); - } catch (e) { - span.setStatus({ code: CanonicalCode.UNKNOWN, message: e.message }); - throw e; - } finally { - span.end(); - } - } - + publishCloudEventEvents(topicHostname: string, events: Models.CloudEventEvent[], options?: msRest.RequestOptionsBase): Promise; /** - * Publishes events in the Cloud Events 1.0 schema. The topic must be configured to expect events in the Cloud Events 1.0 schema. - * - * @param message One or more events to publish + * @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 */ - async sendCloudEvents( - events: SendCloudEventInput[], - options?: SendCloudEventsOptions - ): Promise { - const { span, updatedOptions } = createSpan( - "EventGridPublisherClient-sendCloudEvents", - options || {} - ); - - try { - const r = await this.client.publishCloudEventEvents( - this.endpointUrl, - (events || []).map(convertCloudEventToModelType), - updatedOptions - ); - return buildResponse(r); - } catch (e) { - span.setStatus({ code: CanonicalCode.UNKNOWN, message: e.message }); - throw e; - } finally { - span.end(); - } + publishCloudEventEvents(topicHostname: string, events: Models.CloudEventEvent[], callback: msRest.ServiceCallback): void; + /** + * @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 + */ + 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); } /** - * Publishes events written using a custom schema. The topic must be configured to expect events in a custom schema. - * - * @param message One or more events to publish + * 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 */ - async sendCustomSchemaEvents( - events: Record[], - options?: SendCustomSchemaEventsOptions - ): Promise { - const { span, updatedOptions } = createSpan( - "EventGridPublisherClient-sendCustomSchemaEvents", - options || {} - ); - - try { - const r = await this.client.publishCustomEventEvents( - this.endpointUrl, - events || [], - updatedOptions - ); - return buildResponse(r); - } catch (e) { - span.setStatus({ code: CanonicalCode.UNKNOWN, message: e.message }); - throw e; - } finally { - span.end(); - } + publishCustomEventEvents(topicHostname: string, events: any[], options?: msRest.RequestOptionsBase): Promise; + /** + * @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 + */ + publishCustomEventEvents(topicHostname: string, events: any[], callback: msRest.ServiceCallback): void; + /** + * @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 + */ + 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); } } -function buildResponse(r: RestResponse): SendEventsResponse { - const ret = { _response: r._response }; - - Object.defineProperty(ret, "_response", { - enumerable: false - }); - - return ret; -} - -/** - * @internal - */ -export function convertEventGridEventToModelType( - event: SendEventGridEventInput -): EventGridEventWireModel { - return { - eventType: event.eventType, - eventTime: event.eventTime ?? new Date(), - id: event.id ?? generateUuid(), - 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}`); +// 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" + } + } } } - } - - const converted: CloudEventWireModel = { - specversion: "1.0", - type: event.type, - source: event.source, - id: event.id ?? generateUuid(), - 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 +}; + +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" + } + } + } + } + } + } + }, + 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" + } + } + } + } + }, + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + 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..065b64a7455b --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/eventGridClientContext.ts @@ -0,0 +1,54 @@ +/* + * 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"; + +const packageName = "@azure/eventgrid"; +const packageVersion = "3.0.0-beta.3"; + +export class EventGridClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + apiVersion?: string; + + /** + * Initializes a new instance of the EventGridClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, 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..be0dbe1612e3 --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/models/index.ts @@ -0,0 +1,3735 @@ +/* + * 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 an 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 an 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 an 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 an 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 an 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 an 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 an + * 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 an 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 an 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 an 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. + */ +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. + */ +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.DeadletterMessagesAvailableWithNoListenersEvent 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. + */ +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 + */ +export interface MediaJobScheduledEventData extends MediaJobStateChangeEventData { +} + +/** + * Job processing event data + */ +export interface MediaJobProcessingEventData extends MediaJobStateChangeEventData { +} + +/** + * Job canceling event data + */ +export interface MediaJobCancelingEventData extends MediaJobStateChangeEventData { +} + +/** + * Job finished event data + */ +export interface MediaJobFinishedEventData extends MediaJobStateChangeEventData { + /** + * Gets the Job outputs. + */ + outputs?: MediaJobOutputUnion[]; +} + +/** + * Job canceled event data + */ +export interface MediaJobCanceledEventData extends MediaJobStateChangeEventData { + /** + * Gets the Job outputs. + */ + outputs?: MediaJobOutputUnion[]; +} + +/** + * Job error state event data + */ +export interface MediaJobErroredEventData extends MediaJobStateChangeEventData { + /** + * Gets the Job outputs. + */ + outputs?: MediaJobOutputUnion[]; +} + +/** + * Job output canceled event data + */ +export interface MediaJobOutputCanceledEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output canceling event data + */ +export interface MediaJobOutputCancelingEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output error event data + */ +export interface MediaJobOutputErroredEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output finished event data + */ +export interface MediaJobOutputFinishedEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output processing event data + */ +export interface MediaJobOutputProcessingEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Job output scheduled event data + */ +export interface MediaJobOutputScheduledEventData extends MediaJobOutputStateChangeEventData { +} + +/** + * Encoder connect event data. + */ +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. + */ +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. + */ +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. + */ +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. + */ +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. + */ +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. + */ +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. + */ +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. + */ +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 an + * 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; +} + +/** + * Schema of the Data property of an EventGridEvent for an + * 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; +} + +/** + * 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an + * 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 an + * 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 an + * 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 an + * 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 an + * 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an 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 an + * 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 an 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 MRI of the target user + */ + recipientId?: string; + /** + * 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 MRI of the sender + */ + senderId?: string; + /** + * 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 an + * Microsoft.Communication.ChatMessageReceived event. + */ +export interface ACSChatMessageReceivedEventData extends ACSChatMessageEventBaseProperties { + /** + * The body of the chat message + */ + messageBody?: string; +} + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Communication.ChatMessageEdited event. + */ +export interface ACSChatMessageEditedEventData extends ACSChatMessageEventBaseProperties { + /** + * The body of the chat message + */ + messageBody?: string; + /** + * The time at which the message was edited + */ + editTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Communication.ChatMessageDeleted event. + */ +export interface ACSChatMessageDeletedEventData extends ACSChatMessageEventBaseProperties { + /** + * The time at which the message was deleted + */ + deleteTime?: Date; +} + +/** + * Schema of the chat thread member + */ +export interface ACSChatThreadMemberProperties { + /** + * The name of the user + */ + displayName?: string; + /** + * The MRI of the user + */ + memberId?: string; +} + +/** + * 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 an + * Microsoft.Communication.ChatThreadCreatedWithUser event. + */ +export interface ACSChatThreadCreatedWithUserEventData extends ACSChatThreadEventBaseProperties { + /** + * The MRI of the creator of the thread + */ + createdBy?: string; + /** + * The thread properties + */ + properties?: { [propertyName: string]: any }; + /** + * The list of properties of users who are part of the thread + */ + members?: ACSChatThreadMemberProperties[]; +} + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Communication.ChatThreadWithUserDeleted event. + */ +export interface ACSChatThreadWithUserDeletedEventData extends ACSChatThreadEventBaseProperties { + /** + * The MRI of the user who deleted the thread + */ + deletedBy?: string; + /** + * The deletion time of the thread + */ + deleteTime?: Date; +} + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser event. + */ +export interface ACSChatThreadPropertiesUpdatedPerUserEventData extends ACSChatThreadEventBaseProperties { + /** + * The MRI of the user who updated the thread properties + */ + editedBy?: string; + /** + * 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 an + * Microsoft.Communication.ChatMemberAddedToThreadWithUser event. + */ +export interface ACSChatMemberAddedToThreadWithUserEventData extends ACSChatThreadEventBaseProperties { + /** + * The time at which the user was added to the thread + */ + time?: Date; + /** + * The MRI of the user who added the user + */ + addedBy?: string; + /** + * The details of the user who was added + */ + memberAdded?: ACSChatThreadMemberProperties; +} + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Communication.ChatMemberRemovedFromThreadWithUser event. + */ +export interface ACSChatMemberRemovedFromThreadWithUserEventData extends ACSChatThreadEventBaseProperties { + /** + * The time at which the user was removed to the thread + */ + time?: Date; + /** + * The MRI of the user who removed the user + */ + removedBy?: string; + /** + * The details of the user who was removed + */ + memberRemoved?: ACSChatThreadMemberProperties; +} + +/** + * 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 an + * 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; +} + +/** + * Schema of the Data property of an EventGridEvent for an Microsoft.Communication.SMSReceived + * event. + */ +export interface AcsSmsReceivedEventData extends AcsSmsEventBaseProperties { + /** + * The SMS content + */ + message?: string; + /** + * The time at which the SMS was received + */ + receivedTimestamp?: Date; +} + +/** + * 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'; diff --git a/sdk/eventgrid/eventgrid/src/models/mappers.ts b/sdk/eventgrid/eventgrid/src/models/mappers.ts new file mode 100644 index 000000000000..58ff013edde5 --- /dev/null +++ b/sdk/eventgrid/eventgrid/src/models/mappers.ts @@ -0,0 +1,5584 @@ +/* + * 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 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" + } + } + } + } +}; + +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" + } + } + } + } +}; + +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: { + recipientId: { + serializedName: "recipientId", + type: { + name: "String" + } + }, + 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" + } + }, + senderId: { + serializedName: "senderId", + type: { + name: "String" + } + }, + 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" + } + } + } + } +}; + +export const ACSChatMessageEditedEventData: msRest.CompositeMapper = { + serializedName: "ACSChatMessageEditedEventData", + type: { + name: "Composite", + className: "ACSChatMessageEditedEventData", + modelProperties: { + ...ACSChatMessageEventBaseProperties.type.modelProperties, + messageBody: { + serializedName: "messageBody", + 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 ACSChatThreadMemberProperties: msRest.CompositeMapper = { + serializedName: "ACSChatThreadMemberProperties", + type: { + name: "Composite", + className: "ACSChatThreadMemberProperties", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + memberId: { + serializedName: "memberId", + type: { + name: "String" + } + } + } + } +}; + +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, + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + }, + members: { + serializedName: "members", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ACSChatThreadMemberProperties" + } + } + } + } + } + } +}; + +export const ACSChatThreadWithUserDeletedEventData: msRest.CompositeMapper = { + serializedName: "ACSChatThreadWithUserDeletedEventData", + type: { + name: "Composite", + className: "ACSChatThreadWithUserDeletedEventData", + modelProperties: { + ...ACSChatThreadEventBaseProperties.type.modelProperties, + deletedBy: { + serializedName: "deletedBy", + type: { + name: "String" + } + }, + deleteTime: { + serializedName: "deleteTime", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ACSChatThreadPropertiesUpdatedPerUserEventData: msRest.CompositeMapper = { + serializedName: "ACSChatThreadPropertiesUpdatedPerUserEventData", + type: { + name: "Composite", + className: "ACSChatThreadPropertiesUpdatedPerUserEventData", + modelProperties: { + ...ACSChatThreadEventBaseProperties.type.modelProperties, + editedBy: { + serializedName: "editedBy", + type: { + name: "String" + } + }, + editTime: { + serializedName: "editTime", + type: { + name: "DateTime" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "Object" + } + } + } + } + } + } +}; + +export const ACSChatMemberAddedToThreadWithUserEventData: msRest.CompositeMapper = { + serializedName: "ACSChatMemberAddedToThreadWithUserEventData", + type: { + name: "Composite", + className: "ACSChatMemberAddedToThreadWithUserEventData", + modelProperties: { + ...ACSChatThreadEventBaseProperties.type.modelProperties, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + addedBy: { + serializedName: "addedBy", + type: { + name: "String" + } + }, + memberAdded: { + serializedName: "memberAdded", + type: { + name: "Composite", + className: "ACSChatThreadMemberProperties" + } + } + } + } +}; + +export const ACSChatMemberRemovedFromThreadWithUserEventData: msRest.CompositeMapper = { + serializedName: "ACSChatMemberRemovedFromThreadWithUserEventData", + type: { + name: "Composite", + className: "ACSChatMemberRemovedFromThreadWithUserEventData", + modelProperties: { + ...ACSChatThreadEventBaseProperties.type.modelProperties, + time: { + serializedName: "time", + type: { + name: "DateTime" + } + }, + removedBy: { + serializedName: "removedBy", + type: { + name: "String" + } + }, + memberRemoved: { + serializedName: "memberRemoved", + type: { + name: "Composite", + className: "ACSChatThreadMemberProperties" + } + } + } + } +}; + +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" + } + } + } + } +}; + +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 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 9784ff1f1ed3..422b584abd5e 100644 --- a/sdk/eventgrid/eventgrid/tsconfig.json +++ b/sdk/eventgrid/eventgrid/tsconfig.json @@ -1,17 +1,19 @@ { - "extends": "../../../tsconfig.package", "compilerOptions": { - "outDir": "./dist-esm", - "declarationDir": "./types" + "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 }, - "exclude": [ - "node_modules", - "types", - "temp", - "browser", - "dist", - "dist-samples", - "dist-esm", - "./samples/**/*.ts" - ] + "include": ["./src/**/*.ts"], + "exclude": ["node_modules"] }