diff --git a/profiles/latest/eventgrid/eventgrid/models.go b/profiles/latest/eventgrid/eventgrid/models.go index f23bfd20ba3d..3e9c5fd84a61 100644 --- a/profiles/latest/eventgrid/eventgrid/models.go +++ b/profiles/latest/eventgrid/eventgrid/models.go @@ -41,6 +41,8 @@ type ContainerRegistryEventSource = original.ContainerRegistryEventSource type ContainerRegistryEventTarget = original.ContainerRegistryEventTarget type ContainerRegistryImageDeletedEventData = original.ContainerRegistryImageDeletedEventData type ContainerRegistryImagePushedEventData = original.ContainerRegistryImagePushedEventData +type DeviceConnectionStateEventInfo = original.DeviceConnectionStateEventInfo +type DeviceConnectionStateEventProperties = original.DeviceConnectionStateEventProperties type DeviceLifeCycleEventProperties = original.DeviceLifeCycleEventProperties type DeviceTwinInfo = original.DeviceTwinInfo type DeviceTwinInfoProperties = original.DeviceTwinInfoProperties @@ -49,8 +51,10 @@ type DeviceTwinMetadata = original.DeviceTwinMetadata type DeviceTwinProperties = original.DeviceTwinProperties type Event = original.Event type EventHubCaptureFileCreatedEventData = original.EventHubCaptureFileCreatedEventData +type IotHubDeviceConnectedEventData = original.IotHubDeviceConnectedEventData type IotHubDeviceCreatedEventData = original.IotHubDeviceCreatedEventData type IotHubDeviceDeletedEventData = original.IotHubDeviceDeletedEventData +type IotHubDeviceDisconnectedEventData = original.IotHubDeviceDisconnectedEventData type MediaJobStateChangeEventData = original.MediaJobStateChangeEventData type ResourceDeleteCancelData = original.ResourceDeleteCancelData type ResourceDeleteFailureData = original.ResourceDeleteFailureData diff --git a/profiles/preview/eventgrid/eventgrid/models.go b/profiles/preview/eventgrid/eventgrid/models.go index b262413c0b1c..0184a3b7ebae 100644 --- a/profiles/preview/eventgrid/eventgrid/models.go +++ b/profiles/preview/eventgrid/eventgrid/models.go @@ -41,6 +41,8 @@ type ContainerRegistryEventSource = original.ContainerRegistryEventSource type ContainerRegistryEventTarget = original.ContainerRegistryEventTarget type ContainerRegistryImageDeletedEventData = original.ContainerRegistryImageDeletedEventData type ContainerRegistryImagePushedEventData = original.ContainerRegistryImagePushedEventData +type DeviceConnectionStateEventInfo = original.DeviceConnectionStateEventInfo +type DeviceConnectionStateEventProperties = original.DeviceConnectionStateEventProperties type DeviceLifeCycleEventProperties = original.DeviceLifeCycleEventProperties type DeviceTwinInfo = original.DeviceTwinInfo type DeviceTwinInfoProperties = original.DeviceTwinInfoProperties @@ -49,8 +51,10 @@ type DeviceTwinMetadata = original.DeviceTwinMetadata type DeviceTwinProperties = original.DeviceTwinProperties type Event = original.Event type EventHubCaptureFileCreatedEventData = original.EventHubCaptureFileCreatedEventData +type IotHubDeviceConnectedEventData = original.IotHubDeviceConnectedEventData type IotHubDeviceCreatedEventData = original.IotHubDeviceCreatedEventData type IotHubDeviceDeletedEventData = original.IotHubDeviceDeletedEventData +type IotHubDeviceDisconnectedEventData = original.IotHubDeviceDisconnectedEventData type MediaJobStateChangeEventData = original.MediaJobStateChangeEventData type ResourceDeleteCancelData = original.ResourceDeleteCancelData type ResourceDeleteFailureData = original.ResourceDeleteFailureData diff --git a/services/eventgrid/2018-01-01/eventgrid/models.go b/services/eventgrid/2018-01-01/eventgrid/models.go index 3d2e9aaf5038..627612d117db 100644 --- a/services/eventgrid/2018-01-01/eventgrid/models.go +++ b/services/eventgrid/2018-01-01/eventgrid/models.go @@ -152,6 +152,25 @@ type ContainerRegistryImagePushedEventData struct { Source *ContainerRegistryEventSource `json:"source,omitempty"` } +// DeviceConnectionStateEventInfo information about the device connection state event. +type DeviceConnectionStateEventInfo struct { + // 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. + SequenceNumber *string `json:"sequenceNumber,omitempty"` +} + +// DeviceConnectionStateEventProperties schema of the Data property of an EventGridEvent for a device connection +// state event (DeviceConnected, DeviceDisconnected). +type DeviceConnectionStateEventProperties struct { + // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. + DeviceID *string `json:"deviceId,omitempty"` + // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. + ModuleID *string `json:"moduleId,omitempty"` + // HubName - Name of the IoT Hub where the device was created or deleted. + HubName *string `json:"hubName,omitempty"` + // DeviceConnectionStateEventInfo - Information about the device connection state event. + DeviceConnectionStateEventInfo *DeviceConnectionStateEventInfo `json:"deviceConnectionStateEventInfo,omitempty"` +} + // DeviceLifeCycleEventProperties schema of the Data property of an EventGridEvent for a device life cycle event // (DeviceCreated, DeviceDeleted). type DeviceLifeCycleEventProperties struct { @@ -159,15 +178,11 @@ type DeviceLifeCycleEventProperties struct { DeviceID *string `json:"deviceId,omitempty"` // HubName - Name of the IoT Hub where the device was created or deleted. HubName *string `json:"hubName,omitempty"` - // OpType - The event type specified for this operation by the IoT Hub. - OpType *string `json:"opType,omitempty"` - // OperationTimestamp - The ISO8601 timestamp of the operation. - OperationTimestamp *string `json:"operationTimestamp,omitempty"` - // Twin - Information about the device twin, which is the cloud represenation of application device metadata. + // Twin - Information about the device twin, which is the cloud representation of application device metadata. Twin *DeviceTwinInfo `json:"twin,omitempty"` } -// DeviceTwinInfo information about the device twin, which is the cloud represenation of application device +// DeviceTwinInfo information about the device twin, which is the cloud representation of application device // metadata. type DeviceTwinInfo struct { // AuthenticationType - Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority. @@ -270,17 +285,25 @@ type EventHubCaptureFileCreatedEventData struct { LastEnqueueTime *date.Time `json:"lastEnqueueTime,omitempty"` } +// IotHubDeviceConnectedEventData event data for Microsoft.Devices.DeviceConnected event. +type IotHubDeviceConnectedEventData struct { + // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. + DeviceID *string `json:"deviceId,omitempty"` + // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. + ModuleID *string `json:"moduleId,omitempty"` + // HubName - Name of the IoT Hub where the device was created or deleted. + HubName *string `json:"hubName,omitempty"` + // DeviceConnectionStateEventInfo - Information about the device connection state event. + DeviceConnectionStateEventInfo *DeviceConnectionStateEventInfo `json:"deviceConnectionStateEventInfo,omitempty"` +} + // IotHubDeviceCreatedEventData event data for Microsoft.Devices.DeviceCreated event. type IotHubDeviceCreatedEventData struct { // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. DeviceID *string `json:"deviceId,omitempty"` // HubName - Name of the IoT Hub where the device was created or deleted. HubName *string `json:"hubName,omitempty"` - // OpType - The event type specified for this operation by the IoT Hub. - OpType *string `json:"opType,omitempty"` - // OperationTimestamp - The ISO8601 timestamp of the operation. - OperationTimestamp *string `json:"operationTimestamp,omitempty"` - // Twin - Information about the device twin, which is the cloud represenation of application device metadata. + // Twin - Information about the device twin, which is the cloud representation of application device metadata. Twin *DeviceTwinInfo `json:"twin,omitempty"` } @@ -290,14 +313,22 @@ type IotHubDeviceDeletedEventData struct { DeviceID *string `json:"deviceId,omitempty"` // HubName - Name of the IoT Hub where the device was created or deleted. HubName *string `json:"hubName,omitempty"` - // OpType - The event type specified for this operation by the IoT Hub. - OpType *string `json:"opType,omitempty"` - // OperationTimestamp - The ISO8601 timestamp of the operation. - OperationTimestamp *string `json:"operationTimestamp,omitempty"` - // Twin - Information about the device twin, which is the cloud represenation of application device metadata. + // Twin - Information about the device twin, which is the cloud representation of application device metadata. Twin *DeviceTwinInfo `json:"twin,omitempty"` } +// IotHubDeviceDisconnectedEventData event data for Microsoft.Devices.DeviceDisconnected event. +type IotHubDeviceDisconnectedEventData struct { + // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. + DeviceID *string `json:"deviceId,omitempty"` + // 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: - : . + % _ # * ? ! ( ) , = @ ; $ '. + ModuleID *string `json:"moduleId,omitempty"` + // HubName - Name of the IoT Hub where the device was created or deleted. + HubName *string `json:"hubName,omitempty"` + // DeviceConnectionStateEventInfo - Information about the device connection state event. + DeviceConnectionStateEventInfo *DeviceConnectionStateEventInfo `json:"deviceConnectionStateEventInfo,omitempty"` +} + // MediaJobStateChangeEventData schema of the Data property of an EventGridEvent for a // Microsoft.Media.JobStateChange event. type MediaJobStateChangeEventData struct {