diff --git a/packages/@azure/arm-eventgrid/LICENSE.txt b/packages/@azure/arm-eventgrid/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/arm-eventgrid/LICENSE.txt +++ b/packages/@azure/arm-eventgrid/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 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. +The MIT License (MIT) + +Copyright (c) 2019 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/packages/@azure/arm-eventgrid/README.md b/packages/@azure/arm-eventgrid/README.md index 842f4b154697..b13027ac981c 100644 --- a/packages/@azure/arm-eventgrid/README.md +++ b/packages/@azure/arm-eventgrid/README.md @@ -1,100 +1,100 @@ -## Azure EventGridManagementClient SDK for JavaScript - -This package contains an isomorphic SDK for EventGridManagementClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/arm-eventgrid -``` - -### How to use - -#### nodejs - Authentication, client creation and get domains as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { EventGridManagementClient, EventGridManagementModels, EventGridManagementMappers } from "@azure/arm-eventgrid"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new EventGridManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const domainName = "testdomainName"; - client.domains.get(resourceGroupName, domainName).then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and get domains as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-eventgrid sample - - - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) +## Azure EventGridManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for EventGridManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-eventgrid +``` + +### How to use + +#### nodejs - Authentication, client creation and get eventSubscriptions as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { EventGridManagementClient, EventGridManagementModels, EventGridManagementMappers } from "@azure/arm-eventgrid"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new EventGridManagementClient(creds, subscriptionId); + const scope = "testscope"; + const eventSubscriptionName = "testeventSubscriptionName"; + client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and get eventSubscriptions as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-eventgrid sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-eventgrid/lib/eventGridManagementClient.ts b/packages/@azure/arm-eventgrid/lib/eventGridManagementClient.ts index 62ae1023d48c..6d188da54a70 100644 --- a/packages/@azure/arm-eventgrid/lib/eventGridManagementClient.ts +++ b/packages/@azure/arm-eventgrid/lib/eventGridManagementClient.ts @@ -17,8 +17,6 @@ import { EventGridManagementClientContext } from "./eventGridManagementClientCon class EventGridManagementClient extends EventGridManagementClientContext { // Operation groups - domains: operations.Domains; - domainTopics: operations.DomainTopics; eventSubscriptions: operations.EventSubscriptions; operations: operations.Operations; topics: operations.Topics; @@ -33,8 +31,6 @@ class EventGridManagementClient extends EventGridManagementClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.EventGridManagementClientOptions) { super(credentials, subscriptionId, options); - this.domains = new operations.Domains(this); - this.domainTopics = new operations.DomainTopics(this); this.eventSubscriptions = new operations.EventSubscriptions(this); this.operations = new operations.Operations(this); this.topics = new operations.Topics(this); diff --git a/packages/@azure/arm-eventgrid/lib/eventGridManagementClientContext.ts b/packages/@azure/arm-eventgrid/lib/eventGridManagementClientContext.ts index 36d249d7d75e..c016a9d4b555 100644 --- a/packages/@azure/arm-eventgrid/lib/eventGridManagementClientContext.ts +++ b/packages/@azure/arm-eventgrid/lib/eventGridManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-eventgrid"; -const packageVersion = "0.1.0"; +const packageVersion = "3.0.0"; export class EventGridManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -45,7 +45,7 @@ export class EventGridManagementClientContext extends msRestAzure.AzureServiceCl super(credentials, options); - this.apiVersion = '2018-09-15-preview'; + this.apiVersion = '2019-01-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/packages/@azure/arm-eventgrid/lib/models/domainTopicsMappers.ts b/packages/@azure/arm-eventgrid/lib/models/domainTopicsMappers.ts deleted file mode 100644 index bcfa10b240d1..000000000000 --- a/packages/@azure/arm-eventgrid/lib/models/domainTopicsMappers.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -export { - discriminators, - DomainTopic, - Resource, - BaseResource, - CloudError, - DomainTopicsListResult, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - AdvancedFilter, - RetryPolicy, - DeadLetterDestination, - TrackedResource, - Topic, - InputSchemaMapping, - EventType, - TopicTypeInfo, - Domain, - NumberInAdvancedFilter, - StorageBlobDeadLetterDestination, - NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - BoolEqualsAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, - StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter, - WebHookEventSubscriptionDestination, - EventHubEventSubscriptionDestination, - StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination, - JsonInputSchemaMapping, - JsonField, - JsonFieldWithDefault -} from "../models/mappers"; - diff --git a/packages/@azure/arm-eventgrid/lib/models/domainsMappers.ts b/packages/@azure/arm-eventgrid/lib/models/domainsMappers.ts deleted file mode 100644 index 5876d926233e..000000000000 --- a/packages/@azure/arm-eventgrid/lib/models/domainsMappers.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -export { - discriminators, - Domain, - TrackedResource, - Resource, - BaseResource, - InputSchemaMapping, - CloudError, - DomainUpdateParameters, - DomainsListResult, - DomainSharedAccessKeys, - DomainRegenerateKeyRequest, - DomainTopic, - EventSubscription, - EventSubscriptionDestination, - EventSubscriptionFilter, - AdvancedFilter, - RetryPolicy, - DeadLetterDestination, - JsonInputSchemaMapping, - JsonField, - JsonFieldWithDefault, - Topic, - EventType, - TopicTypeInfo, - NumberInAdvancedFilter, - StorageBlobDeadLetterDestination, - NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - BoolEqualsAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, - StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter, - WebHookEventSubscriptionDestination, - EventHubEventSubscriptionDestination, - StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination -} from "../models/mappers"; - diff --git a/packages/@azure/arm-eventgrid/lib/models/eventSubscriptionsMappers.ts b/packages/@azure/arm-eventgrid/lib/models/eventSubscriptionsMappers.ts index e1d585181fe8..b2ab4384401a 100644 --- a/packages/@azure/arm-eventgrid/lib/models/eventSubscriptionsMappers.ts +++ b/packages/@azure/arm-eventgrid/lib/models/eventSubscriptionsMappers.ts @@ -1,53 +1,31 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - EventSubscription, - Resource, BaseResource, + CloudError, + DeadLetterDestination, + EventHubEventSubscriptionDestination, + EventSubscription, EventSubscriptionDestination, EventSubscriptionFilter, - AdvancedFilter, - RetryPolicy, - DeadLetterDestination, - CloudError, - EventSubscriptionUpdateParameters, EventSubscriptionFullUrl, EventSubscriptionsListResult, - DomainTopic, - NumberInAdvancedFilter, + EventSubscriptionUpdateParameters, + EventType, + HybridConnectionEventSubscriptionDestination, + Resource, + RetryPolicy, StorageBlobDeadLetterDestination, - NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - BoolEqualsAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, - StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter, - WebHookEventSubscriptionDestination, - EventHubEventSubscriptionDestination, StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination, - TrackedResource, Topic, - InputSchemaMapping, - EventType, TopicTypeInfo, - Domain, - JsonInputSchemaMapping, - JsonField, - JsonFieldWithDefault + TrackedResource, + WebHookEventSubscriptionDestination } from "../models/mappers"; - diff --git a/packages/@azure/arm-eventgrid/lib/models/index.ts b/packages/@azure/arm-eventgrid/lib/models/index.ts index 7b9c0d0bdb99..e2cd912db591 100644 --- a/packages/@azure/arm-eventgrid/lib/models/index.ts +++ b/packages/@azure/arm-eventgrid/lib/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,262 +11,59 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - -/** - * Contains the possible cases for InputSchemaMapping. - */ -export type InputSchemaMappingUnion = InputSchemaMapping | JsonInputSchemaMapping; - -/** - * @interface - * An interface representing InputSchemaMapping. - * By default, Event Grid expects events to be in the Event Grid event schema. - * Specifying an input schema mapping enables publishing to Event Grid using a - * custom input schema. Currently, the only supported type of - * InputSchemaMapping is 'JsonInputSchemaMapping'. - * - */ -export interface InputSchemaMapping { - /** - * @member {string} inputSchemaMappingType Polymorphic Discriminator - */ - inputSchemaMappingType: "InputSchemaMapping"; -} - -/** - * @interface - * An interface representing Resource. - * Definition of a Resource - * - * @extends BaseResource - */ -export interface Resource extends BaseResource { - /** - * @member {string} [id] Fully qualified identifier of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly id?: string; - /** - * @member {string} [name] Name of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly name?: string; - /** - * @member {string} [type] Type of the resource - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly type?: string; -} - -/** - * @interface - * An interface representing TrackedResource. - * Definition of a Tracked Resource - * - * @extends Resource - */ -export interface TrackedResource extends Resource { - /** - * @member {string} location Location of the resource - */ - location: string; - /** - * @member {{ [propertyName: string]: string }} [tags] Tags of the resource - */ - tags?: { [propertyName: string]: string }; -} - -/** - * @interface - * An interface representing Domain. - * EventGrid Domain - * - * @extends TrackedResource - */ -export interface Domain extends TrackedResource { - /** - * @member {DomainProvisioningState} [provisioningState] Provisioning state - * of the domain. Possible values include: 'Creating', 'Updating', - * 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly provisioningState?: DomainProvisioningState; - /** - * @member {string} [endpoint] Endpoint for the domain. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly endpoint?: string; - /** - * @member {InputSchema} [inputSchema] This determines the format that Event - * Grid should expect for incoming events published to the domain. Possible - * values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventV01Schema' - */ - inputSchema?: InputSchema; - /** - * @member {InputSchemaMappingUnion} [inputSchemaMapping] Information about - * the InputSchemaMapping which specified the info about mapping event - * payload. - */ - inputSchemaMapping?: InputSchemaMappingUnion; -} - -/** - * @interface - * An interface representing DomainUpdateParameters. - * Properties of the Domain update - * - */ -export interface DomainUpdateParameters { - /** - * @member {{ [propertyName: string]: string }} [tags] Tags of the domains - * resource - */ - tags?: { [propertyName: string]: string }; -} - -/** - * @interface - * An interface representing DomainSharedAccessKeys. - * Shared access keys of the Domain - * - */ -export interface DomainSharedAccessKeys { - /** - * @member {string} [key1] Shared access key1 for the domain. - */ - key1?: string; - /** - * @member {string} [key2] Shared access key2 for the domain. - */ - key2?: string; -} - -/** - * @interface - * An interface representing DomainRegenerateKeyRequest. - * Domain regenerate share access key request - * - */ -export interface DomainRegenerateKeyRequest { - /** - * @member {string} keyName Key name to regenerate key1 or key2 - */ - keyName: string; -} - -/** - * @interface - * An interface representing DomainTopic. - * Domain Topic - * - * @extends Resource - */ -export interface DomainTopic extends Resource { -} - /** * Contains the possible cases for EventSubscriptionDestination. */ export type EventSubscriptionDestinationUnion = EventSubscriptionDestination | WebHookEventSubscriptionDestination | EventHubEventSubscriptionDestination | StorageQueueEventSubscriptionDestination | HybridConnectionEventSubscriptionDestination; /** - * @interface - * An interface representing EventSubscriptionDestination. * Information about the destination for an event subscription - * */ export interface EventSubscriptionDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "EventSubscriptionDestination"; } /** - * Contains the possible cases for AdvancedFilter. - */ -export type AdvancedFilterUnion = AdvancedFilter | NumberInAdvancedFilter | NumberNotInAdvancedFilter | NumberLessThanAdvancedFilter | NumberGreaterThanAdvancedFilter | NumberLessThanOrEqualsAdvancedFilter | NumberGreaterThanOrEqualsAdvancedFilter | BoolEqualsAdvancedFilter | StringInAdvancedFilter | StringNotInAdvancedFilter | StringBeginsWithAdvancedFilter | StringEndsWithAdvancedFilter | StringContainsAdvancedFilter; - -/** - * @interface - * An interface representing AdvancedFilter. - * Represents an advanced filter that can be used to filter events based on - * various event envelope/data fields. - * - */ -export interface AdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "AdvancedFilter"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; -} - -/** - * @interface - * An interface representing EventSubscriptionFilter. * Filter for the Event Subscription - * */ export interface EventSubscriptionFilter { /** - * @member {string} [subjectBeginsWith] An optional string to filter events - * for an event subscription based on a resource path prefix. + * An optional string to filter events for an event subscription based on a resource path prefix. * The format of this depends on the publisher of the events. * Wildcard characters are not supported in this path. */ subjectBeginsWith?: string; /** - * @member {string} [subjectEndsWith] An optional string to filter events for - * an event subscription based on a resource path suffix. + * An optional string to filter events for an event subscription based on a resource path suffix. * Wildcard characters are not supported in this path. */ subjectEndsWith?: string; /** - * @member {string[]} [includedEventTypes] A list of applicable event types - * that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs - * to be specified as an element in this list. + * A list of applicable event types that need to be part of the event subscription. + * If it is desired to subscribe to all event types, the string "all" needs to be specified as an + * element in this list. */ includedEventTypes?: string[]; /** - * @member {boolean} [isSubjectCaseSensitive] Specifies if the - * SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. Default value: false . + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. Default value: false. */ isSubjectCaseSensitive?: boolean; - /** - * @member {AdvancedFilterUnion[]} [advancedFilters] A list of advanced - * filters. - */ - advancedFilters?: AdvancedFilterUnion[]; } /** - * @interface - * An interface representing RetryPolicy. * Information about the retry policy for an event subscription - * */ export interface RetryPolicy { /** - * @member {number} [maxDeliveryAttempts] Maximum number of delivery retry - * attempts for events. + * Maximum number of delivery retry attempts for events. */ maxDeliveryAttempts?: number; /** - * @member {number} [eventTimeToLiveInMinutes] Time To Live (in minutes) for - * events. + * Time To Live (in minutes) for events. */ eventTimeToLiveInMinutes?: number; } @@ -279,831 +74,373 @@ export interface RetryPolicy { export type DeadLetterDestinationUnion = DeadLetterDestination | StorageBlobDeadLetterDestination; /** - * @interface - * An interface representing DeadLetterDestination. - * Information about the dead letter destination for an event subscription. To - * configure a deadletter destination, do not directly instantiate an object of - * this class. Instead, instantiate an object of a derived class. Currently, - * StorageBlobDeadLetterDestination is the only class that derives from this - * class. - * + * Information about the dead letter destination for an event subscription. To configure a + * deadletter destination, do not directly instantiate an object of this class. Instead, + * instantiate an object of a derived class. Currently, StorageBlobDeadLetterDestination is the + * only class that derives from this class. */ export interface DeadLetterDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "DeadLetterDestination"; } /** - * @interface - * An interface representing NumberInAdvancedFilter. - * NumberIn filter - * + * Definition of a Resource */ -export interface NumberInAdvancedFilter { +export interface Resource extends BaseResource { /** - * @member {string} operatorType Polymorphic Discriminator + * Fully qualified identifier of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operatorType: "NumberIn"; + readonly id?: string; /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. + * Name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - key?: string; + readonly name?: string; /** - * @member {number[]} [values] The set of filter values + * Type of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - values?: number[]; + readonly type?: string; } /** - * @interface - * An interface representing StorageBlobDeadLetterDestination. * Information about the storage blob based dead letter destination. - * */ export interface StorageBlobDeadLetterDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "StorageBlob"; /** - * @member {string} [resourceId] The Azure Resource ID of the storage account - * that is the destination of the deadletter events + * The Azure Resource ID of the storage account that is the destination of the deadletter events. + * For example: + * /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} */ resourceId?: string; /** - * @member {string} [blobContainerName] The name of the Storage blob - * container that is the destination of the deadletter events + * The name of the Storage blob container that is the destination of the deadletter events */ blobContainerName?: string; } /** - * @interface - * An interface representing NumberNotInAdvancedFilter. - * NumberNotIn Filter - * - */ -export interface NumberNotInAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "NumberNotIn"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {number[]} [values] The set of filter values - */ - values?: number[]; -} - -/** - * @interface - * An interface representing NumberLessThanAdvancedFilter. - * NumberLessThan Filter - * - */ -export interface NumberLessThanAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "NumberLessThan"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {number} [value] The filter value - */ - value?: number; -} - -/** - * @interface - * An interface representing NumberGreaterThanAdvancedFilter. - * NumberGreaterThan Filter - * - */ -export interface NumberGreaterThanAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "NumberGreaterThan"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {number} [value] The filter value - */ - value?: number; -} - -/** - * @interface - * An interface representing NumberLessThanOrEqualsAdvancedFilter. - * NumberLessThanOrEquals Filter - * - */ -export interface NumberLessThanOrEqualsAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "NumberLessThanOrEquals"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {number} [value] The filter value - */ - value?: number; -} - -/** - * @interface - * An interface representing NumberGreaterThanOrEqualsAdvancedFilter. - * NumberGreaterThanOrEquals Filter - * - */ -export interface NumberGreaterThanOrEqualsAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "NumberGreaterThanOrEquals"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {number} [value] The filter value - */ - value?: number; -} - -/** - * @interface - * An interface representing BoolEqualsAdvancedFilter. - * BoolEquals Filter - * - */ -export interface BoolEqualsAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "BoolEquals"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {boolean} [value] The filter value - */ - value?: boolean; -} - -/** - * @interface - * An interface representing StringInAdvancedFilter. - * StringIn Filter - * - */ -export interface StringInAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "StringIn"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {string[]} [values] The set of filter values - */ - values?: string[]; -} - -/** - * @interface - * An interface representing StringNotInAdvancedFilter. - * StringNotIn Filter - * - */ -export interface StringNotInAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "StringNotIn"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {string[]} [values] The set of filter values - */ - values?: string[]; -} - -/** - * @interface - * An interface representing StringBeginsWithAdvancedFilter. - * StringBeginsWith Filter - * - */ -export interface StringBeginsWithAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "StringBeginsWith"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {string[]} [values] The set of filter values - */ - values?: string[]; -} - -/** - * @interface - * An interface representing StringEndsWithAdvancedFilter. - * StringEndsWith Filter - * - */ -export interface StringEndsWithAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "StringEndsWith"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {string[]} [values] The set of filter values - */ - values?: string[]; -} - -/** - * @interface - * An interface representing StringContainsAdvancedFilter. - * StringContains Filter - * - */ -export interface StringContainsAdvancedFilter { - /** - * @member {string} operatorType Polymorphic Discriminator - */ - operatorType: "StringContains"; - /** - * @member {string} [key] The filter key. Represents an event property with - * upto two levels of nesting. - */ - key?: string; - /** - * @member {string[]} [values] The set of filter values - */ - values?: string[]; -} - -/** - * @interface - * An interface representing WebHookEventSubscriptionDestination. * Information about the webhook destination for an event subscription - * */ export interface WebHookEventSubscriptionDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "WebHook"; /** - * @member {string} [endpointUrl] The URL that represents the endpoint of the - * destination of an event subscription. + * The URL that represents the endpoint of the destination of an event subscription. */ endpointUrl?: string; /** - * @member {string} [endpointBaseUrl] The base URL that represents the - * endpoint of the destination of an event subscription. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The base URL that represents the endpoint of the destination of an event subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly endpointBaseUrl?: string; } /** - * @interface - * An interface representing EventHubEventSubscriptionDestination. * Information about the event hub destination for an event subscription - * */ export interface EventHubEventSubscriptionDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "EventHub"; /** - * @member {string} [resourceId] The Azure Resource Id that represents the - * endpoint of an Event Hub destination of an event subscription. + * The Azure Resource Id that represents the endpoint of an Event Hub destination of an event + * subscription. */ resourceId?: string; } /** - * @interface - * An interface representing StorageQueueEventSubscriptionDestination. * Information about the storage queue destination for an event subscription. - * */ export interface StorageQueueEventSubscriptionDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "StorageQueue"; /** - * @member {string} [resourceId] The Azure Resource ID of the storage account - * that contains the queue that is the destination of an event subscription. + * The Azure Resource ID of the storage account that contains the queue that is the destination + * of an event subscription. */ resourceId?: string; /** - * @member {string} [queueName] The name of the Storage queue under a storage - * account that is the destination of an event subscription. + * The name of the Storage queue under a storage account that is the destination of an event + * subscription. */ queueName?: string; } /** - * @interface - * An interface representing HybridConnectionEventSubscriptionDestination. - * Information about the HybridConnection destination for an event - * subscription. - * + * Information about the HybridConnection destination for an event subscription. */ export interface HybridConnectionEventSubscriptionDestination { /** - * @member {string} endpointType Polymorphic Discriminator + * Polymorphic Discriminator */ endpointType: "HybridConnection"; /** - * @member {string} [resourceId] The Azure Resource ID of an hybrid - * connection that is the destination of an event subscription. + * The Azure Resource ID of an hybrid connection that is the destination of an event + * subscription. */ resourceId?: string; } /** - * @interface - * An interface representing EventSubscription. * Event Subscription - * - * @extends Resource */ export interface EventSubscription extends Resource { /** - * @member {string} [topic] Name of the topic of the event subscription. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the topic of the event subscription. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly topic?: string; /** - * @member {EventSubscriptionProvisioningState} [provisioningState] - * Provisioning state of the event subscription. Possible values include: - * 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', - * 'AwaitingManualAction' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Provisioning state of the event subscription. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Canceled', 'Failed', 'AwaitingManualAction' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: EventSubscriptionProvisioningState; /** - * @member {EventSubscriptionDestinationUnion} [destination] Information - * about the destination where events have to be delivered for the event + * Information about the destination where events have to be delivered for the event * subscription. */ destination?: EventSubscriptionDestinationUnion; /** - * @member {EventSubscriptionFilter} [filter] Information about the filter - * for the event subscription. + * Information about the filter for the event subscription. */ filter?: EventSubscriptionFilter; /** - * @member {string[]} [labels] List of user defined labels. + * List of user defined labels. */ labels?: string[]; /** - * @member {Date} [expirationTimeUtc] Expiration time of the event - * subscription. - */ - expirationTimeUtc?: Date; - /** - * @member {EventDeliverySchema} [eventDeliverySchema] The event delivery - * schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' - */ - eventDeliverySchema?: EventDeliverySchema; - /** - * @member {RetryPolicy} [retryPolicy] The retry policy for events. This can - * be used to configure maximum number of delivery attempts and time to live - * for events. + * The retry policy for events. This can be used to configure maximum number of delivery attempts + * and time to live for events. */ retryPolicy?: RetryPolicy; /** - * @member {DeadLetterDestinationUnion} [deadLetterDestination] The - * DeadLetter destination of the event subscription. + * The DeadLetter destination of the event subscription. */ deadLetterDestination?: DeadLetterDestinationUnion; } /** - * @interface - * An interface representing EventSubscriptionUpdateParameters. * Properties of the Event Subscription update - * */ export interface EventSubscriptionUpdateParameters { /** - * @member {EventSubscriptionDestinationUnion} [destination] Information - * about the destination where events have to be delivered for the event + * Information about the destination where events have to be delivered for the event * subscription. */ destination?: EventSubscriptionDestinationUnion; /** - * @member {EventSubscriptionFilter} [filter] Information about the filter - * for the event subscription. + * Information about the filter for the event subscription. */ filter?: EventSubscriptionFilter; /** - * @member {string[]} [labels] List of user defined labels. + * List of user defined labels. */ labels?: string[]; /** - * @member {Date} [expirationTimeUtc] Information about the expiration time - * for the event subscription. - */ - expirationTimeUtc?: Date; - /** - * @member {EventDeliverySchema} [eventDeliverySchema] The event delivery - * schema for the event subscription. Possible values include: - * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' - */ - eventDeliverySchema?: EventDeliverySchema; - /** - * @member {RetryPolicy} [retryPolicy] The retry policy for events. This can - * be used to configure maximum number of delivery attempts and time to live - * for events. + * The retry policy for events. This can be used to configure maximum number of delivery attempts + * and time to live for events. */ retryPolicy?: RetryPolicy; /** - * @member {DeadLetterDestinationUnion} [deadLetterDestination] The - * DeadLetter destination of the event subscription. + * The DeadLetter destination of the event subscription. */ deadLetterDestination?: DeadLetterDestinationUnion; } /** - * @interface - * An interface representing EventSubscriptionFullUrl. * Full endpoint url of an event subscription - * */ export interface EventSubscriptionFullUrl { /** - * @member {string} [endpointUrl] The URL that represents the endpoint of the - * destination of an event subscription. + * The URL that represents the endpoint of the destination of an event subscription. */ endpointUrl?: string; } /** - * @interface - * An interface representing OperationInfo. * Information about an operation - * */ export interface OperationInfo { /** - * @member {string} [provider] Name of the provider + * Name of the provider */ provider?: string; /** - * @member {string} [resource] Name of the resource type + * Name of the resource type */ resource?: string; /** - * @member {string} [operation] Name of the operation + * Name of the operation */ operation?: string; /** - * @member {string} [description] Description of the operation + * Description of the operation */ description?: string; } /** - * @interface - * An interface representing Operation. * Represents an operation returned by the GetOperations request - * */ export interface Operation { /** - * @member {string} [name] Name of the operation + * Name of the operation */ name?: string; /** - * @member {OperationInfo} [display] Display name of the operation + * Display name of the operation */ display?: OperationInfo; /** - * @member {string} [origin] Origin of the operation + * Origin of the operation */ origin?: string; /** - * @member {any} [properties] Properties of the operation + * Properties of the operation */ properties?: any; } /** - * @interface - * An interface representing JsonField. - * This is used to express the source of an input schema mapping for a single - * target field in the Event Grid Event schema. This is currently used in the - * mappings for the 'id','topic' and 'eventtime' properties. This represents a - * field in the input event schema. - * - */ -export interface JsonField { - /** - * @member {string} [sourceField] Name of a field in the input event schema - * that's to be used as the source of a mapping. - */ - sourceField?: string; -} - -/** - * @interface - * An interface representing JsonFieldWithDefault. - * This is used to express the source of an input schema mapping for a single - * target field in the Event Grid Event schema. This is currently used in the - * mappings for the 'subject','eventtype' and 'dataversion' properties. This - * represents a field in the input event schema along with a default value to - * be used, and at least one of these two properties should be provided. - * - */ -export interface JsonFieldWithDefault { - /** - * @member {string} [sourceField] Name of a field in the input event schema - * that's to be used as the source of a mapping. - */ - sourceField?: string; - /** - * @member {string} [defaultValue] The default value to be used for mapping - * when a SourceField is not provided or if there's no property with the - * specified name in the published JSON event payload. - */ - defaultValue?: string; -} - -/** - * @interface - * An interface representing JsonInputSchemaMapping. - * This enables publishing to Event Grid using a custom input schema. This can - * be used to map properties from a custom input JSON schema to the Event Grid - * event schema. - * + * Definition of a Tracked Resource */ -export interface JsonInputSchemaMapping { - /** - * @member {string} inputSchemaMappingType Polymorphic Discriminator - */ - inputSchemaMappingType: "Json"; - /** - * @member {JsonField} [id] The mapping information for the Id property of - * the Event Grid Event. - */ - id?: JsonField; - /** - * @member {JsonField} [topic] The mapping information for the Topic property - * of the Event Grid Event. - */ - topic?: JsonField; - /** - * @member {JsonField} [eventTime] The mapping information for the EventTime - * property of the Event Grid Event. - */ - eventTime?: JsonField; - /** - * @member {JsonFieldWithDefault} [eventType] The mapping information for the - * EventType property of the Event Grid Event. - */ - eventType?: JsonFieldWithDefault; +export interface TrackedResource extends Resource { /** - * @member {JsonFieldWithDefault} [subject] The mapping information for the - * Subject property of the Event Grid Event. + * Location of the resource */ - subject?: JsonFieldWithDefault; + location: string; /** - * @member {JsonFieldWithDefault} [dataVersion] The mapping information for - * the DataVersion property of the Event Grid Event. + * Tags of the resource */ - dataVersion?: JsonFieldWithDefault; + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing Topic. * EventGrid Topic - * - * @extends TrackedResource */ export interface Topic extends TrackedResource { /** - * @member {TopicProvisioningState} [provisioningState] Provisioning state of - * the topic. Possible values include: 'Creating', 'Updating', 'Deleting', + * Provisioning state of the topic. Possible values include: 'Creating', 'Updating', 'Deleting', * 'Succeeded', 'Canceled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: TopicProvisioningState; /** - * @member {string} [endpoint] Endpoint for the topic. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Endpoint for the topic. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly endpoint?: string; - /** - * @member {InputSchema} [inputSchema] This determines the format that Event - * Grid should expect for incoming events published to the topic. Possible - * values include: 'EventGridSchema', 'CustomEventSchema', - * 'CloudEventV01Schema'. Default value: 'EventGridSchema' . - */ - inputSchema?: InputSchema; - /** - * @member {InputSchemaMappingUnion} [inputSchemaMapping] This enables - * publishing using custom event schemas. An InputSchemaMapping can be - * specified to map various properties of a source schema to various required - * properties of the EventGridEvent schema. - */ - inputSchemaMapping?: InputSchemaMappingUnion; } /** - * @interface - * An interface representing TopicUpdateParameters. * Properties of the Topic update - * */ export interface TopicUpdateParameters { /** - * @member {{ [propertyName: string]: string }} [tags] Tags of the resource + * Tags of the resource */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing TopicSharedAccessKeys. * Shared access keys of the Topic - * */ export interface TopicSharedAccessKeys { /** - * @member {string} [key1] Shared access key1 for the topic. + * Shared access key1 for the topic. */ key1?: string; /** - * @member {string} [key2] Shared access key2 for the topic. + * Shared access key2 for the topic. */ key2?: string; } /** - * @interface - * An interface representing TopicRegenerateKeyRequest. * Topic regenerate share access key request - * */ export interface TopicRegenerateKeyRequest { /** - * @member {string} keyName Key name to regenerate key1 or key2 + * Key name to regenerate key1 or key2 */ keyName: string; } /** - * @interface - * An interface representing EventType. * Event Type for a subject under a topic - * - * @extends Resource */ export interface EventType extends Resource { /** - * @member {string} [displayName] Display name of the event type. + * Display name of the event type. */ displayName?: string; /** - * @member {string} [description] Description of the event type. + * Description of the event type. */ description?: string; /** - * @member {string} [schemaUrl] Url of the schema for this event type. + * Url of the schema for this event type. */ schemaUrl?: string; } /** - * @interface - * An interface representing TopicTypeInfo. * Properties of a topic type info. - * - * @extends Resource */ export interface TopicTypeInfo extends Resource { /** - * @member {string} [provider] Namespace of the provider of the topic type. + * Namespace of the provider of the topic type. */ provider?: string; /** - * @member {string} [displayName] Display Name for the topic type. + * Display Name for the topic type. */ displayName?: string; /** - * @member {string} [description] Description of the topic type. + * Description of the topic type. */ description?: string; /** - * @member {ResourceRegionType} [resourceRegionType] Region type of the - * resource. Possible values include: 'RegionalResource', 'GlobalResource' + * Region type of the resource. Possible values include: 'RegionalResource', 'GlobalResource' */ resourceRegionType?: ResourceRegionType; /** - * @member {TopicTypeProvisioningState} [provisioningState] Provisioning - * state of the topic type. Possible values include: 'Creating', 'Updating', + * Provisioning state of the topic type. Possible values include: 'Creating', 'Updating', * 'Deleting', 'Succeeded', 'Canceled', 'Failed' */ provisioningState?: TopicTypeProvisioningState; /** - * @member {string[]} [supportedLocations] List of locations supported by - * this topic type. + * List of locations supported by this topic type. */ supportedLocations?: string[]; } /** - * @interface - * An interface representing EventGridManagementClientOptions. - * @extends AzureServiceClientOptions - */ -export interface EventGridManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ - baseUri?: string; -} - - -/** - * @interface - * An interface representing the DomainsListResult. - * Result of the List Domains operation - * - * @extends Array - */ -export interface DomainsListResult extends Array { -} - -/** - * @interface - * An interface representing the DomainTopicsListResult. - * Result of the List Domain Topics operation - * - * @extends Array + * An interface representing EventGridManagementClientOptions. */ -export interface DomainTopicsListResult extends Array { +export interface EventGridManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; } /** * @interface - * An interface representing the EventSubscriptionsListResult. * Result of the List EventSubscriptions operation - * * @extends Array */ export interface EventSubscriptionsListResult extends Array { @@ -1111,9 +448,7 @@ export interface EventSubscriptionsListResult extends Array { /** * @interface - * An interface representing the OperationsListResult. * Result of the List Operations operation - * * @extends Array */ export interface OperationsListResult extends Array { @@ -1121,9 +456,7 @@ export interface OperationsListResult extends Array { /** * @interface - * An interface representing the TopicsListResult. * Result of the List Topics operation - * * @extends Array */ export interface TopicsListResult extends Array { @@ -1131,9 +464,7 @@ export interface TopicsListResult extends Array { /** * @interface - * An interface representing the EventTypesListResult. * Result of the List Event Types operation - * * @extends Array */ export interface EventTypesListResult extends Array { @@ -1141,30 +472,12 @@ export interface EventTypesListResult extends Array { /** * @interface - * An interface representing the TopicTypesListResult. * Result of the List Topic Types operation - * * @extends Array */ export interface TopicTypesListResult extends Array { } -/** - * Defines values for DomainProvisioningState. - * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' - * @readonly - * @enum {string} - */ -export type DomainProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; - -/** - * Defines values for InputSchema. - * Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - * @readonly - * @enum {string} - */ -export type InputSchema = 'EventGridSchema' | 'CustomEventSchema' | 'CloudEventV01Schema'; - /** * Defines values for EventSubscriptionProvisioningState. * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed', @@ -1174,14 +487,6 @@ export type InputSchema = 'EventGridSchema' | 'CustomEventSchema' | 'CloudEventV */ export type EventSubscriptionProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed' | 'AwaitingManualAction'; -/** - * Defines values for EventDeliverySchema. - * Possible values include: 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' - * @readonly - * @enum {string} - */ -export type EventDeliverySchema = 'EventGridSchema' | 'CloudEventV01Schema' | 'CustomInputSchema'; - /** * Defines values for TopicProvisioningState. * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed' @@ -1206,215 +511,6 @@ export type ResourceRegionType = 'RegionalResource' | 'GlobalResource'; */ export type TopicTypeProvisioningState = 'Creating' | 'Updating' | 'Deleting' | 'Succeeded' | 'Canceled' | 'Failed'; -/** - * Contains response data for the get operation. - */ -export type DomainsGetResponse = Domain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Domain; - }; -}; - -/** - * Contains response data for the createOrUpdate operation. - */ -export type DomainsCreateOrUpdateResponse = Domain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Domain; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type DomainsUpdateResponse = Domain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Domain; - }; -}; - -/** - * Contains response data for the listBySubscription operation. - */ -export type DomainsListBySubscriptionResponse = DomainsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainsListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type DomainsListByResourceGroupResponse = DomainsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainsListResult; - }; -}; - -/** - * Contains response data for the listSharedAccessKeys operation. - */ -export type DomainsListSharedAccessKeysResponse = DomainSharedAccessKeys & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainSharedAccessKeys; - }; -}; - -/** - * Contains response data for the regenerateKey operation. - */ -export type DomainsRegenerateKeyResponse = DomainSharedAccessKeys & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainSharedAccessKeys; - }; -}; - -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DomainsBeginCreateOrUpdateResponse = Domain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Domain; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type DomainsBeginUpdateResponse = Domain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Domain; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DomainTopicsGetResponse = DomainTopic & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainTopic; - }; -}; - -/** - * Contains response data for the listByDomain operation. - */ -export type DomainTopicsListByDomainResponse = DomainTopicsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainTopicsListResult; - }; -}; - /** * Contains response data for the get operation. */ @@ -1427,6 +523,7 @@ export type EventSubscriptionsGetResponse = EventSubscription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1446,6 +543,7 @@ export type EventSubscriptionsCreateOrUpdateResponse = EventSubscription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1465,6 +563,7 @@ export type EventSubscriptionsUpdateResponse = EventSubscription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1484,6 +583,7 @@ export type EventSubscriptionsGetFullUrlResponse = EventSubscriptionFullUrl & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1503,6 +603,7 @@ export type EventSubscriptionsListGlobalBySubscriptionResponse = EventSubscripti * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1522,6 +623,7 @@ export type EventSubscriptionsListGlobalBySubscriptionForTopicTypeResponse = Eve * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1541,6 +643,7 @@ export type EventSubscriptionsListGlobalByResourceGroupResponse = EventSubscript * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1560,6 +663,7 @@ export type EventSubscriptionsListGlobalByResourceGroupForTopicTypeResponse = Ev * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1579,6 +683,7 @@ export type EventSubscriptionsListRegionalBySubscriptionResponse = EventSubscrip * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1598,6 +703,7 @@ export type EventSubscriptionsListRegionalByResourceGroupResponse = EventSubscri * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1617,6 +723,7 @@ export type EventSubscriptionsListRegionalBySubscriptionForTopicTypeResponse = E * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1636,6 +743,7 @@ export type EventSubscriptionsListRegionalByResourceGroupForTopicTypeResponse = * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1655,25 +763,7 @@ export type EventSubscriptionsListByResourceResponse = EventSubscriptionsListRes * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: EventSubscriptionsListResult; - }; -}; -/** - * Contains response data for the listByDomainTopic operation. - */ -export type EventSubscriptionsListByDomainTopicResponse = EventSubscriptionsListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; /** * The response body as parsed JSON or XML */ @@ -1693,6 +783,7 @@ export type EventSubscriptionsBeginCreateOrUpdateResponse = EventSubscription & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1712,6 +803,7 @@ export type EventSubscriptionsBeginUpdateResponse = EventSubscription & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1731,6 +823,7 @@ export type OperationsListResponse = OperationsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1750,6 +843,7 @@ export type TopicsGetResponse = Topic & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1769,6 +863,7 @@ export type TopicsCreateOrUpdateResponse = Topic & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1788,6 +883,7 @@ export type TopicsUpdateResponse = Topic & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1807,6 +903,7 @@ export type TopicsListBySubscriptionResponse = TopicsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1826,6 +923,7 @@ export type TopicsListByResourceGroupResponse = TopicsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1845,6 +943,7 @@ export type TopicsListSharedAccessKeysResponse = TopicSharedAccessKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1864,6 +963,7 @@ export type TopicsRegenerateKeyResponse = TopicSharedAccessKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1883,6 +983,7 @@ export type TopicsListEventTypesResponse = EventTypesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1902,6 +1003,7 @@ export type TopicsBeginCreateOrUpdateResponse = Topic & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1921,6 +1023,7 @@ export type TopicsBeginUpdateResponse = Topic & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1940,6 +1043,7 @@ export type TopicTypesListResponse = TopicTypesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1959,6 +1063,7 @@ export type TopicTypesGetResponse = TopicTypeInfo & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1978,6 +1083,7 @@ export type TopicTypesListEventTypesResponse = EventTypesListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/packages/@azure/arm-eventgrid/lib/models/mappers.ts b/packages/@azure/arm-eventgrid/lib/models/mappers.ts index 03369dae39de..afe677bc8dce 100644 --- a/packages/@azure/arm-eventgrid/lib/models/mappers.ts +++ b/packages/@azure/arm-eventgrid/lib/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,197 +12,6 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const InputSchemaMapping: msRest.CompositeMapper = { - serializedName: "InputSchemaMapping", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "inputSchemaMappingType", - clientName: "inputSchemaMappingType" - }, - uberParent: "InputSchemaMapping", - className: "InputSchemaMapping", - modelProperties: { - inputSchemaMappingType: { - required: true, - serializedName: "inputSchemaMappingType", - type: { - name: "String" - } - } - } - } -}; - -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const Domain: msRest.CompositeMapper = { - serializedName: "Domain", - type: { - name: "Composite", - className: "Domain", - modelProperties: { - ...TrackedResource.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - }, - endpoint: { - readOnly: true, - serializedName: "properties.endpoint", - type: { - name: "String" - } - }, - inputSchema: { - serializedName: "properties.inputSchema", - type: { - name: "String" - } - }, - inputSchemaMapping: { - serializedName: "properties.inputSchemaMapping", - type: { - name: "Composite", - className: "InputSchemaMapping" - } - } - } - } -}; - -export const DomainUpdateParameters: msRest.CompositeMapper = { - serializedName: "DomainUpdateParameters", - type: { - name: "Composite", - className: "DomainUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DomainSharedAccessKeys: msRest.CompositeMapper = { - serializedName: "DomainSharedAccessKeys", - type: { - name: "Composite", - className: "DomainSharedAccessKeys", - modelProperties: { - key1: { - serializedName: "key1", - type: { - name: "String" - } - }, - key2: { - serializedName: "key2", - type: { - name: "String" - } - } - } - } -}; - -export const DomainRegenerateKeyRequest: msRest.CompositeMapper = { - serializedName: "DomainRegenerateKeyRequest", - type: { - name: "Composite", - className: "DomainRegenerateKeyRequest", - modelProperties: { - keyName: { - required: true, - serializedName: "keyName", - type: { - name: "String" - } - } - } - } -}; - -export const DomainTopic: msRest.CompositeMapper = { - serializedName: "DomainTopic", - type: { - name: "Composite", - className: "DomainTopic", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - export const EventSubscriptionDestination: msRest.CompositeMapper = { serializedName: "EventSubscriptionDestination", type: { @@ -227,34 +34,6 @@ export const EventSubscriptionDestination: msRest.CompositeMapper = { } }; -export const AdvancedFilter: msRest.CompositeMapper = { - serializedName: "AdvancedFilter", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "operatorType", - clientName: "operatorType" - }, - uberParent: "AdvancedFilter", - className: "AdvancedFilter", - modelProperties: { - key: { - serializedName: "key", - type: { - name: "String" - } - }, - operatorType: { - required: true, - serializedName: "operatorType", - type: { - name: "String" - } - } - } - } -}; - export const EventSubscriptionFilter: msRest.CompositeMapper = { serializedName: "EventSubscriptionFilter", type: { @@ -290,18 +69,6 @@ export const EventSubscriptionFilter: msRest.CompositeMapper = { type: { name: "Boolean" } - }, - advancedFilters: { - serializedName: "advancedFilters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AdvancedFilter" - } - } - } } } } @@ -351,24 +118,31 @@ export const DeadLetterDestination: msRest.CompositeMapper = { } }; -export const NumberInAdvancedFilter: msRest.CompositeMapper = { - serializedName: "NumberIn", +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", type: { name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "NumberInAdvancedFilter", + className: "Resource", modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", + id: { + readOnly: true, + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" } } } @@ -400,245 +174,6 @@ export const StorageBlobDeadLetterDestination: msRest.CompositeMapper = { } }; -export const NumberNotInAdvancedFilter: msRest.CompositeMapper = { - serializedName: "NumberNotIn", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "NumberNotInAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "Number" - } - } - } - } - } - } -}; - -export const NumberLessThanAdvancedFilter: msRest.CompositeMapper = { - serializedName: "NumberLessThan", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "NumberLessThanAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "Number" - } - } - } - } -}; - -export const NumberGreaterThanAdvancedFilter: msRest.CompositeMapper = { - serializedName: "NumberGreaterThan", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "NumberGreaterThanAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "Number" - } - } - } - } -}; - -export const NumberLessThanOrEqualsAdvancedFilter: msRest.CompositeMapper = { - serializedName: "NumberLessThanOrEquals", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "NumberLessThanOrEqualsAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "Number" - } - } - } - } -}; - -export const NumberGreaterThanOrEqualsAdvancedFilter: msRest.CompositeMapper = { - serializedName: "NumberGreaterThanOrEquals", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "NumberGreaterThanOrEqualsAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "Number" - } - } - } - } -}; - -export const BoolEqualsAdvancedFilter: msRest.CompositeMapper = { - serializedName: "BoolEquals", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "BoolEqualsAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - value: { - serializedName: "value", - type: { - name: "Boolean" - } - } - } - } -}; - -export const StringInAdvancedFilter: msRest.CompositeMapper = { - serializedName: "StringIn", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "StringInAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StringNotInAdvancedFilter: msRest.CompositeMapper = { - serializedName: "StringNotIn", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "StringNotInAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StringBeginsWithAdvancedFilter: msRest.CompositeMapper = { - serializedName: "StringBeginsWith", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "StringBeginsWithAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StringEndsWithAdvancedFilter: msRest.CompositeMapper = { - serializedName: "StringEndsWith", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "StringEndsWithAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const StringContainsAdvancedFilter: msRest.CompositeMapper = { - serializedName: "StringContains", - type: { - name: "Composite", - polymorphicDiscriminator: AdvancedFilter.type.polymorphicDiscriminator, - uberParent: "AdvancedFilter", - className: "StringContainsAdvancedFilter", - modelProperties: { - ...AdvancedFilter.type.modelProperties, - values: { - serializedName: "values", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - export const WebHookEventSubscriptionDestination: msRest.CompositeMapper = { serializedName: "WebHook", type: { @@ -774,18 +309,6 @@ export const EventSubscription: msRest.CompositeMapper = { } } }, - expirationTimeUtc: { - serializedName: "properties.expirationTimeUtc", - type: { - name: "DateTime" - } - }, - eventDeliverySchema: { - serializedName: "properties.eventDeliverySchema", - type: { - name: "String" - } - }, retryPolicy: { serializedName: "properties.retryPolicy", type: { @@ -835,18 +358,6 @@ export const EventSubscriptionUpdateParameters: msRest.CompositeMapper = { } } }, - expirationTimeUtc: { - serializedName: "expirationTimeUtc", - type: { - name: "DateTime" - } - }, - eventDeliverySchema: { - serializedName: "eventDeliverySchema", - type: { - name: "String" - } - }, retryPolicy: { serializedName: "retryPolicy", type: { @@ -950,93 +461,29 @@ export const Operation: msRest.CompositeMapper = { } }; -export const JsonField: msRest.CompositeMapper = { - serializedName: "JsonField", - type: { - name: "Composite", - className: "JsonField", - modelProperties: { - sourceField: { - serializedName: "sourceField", - type: { - name: "String" - } - } - } - } -}; - -export const JsonFieldWithDefault: msRest.CompositeMapper = { - serializedName: "JsonFieldWithDefault", +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", type: { name: "Composite", - className: "JsonFieldWithDefault", + className: "TrackedResource", modelProperties: { - sourceField: { - serializedName: "sourceField", - type: { - name: "String" - } - }, - defaultValue: { - serializedName: "defaultValue", + ...Resource.type.modelProperties, + location: { + required: true, + serializedName: "location", type: { name: "String" } - } - } - } -}; - -export const JsonInputSchemaMapping: msRest.CompositeMapper = { - serializedName: "Json", - type: { - name: "Composite", - polymorphicDiscriminator: InputSchemaMapping.type.polymorphicDiscriminator, - uberParent: "InputSchemaMapping", - className: "JsonInputSchemaMapping", - modelProperties: { - ...InputSchemaMapping.type.modelProperties, - id: { - serializedName: "properties.id", - type: { - name: "Composite", - className: "JsonField" - } - }, - topic: { - serializedName: "properties.topic", - type: { - name: "Composite", - className: "JsonField" - } - }, - eventTime: { - serializedName: "properties.eventTime", - type: { - name: "Composite", - className: "JsonField" - } - }, - eventType: { - serializedName: "properties.eventType", - type: { - name: "Composite", - className: "JsonFieldWithDefault" - } - }, - subject: { - serializedName: "properties.subject", - type: { - name: "Composite", - className: "JsonFieldWithDefault" - } }, - dataVersion: { - serializedName: "properties.dataVersion", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "JsonFieldWithDefault" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } } } @@ -1063,20 +510,6 @@ export const Topic: msRest.CompositeMapper = { type: { name: "String" } - }, - inputSchema: { - serializedName: "properties.inputSchema", - defaultValue: 'EventGridSchema', - type: { - name: "String" - } - }, - inputSchemaMapping: { - serializedName: "properties.inputSchemaMapping", - type: { - name: "Composite", - className: "InputSchemaMapping" - } } } } @@ -1223,50 +656,6 @@ export const TopicTypeInfo: msRest.CompositeMapper = { } }; -export const DomainsListResult: msRest.CompositeMapper = { - serializedName: "DomainsListResult", - type: { - name: "Composite", - className: "DomainsListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Domain" - } - } - } - } - } - } -}; - -export const DomainTopicsListResult: msRest.CompositeMapper = { - serializedName: "DomainTopicsListResult", - type: { - name: "Composite", - className: "DomainTopicsListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DomainTopic" - } - } - } - } - } - } -}; - export const EventSubscriptionsListResult: msRest.CompositeMapper = { serializedName: "EventSubscriptionsListResult", type: { @@ -1378,26 +767,12 @@ export const TopicTypesListResult: msRest.CompositeMapper = { }; export const discriminators = { - 'InputSchemaMapping' : InputSchemaMapping, 'EventSubscriptionDestination' : EventSubscriptionDestination, - 'AdvancedFilter' : AdvancedFilter, 'DeadLetterDestination' : DeadLetterDestination, - 'AdvancedFilter.NumberIn' : NumberInAdvancedFilter, 'DeadLetterDestination.StorageBlob' : StorageBlobDeadLetterDestination, - 'AdvancedFilter.NumberNotIn' : NumberNotInAdvancedFilter, - 'AdvancedFilter.NumberLessThan' : NumberLessThanAdvancedFilter, - 'AdvancedFilter.NumberGreaterThan' : NumberGreaterThanAdvancedFilter, - 'AdvancedFilter.NumberLessThanOrEquals' : NumberLessThanOrEqualsAdvancedFilter, - 'AdvancedFilter.NumberGreaterThanOrEquals' : NumberGreaterThanOrEqualsAdvancedFilter, - 'AdvancedFilter.BoolEquals' : BoolEqualsAdvancedFilter, - 'AdvancedFilter.StringIn' : StringInAdvancedFilter, - 'AdvancedFilter.StringNotIn' : StringNotInAdvancedFilter, - 'AdvancedFilter.StringBeginsWith' : StringBeginsWithAdvancedFilter, - 'AdvancedFilter.StringEndsWith' : StringEndsWithAdvancedFilter, - 'AdvancedFilter.StringContains' : StringContainsAdvancedFilter, 'EventSubscriptionDestination.WebHook' : WebHookEventSubscriptionDestination, 'EventSubscriptionDestination.EventHub' : EventHubEventSubscriptionDestination, 'EventSubscriptionDestination.StorageQueue' : StorageQueueEventSubscriptionDestination, - 'EventSubscriptionDestination.HybridConnection' : HybridConnectionEventSubscriptionDestination, - 'InputSchemaMapping.Json' : JsonInputSchemaMapping + 'EventSubscriptionDestination.HybridConnection' : HybridConnectionEventSubscriptionDestination + }; diff --git a/packages/@azure/arm-eventgrid/lib/models/operationsMappers.ts b/packages/@azure/arm-eventgrid/lib/models/operationsMappers.ts index e1a006e873f3..73a6f0e22003 100644 --- a/packages/@azure/arm-eventgrid/lib/models/operationsMappers.ts +++ b/packages/@azure/arm-eventgrid/lib/models/operationsMappers.ts @@ -1,18 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - OperationsListResult, + CloudError, Operation, OperationInfo, - CloudError + OperationsListResult } from "../models/mappers"; - diff --git a/packages/@azure/arm-eventgrid/lib/models/parameters.ts b/packages/@azure/arm-eventgrid/lib/models/parameters.ts index 743bb232ee3b..7db12be511fd 100644 --- a/packages/@azure/arm-eventgrid/lib/models/parameters.ts +++ b/packages/@azure/arm-eventgrid/lib/models/parameters.ts @@ -30,16 +30,6 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const domainName: msRest.OperationURLParameter = { - parameterPath: "domainName", - mapper: { - required: true, - serializedName: "domainName", - type: { - name: "String" - } - } -}; export const eventSubscriptionName: msRest.OperationURLParameter = { parameterPath: "eventSubscriptionName", mapper: { diff --git a/packages/@azure/arm-eventgrid/lib/models/topicTypesMappers.ts b/packages/@azure/arm-eventgrid/lib/models/topicTypesMappers.ts index 462f1c22833e..67abfadf316e 100644 --- a/packages/@azure/arm-eventgrid/lib/models/topicTypesMappers.ts +++ b/packages/@azure/arm-eventgrid/lib/models/topicTypesMappers.ts @@ -1,52 +1,30 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - TopicTypesListResult, - TopicTypeInfo, - Resource, BaseResource, CloudError, - EventTypesListResult, - EventType, - DomainTopic, + DeadLetterDestination, + EventHubEventSubscriptionDestination, EventSubscription, EventSubscriptionDestination, EventSubscriptionFilter, - AdvancedFilter, + EventType, + EventTypesListResult, + HybridConnectionEventSubscriptionDestination, + Resource, RetryPolicy, - DeadLetterDestination, - TrackedResource, - Topic, - InputSchemaMapping, - Domain, - NumberInAdvancedFilter, StorageBlobDeadLetterDestination, - NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - BoolEqualsAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, - StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter, - WebHookEventSubscriptionDestination, - EventHubEventSubscriptionDestination, StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination, - JsonInputSchemaMapping, - JsonField, - JsonFieldWithDefault + Topic, + TopicTypeInfo, + TopicTypesListResult, + TrackedResource, + WebHookEventSubscriptionDestination } from "../models/mappers"; - diff --git a/packages/@azure/arm-eventgrid/lib/models/topicsMappers.ts b/packages/@azure/arm-eventgrid/lib/models/topicsMappers.ts index d3c7c059f431..9d275f2607ce 100644 --- a/packages/@azure/arm-eventgrid/lib/models/topicsMappers.ts +++ b/packages/@azure/arm-eventgrid/lib/models/topicsMappers.ts @@ -1,55 +1,33 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - Topic, - TrackedResource, - Resource, BaseResource, - InputSchemaMapping, CloudError, - TopicUpdateParameters, - TopicsListResult, - TopicSharedAccessKeys, - TopicRegenerateKeyRequest, - EventTypesListResult, - EventType, - Domain, - DomainTopic, + DeadLetterDestination, + EventHubEventSubscriptionDestination, EventSubscription, EventSubscriptionDestination, EventSubscriptionFilter, - AdvancedFilter, + EventType, + EventTypesListResult, + HybridConnectionEventSubscriptionDestination, + Resource, RetryPolicy, - DeadLetterDestination, - JsonInputSchemaMapping, - JsonField, - JsonFieldWithDefault, - TopicTypeInfo, - NumberInAdvancedFilter, StorageBlobDeadLetterDestination, - NumberNotInAdvancedFilter, - NumberLessThanAdvancedFilter, - NumberGreaterThanAdvancedFilter, - NumberLessThanOrEqualsAdvancedFilter, - NumberGreaterThanOrEqualsAdvancedFilter, - BoolEqualsAdvancedFilter, - StringInAdvancedFilter, - StringNotInAdvancedFilter, - StringBeginsWithAdvancedFilter, - StringEndsWithAdvancedFilter, - StringContainsAdvancedFilter, - WebHookEventSubscriptionDestination, - EventHubEventSubscriptionDestination, StorageQueueEventSubscriptionDestination, - HybridConnectionEventSubscriptionDestination + Topic, + TopicRegenerateKeyRequest, + TopicSharedAccessKeys, + TopicsListResult, + TopicTypeInfo, + TopicUpdateParameters, + TrackedResource, + WebHookEventSubscriptionDestination } from "../models/mappers"; - diff --git a/packages/@azure/arm-eventgrid/lib/operations/domainTopics.ts b/packages/@azure/arm-eventgrid/lib/operations/domainTopics.ts deleted file mode 100644 index 2385dad1e05d..000000000000 --- a/packages/@azure/arm-eventgrid/lib/operations/domainTopics.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * 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 Models from "../models"; -import * as Mappers from "../models/domainTopicsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a DomainTopics. */ -export class DomainTopics { - private readonly client: EventGridManagementClientContext; - - /** - * Create a DomainTopics. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get properties of a domain topic - * @summary Get a domain topic - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param topicName Name of the topic - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, domainName: string, topicName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param topicName Name of the topic - * @param callback The callback - */ - get(resourceGroupName: string, domainName: string, topicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param topicName Name of the topic - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, domainName: string, topicName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, domainName: string, topicName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - domainName, - topicName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * List all the topics in a domain. - * @summary List domain topics. - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. - * @param [options] The optional parameters - * @returns Promise - */ - listByDomain(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. - * @param callback The callback - */ - listByDomain(resourceGroupName: string, domainName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Domain name. - * @param options The optional parameters - * @param callback The callback - */ - listByDomain(resourceGroupName: string, domainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDomain(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - domainName, - options - }, - listByDomainOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName, - Parameters.topicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DomainTopic - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DomainTopicsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/packages/@azure/arm-eventgrid/lib/operations/domains.ts b/packages/@azure/arm-eventgrid/lib/operations/domains.ts deleted file mode 100644 index 90b848421b5f..000000000000 --- a/packages/@azure/arm-eventgrid/lib/operations/domains.ts +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as Models from "../models"; -import * as Mappers from "../models/domainsMappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClientContext } from "../eventGridManagementClientContext"; - -/** Class representing a Domains. */ -export class Domains { - private readonly client: EventGridManagementClientContext; - - /** - * Create a Domains. - * @param {EventGridManagementClientContext} client Reference to the service client. - */ - constructor(client: EventGridManagementClientContext) { - this.client = client; - } - - /** - * Get properties of a domain - * @summary Get a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param callback The callback - */ - get(resourceGroupName: string, domainName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, domainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - domainName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new domain with the specified parameters. - * @summary Create a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param domainInfo Domain information - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, domainName: string, domainInfo: Models.Domain, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,domainName,domainInfo,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * Delete existing domain - * @summary Delete a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,domainName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); - } - - /** - * Asynchronously updates a domain with the specified parameters. - * @summary Update a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param domainUpdateParameters Domain update information - * @param [options] The optional parameters - * @returns Promise - */ - update(resourceGroupName: string, domainName: string, domainUpdateParameters: Models.DomainUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,domainName,domainUpdateParameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; - } - - /** - * List all the domains under an Azure subscription - * @summary List domains under an Azure subscription - * @param [options] The optional parameters - * @returns Promise - */ - listBySubscription(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listBySubscription(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listBySubscriptionOperationSpec, - callback) as Promise; - } - - /** - * List all the domains under a resource group - * @summary List domains under a resource group - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupOperationSpec, - callback) as Promise; - } - - /** - * List the two keys used to publish to a domain - * @summary List keys for a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param [options] The optional parameters - * @returns Promise - */ - listSharedAccessKeys(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param callback The callback - */ - listSharedAccessKeys(resourceGroupName: string, domainName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param options The optional parameters - * @param callback The callback - */ - listSharedAccessKeys(resourceGroupName: string, domainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listSharedAccessKeys(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - domainName, - options - }, - listSharedAccessKeysOperationSpec, - callback) as Promise; - } - - /** - * Regenerate a shared access key for a domain - * @summary Regenerate key for a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param regenerateKeyRequest Request body to regenerate key - * @param [options] The optional parameters - * @returns Promise - */ - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: Models.DomainRegenerateKeyRequest, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param regenerateKeyRequest Request body to regenerate key - * @param callback The callback - */ - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: Models.DomainRegenerateKeyRequest, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param regenerateKeyRequest Request body to regenerate key - * @param options The optional parameters - * @param callback The callback - */ - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: Models.DomainRegenerateKeyRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: Models.DomainRegenerateKeyRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - domainName, - regenerateKeyRequest, - options - }, - regenerateKeyOperationSpec, - callback) as Promise; - } - - /** - * Asynchronously creates a new domain with the specified parameters. - * @summary Create a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param domainInfo Domain information - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: Models.Domain, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - domainName, - domainInfo, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } - - /** - * Delete existing domain - * @summary Delete a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param [options] The optional parameters - * @returns Promise - */ - beginDeleteMethod(resourceGroupName: string, domainName: string, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - domainName, - options - }, - beginDeleteMethodOperationSpec, - options); - } - - /** - * Asynchronously updates a domain with the specified parameters. - * @summary Update a domain - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the domain - * @param domainUpdateParameters Domain update information - * @param [options] The optional parameters - * @returns Promise - */ - beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: Models.DomainUpdateParameters, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - domainName, - domainUpdateParameters, - options - }, - beginUpdateOperationSpec, - options); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Domain - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DomainsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DomainsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listSharedAccessKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DomainSharedAccessKeys - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const regenerateKeyOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "regenerateKeyRequest", - mapper: { - ...Mappers.DomainRegenerateKeyRequest, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DomainSharedAccessKeys - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "domainInfo", - mapper: { - ...Mappers.Domain, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.Domain - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginDeleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const beginUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "domainUpdateParameters", - mapper: { - ...Mappers.DomainUpdateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.Domain - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/packages/@azure/arm-eventgrid/lib/operations/eventSubscriptions.ts b/packages/@azure/arm-eventgrid/lib/operations/eventSubscriptions.ts index 658f282c5e9f..76c57a0cd03b 100644 --- a/packages/@azure/arm-eventgrid/lib/operations/eventSubscriptions.ts +++ b/packages/@azure/arm-eventgrid/lib/operations/eventSubscriptions.ts @@ -494,43 +494,6 @@ export class EventSubscriptions { callback) as Promise; } - /** - * List all event subscriptions that have been created for a specific domain topic - * @summary List all event subscriptions for a specific domain topic - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain - * @param topicName Name of the domain topic - * @param [options] The optional parameters - * @returns Promise - */ - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain - * @param topicName Name of the domain topic - * @param callback The callback - */ - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group within the user's subscription. - * @param domainName Name of the top level domain - * @param topicName Name of the domain topic - * @param options The optional parameters - * @param callback The callback - */ - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - domainName, - topicName, - options - }, - listByDomainTopicOperationSpec, - callback) as Promise; - } - /** * Asynchronously creates a new event subscription or updates an existing event subscription based * on the specified scope. @@ -891,32 +854,6 @@ const listByResourceOperationSpec: msRest.OperationSpec = { serializer }; -const listByDomainTopicOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.domainName, - Parameters.topicName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.EventSubscriptionsListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}", diff --git a/packages/@azure/arm-eventgrid/lib/operations/index.ts b/packages/@azure/arm-eventgrid/lib/operations/index.ts index 7f2400c4ec61..9b46db19a9f5 100644 --- a/packages/@azure/arm-eventgrid/lib/operations/index.ts +++ b/packages/@azure/arm-eventgrid/lib/operations/index.ts @@ -8,8 +8,6 @@ * regenerated. */ -export * from "./domains"; -export * from "./domainTopics"; export * from "./eventSubscriptions"; export * from "./operations"; export * from "./topics"; diff --git a/packages/@azure/arm-eventgrid/package.json b/packages/@azure/arm-eventgrid/package.json index aee8b1d371a7..732a22a086fe 100644 --- a/packages/@azure/arm-eventgrid/package.json +++ b/packages/@azure/arm-eventgrid/package.json @@ -2,10 +2,10 @@ "name": "@azure/arm-eventgrid", "author": "Microsoft Corporation", "description": "EventGridManagementClient Library with typescript type definitions for node.js and browser.", - "version": "0.1.0", + "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.4", + "@azure/ms-rest-js": "^1.2.6", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-eventgrid", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "lib/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/packages/@azure/arm-eventgrid/rollup.config.js b/packages/@azure/arm-eventgrid/rollup.config.js index 5412277e3ddb..b3161020913b 100644 --- a/packages/@azure/arm-eventgrid/rollup.config.js +++ b/packages/@azure/arm-eventgrid/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/eventGridManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/eventGridManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-eventgrid.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config;