diff --git a/lib/services/eventgrid/lib/eventGridClient.d.ts b/lib/services/eventgrid/lib/eventGridClient.d.ts index 2d7a4557a6..61620e55c2 100644 --- a/lib/services/eventgrid/lib/eventGridClient.d.ts +++ b/lib/services/eventgrid/lib/eventGridClient.d.ts @@ -29,11 +29,11 @@ export default class EventGridClient extends AzureServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. + * @param {string} [options.acceptLanguage] - The preferred language for the response. * - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. * - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. * */ constructor(credentials: ServiceClientCredentials, options?: AzureServiceClientOptions); diff --git a/lib/services/eventgrid/lib/eventGridClient.js b/lib/services/eventgrid/lib/eventGridClient.js index 1ff407f333..ab4aaf0290 100644 --- a/lib/services/eventgrid/lib/eventGridClient.js +++ b/lib/services/eventgrid/lib/eventGridClient.js @@ -180,9 +180,9 @@ class EventGridClient extends ServiceClient { * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy - * @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response. - * @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. - * @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * @param {string} [options.acceptLanguage] - The preferred language for the response. + * @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30. + * @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ constructor(credentials, options) { if (credentials === null || credentials === undefined) { diff --git a/lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js b/lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js new file mode 100644 index 0000000000..9536de0ec3 --- /dev/null +++ b/lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js @@ -0,0 +1,55 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Information about the device connection state event. + * + */ +class DeviceConnectionStateEventInfo { + /** + * Create a DeviceConnectionStateEventInfo. + * @member {string} [sequenceNumber] Sequence number is string representation + * of a hexadecimal number. string compare can be used to identify the larger + * number because both in ASCII and HEX numbers come after alphabets. If you + * are converting the string to hex, then the number is a 256 bit number. + */ + constructor() { + } + + /** + * Defines the metadata of DeviceConnectionStateEventInfo + * + * @returns {object} metadata of DeviceConnectionStateEventInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'DeviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo', + modelProperties: { + sequenceNumber: { + required: false, + serializedName: 'sequenceNumber', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DeviceConnectionStateEventInfo; diff --git a/lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js b/lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js new file mode 100644 index 0000000000..02407c51e4 --- /dev/null +++ b/lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js @@ -0,0 +1,93 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Schema of the Data property of an EventGridEvent for a device connection + * state event (DeviceConnected, DeviceDisconnected). + * + */ +class DeviceConnectionStateEventProperties { + /** + * Create a DeviceConnectionStateEventProperties. + * @member {string} [deviceId] The unique identifier of the device. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + * + % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [moduleId] The unique identifier of the module. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + * + % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [hubName] Name of the IoT Hub where the device was + * created or deleted. + * @member {object} [deviceConnectionStateEventInfo] Information about the + * device connection state event. + * @member {string} [deviceConnectionStateEventInfo.sequenceNumber] Sequence + * number is string representation of a hexadecimal number. string compare + * can be used to identify the larger number because both in ASCII and HEX + * numbers come after alphabets. If you are converting the string to hex, + * then the number is a 256 bit number. + */ + constructor() { + } + + /** + * Defines the metadata of DeviceConnectionStateEventProperties + * + * @returns {object} metadata of DeviceConnectionStateEventProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'DeviceConnectionStateEventProperties', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventProperties', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + moduleId: { + required: false, + serializedName: 'moduleId', + type: { + name: 'String' + } + }, + hubName: { + required: false, + serializedName: 'hubName', + type: { + name: 'String' + } + }, + deviceConnectionStateEventInfo: { + required: false, + serializedName: 'deviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo' + } + } + } + } + }; + } +} + +module.exports = DeviceConnectionStateEventProperties; diff --git a/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js b/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js index 11f8200caa..ad7a5c654d 100644 --- a/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js +++ b/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js @@ -23,15 +23,11 @@ class DeviceLifeCycleEventProperties { * @member {string} [deviceId] The unique identifier of the device. This * case-sensitive string can be up to 128 characters long, and supports ASCII * 7-bit alphanumeric characters plus the following special characters: - : . - * + % _ # * ? ! ( ) , = @ ; $ '. + * + % _ # * ? ! ( ) , = @ ; $ '. * @member {string} [hubName] Name of the IoT Hub where the device was * created or deleted. - * @member {string} [opType] The event type specified for this operation by - * the IoT Hub. - * @member {string} [operationTimestamp] The ISO8601 timestamp of the - * operation. * @member {object} [twin] Information about the device twin, which is the - * cloud represenation of application device metadata. + * cloud representation of application device metadata. * @member {string} [twin.authenticationType] Authentication type used for * this device: either SAS, SelfSigned, or CertificateAuthority. * @member {number} [twin.cloudToDeviceMessageCount] Count of cloud to device @@ -109,20 +105,6 @@ class DeviceLifeCycleEventProperties { name: 'String' } }, - opType: { - required: false, - serializedName: 'opType', - type: { - name: 'String' - } - }, - operationTimestamp: { - required: false, - serializedName: 'operationTimestamp', - type: { - name: 'String' - } - }, twin: { required: false, serializedName: 'twin', diff --git a/lib/services/eventgrid/lib/models/deviceTwinInfo.js b/lib/services/eventgrid/lib/models/deviceTwinInfo.js index 9059d9782b..d8a18d5e0a 100644 --- a/lib/services/eventgrid/lib/models/deviceTwinInfo.js +++ b/lib/services/eventgrid/lib/models/deviceTwinInfo.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * Information about the device twin, which is the cloud represenation of + * Information about the device twin, which is the cloud representation of * application device metadata. * */ diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index 4681de328b..e12e32152a 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -341,6 +341,114 @@ export interface ResourceDeleteCancelData { httpRequest?: string; } +/** + * @class + * Initializes a new instance of the ResourceActionSuccessData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionSuccess event. This is raised when a + * resource action operation succeeds. + * + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ +export interface ResourceActionSuccessData { + tenantId?: string; + subscriptionId?: string; + resourceGroup?: string; + resourceProvider?: string; + resourceUri?: string; + operationName?: string; + status?: string; + authorization?: string; + claims?: string; + correlationId?: string; + httpRequest?: string; +} + +/** + * @class + * Initializes a new instance of the ResourceActionFailureData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionFailure event. This is raised when a + * resource action operation fails. + * + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ +export interface ResourceActionFailureData { + tenantId?: string; + subscriptionId?: string; + resourceGroup?: string; + resourceProvider?: string; + resourceUri?: string; + operationName?: string; + status?: string; + authorization?: string; + claims?: string; + correlationId?: string; + httpRequest?: string; +} + +/** + * @class + * Initializes a new instance of the ResourceActionCancelData class. + * @constructor + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Resources.ResourceActionCancel event. This is raised when a + * resource action operation is canceled. + * + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ +export interface ResourceActionCancelData { + tenantId?: string; + subscriptionId?: string; + resourceGroup?: string; + resourceProvider?: string; + resourceUri?: string; + operationName?: string; + status?: string; + authorization?: string; + claims?: string; + correlationId?: string; + httpRequest?: string; +} + /** * @class * Initializes a new instance of the EventGridEvent class. @@ -431,15 +539,11 @@ export interface SubscriptionDeletedEventData { * @member {string} [deviceId] The unique identifier of the device. This * case-sensitive string can be up to 128 characters long, and supports ASCII * 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ # * ? ! ( ) , = @ ; $ '. + * % _ # * ? ! ( ) , = @ ; $ '. * @member {string} [hubName] Name of the IoT Hub where the device was created * or deleted. - * @member {string} [opType] The event type specified for this operation by the - * IoT Hub. - * @member {string} [operationTimestamp] The ISO8601 timestamp of the - * operation. * @member {object} [twin] Information about the device twin, which is the - * cloud represenation of application device metadata. + * cloud representation of application device metadata. * @member {string} [twin.authenticationType] Authentication type used for this * device: either SAS, SelfSigned, or CertificateAuthority. * @member {number} [twin.cloudToDeviceMessageCount] Count of cloud to device @@ -487,8 +591,6 @@ export interface SubscriptionDeletedEventData { export interface DeviceLifeCycleEventProperties { deviceId?: string; hubName?: string; - opType?: string; - operationTimestamp?: string; twin?: DeviceTwinInfo; } @@ -512,6 +614,58 @@ export interface IotHubDeviceCreatedEventData extends DeviceLifeCycleEventProper export interface IotHubDeviceDeletedEventData extends DeviceLifeCycleEventProperties { } +/** + * @class + * Initializes a new instance of the DeviceConnectionStateEventProperties class. + * @constructor + * Schema of the Data property of an EventGridEvent for a device connection + * state event (DeviceConnected, DeviceDisconnected). + * + * @member {string} [deviceId] The unique identifier of the device. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [moduleId] The unique identifier of the module. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [hubName] Name of the IoT Hub where the device was created + * or deleted. + * @member {object} [deviceConnectionStateEventInfo] Information about the + * device connection state event. + * @member {string} [deviceConnectionStateEventInfo.sequenceNumber] Sequence + * number is string representation of a hexadecimal number. string compare can + * be used to identify the larger number because both in ASCII and HEX numbers + * come after alphabets. If you are converting the string to hex, then the + * number is a 256 bit number. + */ +export interface DeviceConnectionStateEventProperties { + deviceId?: string; + moduleId?: string; + hubName?: string; + deviceConnectionStateEventInfo?: DeviceConnectionStateEventInfo; +} + +/** + * @class + * Initializes a new instance of the IotHubDeviceConnectedEventData class. + * @constructor + * Event data for Microsoft.Devices.DeviceConnected event. + * + */ +export interface IotHubDeviceConnectedEventData extends DeviceConnectionStateEventProperties { +} + +/** + * @class + * Initializes a new instance of the IotHubDeviceDisconnectedEventData class. + * @constructor + * Event data for Microsoft.Devices.DeviceDisconnected event. + * + */ +export interface IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEventProperties { +} + /** * @class * Initializes a new instance of the DeviceTwinMetadata class. @@ -592,7 +746,7 @@ export interface DeviceTwinInfoX509Thumbprint { * @class * Initializes a new instance of the DeviceTwinInfo class. * @constructor - * Information about the device twin, which is the cloud represenation of + * Information about the device twin, which is the cloud representation of * application device metadata. * * @member {string} [authenticationType] Authentication type used for this @@ -651,6 +805,21 @@ export interface DeviceTwinInfo { x509Thumbprint?: DeviceTwinInfoX509Thumbprint; } +/** + * @class + * Initializes a new instance of the DeviceConnectionStateEventInfo class. + * @constructor + * Information about the device connection state event. + * + * @member {string} [sequenceNumber] Sequence number is string representation + * of a hexadecimal number. string compare can be used to identify the larger + * number because both in ASCII and HEX numbers come after alphabets. If you + * are converting the string to hex, then the number is a 256 bit number. + */ +export interface DeviceConnectionStateEventInfo { + sequenceNumber?: string; +} + /** * @class * Initializes a new instance of the ContainerRegistryEventData class. diff --git a/lib/services/eventgrid/lib/models/index.js b/lib/services/eventgrid/lib/models/index.js index 9c2d712ab8..84de9aaefd 100644 --- a/lib/services/eventgrid/lib/models/index.js +++ b/lib/services/eventgrid/lib/models/index.js @@ -27,6 +27,9 @@ exports.ResourceWriteCancelData = require('./resourceWriteCancelData'); exports.ResourceDeleteSuccessData = require('./resourceDeleteSuccessData'); exports.ResourceDeleteFailureData = require('./resourceDeleteFailureData'); exports.ResourceDeleteCancelData = require('./resourceDeleteCancelData'); +exports.ResourceActionSuccessData = require('./resourceActionSuccessData'); +exports.ResourceActionFailureData = require('./resourceActionFailureData'); +exports.ResourceActionCancelData = require('./resourceActionCancelData'); exports.EventGridEvent = require('./eventGridEvent'); exports.SubscriptionValidationEventData = require('./subscriptionValidationEventData'); exports.SubscriptionValidationResponse = require('./subscriptionValidationResponse'); @@ -34,11 +37,15 @@ exports.SubscriptionDeletedEventData = require('./subscriptionDeletedEventData') exports.DeviceLifeCycleEventProperties = require('./deviceLifeCycleEventProperties'); exports.IotHubDeviceCreatedEventData = require('./iotHubDeviceCreatedEventData'); exports.IotHubDeviceDeletedEventData = require('./iotHubDeviceDeletedEventData'); +exports.DeviceConnectionStateEventProperties = require('./deviceConnectionStateEventProperties'); +exports.IotHubDeviceConnectedEventData = require('./iotHubDeviceConnectedEventData'); +exports.IotHubDeviceDisconnectedEventData = require('./iotHubDeviceDisconnectedEventData'); exports.DeviceTwinMetadata = require('./deviceTwinMetadata'); exports.DeviceTwinProperties = require('./deviceTwinProperties'); exports.DeviceTwinInfoProperties = require('./deviceTwinInfoProperties'); exports.DeviceTwinInfoX509Thumbprint = require('./deviceTwinInfoX509Thumbprint'); exports.DeviceTwinInfo = require('./deviceTwinInfo'); +exports.DeviceConnectionStateEventInfo = require('./deviceConnectionStateEventInfo'); exports.ContainerRegistryEventData = require('./containerRegistryEventData'); exports.ContainerRegistryImagePushedEventData = require('./containerRegistryImagePushedEventData'); exports.ContainerRegistryImageDeletedEventData = require('./containerRegistryImageDeletedEventData'); diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js new file mode 100644 index 0000000000..2bc1d2f13c --- /dev/null +++ b/lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js @@ -0,0 +1,77 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Event data for Microsoft.Devices.DeviceConnected event. + * + * @extends models['DeviceConnectionStateEventProperties'] + */ +class IotHubDeviceConnectedEventData extends models['DeviceConnectionStateEventProperties'] { + /** + * Create a IotHubDeviceConnectedEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of IotHubDeviceConnectedEventData + * + * @returns {object} metadata of IotHubDeviceConnectedEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'IotHubDeviceConnectedEventData', + type: { + name: 'Composite', + className: 'IotHubDeviceConnectedEventData', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + moduleId: { + required: false, + serializedName: 'moduleId', + type: { + name: 'String' + } + }, + hubName: { + required: false, + serializedName: 'hubName', + type: { + name: 'String' + } + }, + deviceConnectionStateEventInfo: { + required: false, + serializedName: 'deviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo' + } + } + } + } + }; + } +} + +module.exports = IotHubDeviceConnectedEventData; diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js index f3999447ac..46dc59c0fb 100644 --- a/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js +++ b/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js @@ -53,20 +53,6 @@ class IotHubDeviceCreatedEventData extends models['DeviceLifeCycleEventPropertie name: 'String' } }, - opType: { - required: false, - serializedName: 'opType', - type: { - name: 'String' - } - }, - operationTimestamp: { - required: false, - serializedName: 'operationTimestamp', - type: { - name: 'String' - } - }, twin: { required: false, serializedName: 'twin', diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js index 6cc0deda1b..fd47e335af 100644 --- a/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js +++ b/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js @@ -53,20 +53,6 @@ class IotHubDeviceDeletedEventData extends models['DeviceLifeCycleEventPropertie name: 'String' } }, - opType: { - required: false, - serializedName: 'opType', - type: { - name: 'String' - } - }, - operationTimestamp: { - required: false, - serializedName: 'operationTimestamp', - type: { - name: 'String' - } - }, twin: { required: false, serializedName: 'twin', diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js new file mode 100644 index 0000000000..f47e1fcf7c --- /dev/null +++ b/lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js @@ -0,0 +1,77 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Event data for Microsoft.Devices.DeviceDisconnected event. + * + * @extends models['DeviceConnectionStateEventProperties'] + */ +class IotHubDeviceDisconnectedEventData extends models['DeviceConnectionStateEventProperties'] { + /** + * Create a IotHubDeviceDisconnectedEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of IotHubDeviceDisconnectedEventData + * + * @returns {object} metadata of IotHubDeviceDisconnectedEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'IotHubDeviceDisconnectedEventData', + type: { + name: 'Composite', + className: 'IotHubDeviceDisconnectedEventData', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + moduleId: { + required: false, + serializedName: 'moduleId', + type: { + name: 'String' + } + }, + hubName: { + required: false, + serializedName: 'hubName', + type: { + name: 'String' + } + }, + deviceConnectionStateEventInfo: { + required: false, + serializedName: 'deviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo' + } + } + } + } + }; + } +} + +module.exports = IotHubDeviceDisconnectedEventData; diff --git a/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js b/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js index eab93e83ab..89111d09e6 100644 --- a/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js +++ b/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js @@ -44,18 +44,22 @@ class MediaJobStateChangeEventData { modelProperties: { previousState: { required: false, + nullable: false, readOnly: true, serializedName: 'previousState', type: { - name: 'String' + name: 'Enum', + allowedValues: [ 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' ] } }, state: { required: false, + nullable: false, readOnly: true, serializedName: 'state', type: { - name: 'String' + name: 'Enum', + allowedValues: [ 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', 'Scheduled' ] } } } diff --git a/lib/services/eventgrid/lib/models/resourceActionCancelData.js b/lib/services/eventgrid/lib/models/resourceActionCancelData.js new file mode 100644 index 0000000000..00522dbb2b --- /dev/null +++ b/lib/services/eventgrid/lib/models/resourceActionCancelData.js @@ -0,0 +1,136 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Resources.ResourceActionCancel event. This is raised when a + * resource action operation is canceled. + * + */ +class ResourceActionCancelData { + /** + * Create a ResourceActionCancelData. + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceActionCancelData + * + * @returns {object} metadata of ResourceActionCancelData + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceActionCancelData', + type: { + name: 'Composite', + className: 'ResourceActionCancelData', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + subscriptionId: { + required: false, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + resourceGroup: { + required: false, + serializedName: 'resourceGroup', + type: { + name: 'String' + } + }, + resourceProvider: { + required: false, + serializedName: 'resourceProvider', + type: { + name: 'String' + } + }, + resourceUri: { + required: false, + serializedName: 'resourceUri', + type: { + name: 'String' + } + }, + operationName: { + required: false, + serializedName: 'operationName', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + authorization: { + required: false, + serializedName: 'authorization', + type: { + name: 'String' + } + }, + claims: { + required: false, + serializedName: 'claims', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + httpRequest: { + required: false, + serializedName: 'httpRequest', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceActionCancelData; diff --git a/lib/services/eventgrid/lib/models/resourceActionFailureData.js b/lib/services/eventgrid/lib/models/resourceActionFailureData.js new file mode 100644 index 0000000000..d180ac3cbb --- /dev/null +++ b/lib/services/eventgrid/lib/models/resourceActionFailureData.js @@ -0,0 +1,136 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionFailure event. This is raised when a + * resource action operation fails. + * + */ +class ResourceActionFailureData { + /** + * Create a ResourceActionFailureData. + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceActionFailureData + * + * @returns {object} metadata of ResourceActionFailureData + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceActionFailureData', + type: { + name: 'Composite', + className: 'ResourceActionFailureData', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + subscriptionId: { + required: false, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + resourceGroup: { + required: false, + serializedName: 'resourceGroup', + type: { + name: 'String' + } + }, + resourceProvider: { + required: false, + serializedName: 'resourceProvider', + type: { + name: 'String' + } + }, + resourceUri: { + required: false, + serializedName: 'resourceUri', + type: { + name: 'String' + } + }, + operationName: { + required: false, + serializedName: 'operationName', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + authorization: { + required: false, + serializedName: 'authorization', + type: { + name: 'String' + } + }, + claims: { + required: false, + serializedName: 'claims', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + httpRequest: { + required: false, + serializedName: 'httpRequest', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceActionFailureData; diff --git a/lib/services/eventgrid/lib/models/resourceActionSuccessData.js b/lib/services/eventgrid/lib/models/resourceActionSuccessData.js new file mode 100644 index 0000000000..849fc2ee28 --- /dev/null +++ b/lib/services/eventgrid/lib/models/resourceActionSuccessData.js @@ -0,0 +1,136 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionSuccess event. This is raised when a + * resource action operation succeeds. + * + */ +class ResourceActionSuccessData { + /** + * Create a ResourceActionSuccessData. + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceActionSuccessData + * + * @returns {object} metadata of ResourceActionSuccessData + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceActionSuccessData', + type: { + name: 'Composite', + className: 'ResourceActionSuccessData', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + subscriptionId: { + required: false, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + resourceGroup: { + required: false, + serializedName: 'resourceGroup', + type: { + name: 'String' + } + }, + resourceProvider: { + required: false, + serializedName: 'resourceProvider', + type: { + name: 'String' + } + }, + resourceUri: { + required: false, + serializedName: 'resourceUri', + type: { + name: 'String' + } + }, + operationName: { + required: false, + serializedName: 'operationName', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + authorization: { + required: false, + serializedName: 'authorization', + type: { + name: 'String' + } + }, + claims: { + required: false, + serializedName: 'claims', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + httpRequest: { + required: false, + serializedName: 'httpRequest', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceActionSuccessData; diff --git a/lib/services/eventgrid/package.json b/lib/services/eventgrid/package.json index 4d16d0123d..ae1a7ea381 100644 --- a/lib/services/eventgrid/package.json +++ b/lib/services/eventgrid/package.json @@ -2,7 +2,7 @@ "name": "azure-eventgrid", "author": "Microsoft Corporation", "description": "EventGridClient Library with typescript type definitions for node", - "version": "1.2.1", + "version": "1.3.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -14,12 +14,12 @@ "license": "MIT", "main": "./lib/eventGridClient.js", "types": "./lib/eventGridClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } }