From 1d5bc65331cb391941f615cea6087bf71b11874a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Tue, 15 Oct 2019 23:05:26 +0000 Subject: [PATCH 1/3] Generated from 428c006d60546419a3b147a7fe9aa41d541ebe65 update-event-schema-for-azure-storage-event-grid-notification-for-create-delete-directory-and-rename-blob-directory --- profiles/latest/eventgrid/eventgrid/models.go | 4 + .../preview/eventgrid/eventgrid/models.go | 4 + .../eventgrid/2018-01-01/eventgrid/client.go | 2 +- .../eventgrid/2018-01-01/eventgrid/models.go | 92 ++++++++++++++++++- 4 files changed, 100 insertions(+), 2 deletions(-) diff --git a/profiles/latest/eventgrid/eventgrid/models.go b/profiles/latest/eventgrid/eventgrid/models.go index bbc94e13941c..a5d748c208bd 100644 --- a/profiles/latest/eventgrid/eventgrid/models.go +++ b/profiles/latest/eventgrid/eventgrid/models.go @@ -159,6 +159,10 @@ type SignalRServiceClientConnectionConnectedEventData = original.SignalRServiceC type SignalRServiceClientConnectionDisconnectedEventData = original.SignalRServiceClientConnectionDisconnectedEventData type StorageBlobCreatedEventData = original.StorageBlobCreatedEventData type StorageBlobDeletedEventData = original.StorageBlobDeletedEventData +type StorageBlobRenamedEventData = original.StorageBlobRenamedEventData +type StorageDirectoryCreatedEventData = original.StorageDirectoryCreatedEventData +type StorageDirectoryDeletedEventData = original.StorageDirectoryDeletedEventData +type StorageDirectoryRenamedEventData = original.StorageDirectoryRenamedEventData type SubscriptionDeletedEventData = original.SubscriptionDeletedEventData type SubscriptionValidationEventData = original.SubscriptionValidationEventData type SubscriptionValidationResponse = original.SubscriptionValidationResponse diff --git a/profiles/preview/eventgrid/eventgrid/models.go b/profiles/preview/eventgrid/eventgrid/models.go index 74269b8b100a..6c6bfab434ed 100644 --- a/profiles/preview/eventgrid/eventgrid/models.go +++ b/profiles/preview/eventgrid/eventgrid/models.go @@ -159,6 +159,10 @@ type SignalRServiceClientConnectionConnectedEventData = original.SignalRServiceC type SignalRServiceClientConnectionDisconnectedEventData = original.SignalRServiceClientConnectionDisconnectedEventData type StorageBlobCreatedEventData = original.StorageBlobCreatedEventData type StorageBlobDeletedEventData = original.StorageBlobDeletedEventData +type StorageBlobRenamedEventData = original.StorageBlobRenamedEventData +type StorageDirectoryCreatedEventData = original.StorageDirectoryCreatedEventData +type StorageDirectoryDeletedEventData = original.StorageDirectoryDeletedEventData +type StorageDirectoryRenamedEventData = original.StorageDirectoryRenamedEventData type SubscriptionDeletedEventData = original.SubscriptionDeletedEventData type SubscriptionValidationEventData = original.SubscriptionValidationEventData type SubscriptionValidationResponse = original.SubscriptionValidationResponse diff --git a/services/eventgrid/2018-01-01/eventgrid/client.go b/services/eventgrid/2018-01-01/eventgrid/client.go index bf45635a3de4..762db7353b45 100644 --- a/services/eventgrid/2018-01-01/eventgrid/client.go +++ b/services/eventgrid/2018-01-01/eventgrid/client.go @@ -1,4 +1,4 @@ -// Package eventgrid implements the Azure ARM Eventgrid service API version 2018-01-01. +// Package eventgrid implements the Azure ARM Eventgrid service API version . // // EventGrid Client package eventgrid diff --git a/services/eventgrid/2018-01-01/eventgrid/models.go b/services/eventgrid/2018-01-01/eventgrid/models.go index 22409444354c..39ae0a684eb6 100644 --- a/services/eventgrid/2018-01-01/eventgrid/models.go +++ b/services/eventgrid/2018-01-01/eventgrid/models.go @@ -2188,18 +2188,22 @@ type StorageBlobCreatedEventData struct { ClientRequestID *string `json:"clientRequestId,omitempty"` // RequestID - The request id generated by the Storage service for the storage API operation that triggered this event. RequestID *string `json:"requestId,omitempty"` - // ETag - The etag of the object at the time this event was triggered. + // ETag - The etag of the blob at the time this event was triggered. ETag *string `json:"eTag,omitempty"` // ContentType - The content type of the blob. This is the same as what would be returned in the Content-Type header from the blob. ContentType *string `json:"contentType,omitempty"` // ContentLength - The size of the blob in bytes. This is the same as what would be returned in the Content-Length header from the blob. ContentLength *int64 `json:"contentLength,omitempty"` + // ContentOffset - The offset of the blob in bytes. + ContentOffset *int64 `json:"contentOffset,omitempty"` // BlobType - The type of blob. BlobType *string `json:"blobType,omitempty"` // URL - The path to the blob. URL *string `json:"url,omitempty"` // Sequencer - An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. Sequencer *string `json:"sequencer,omitempty"` + // Identity - The identity of the requester that triggered this event. + Identity *string `json:"identity,omitempty"` // StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"` } @@ -2221,6 +2225,92 @@ type StorageBlobDeletedEventData struct { URL *string `json:"url,omitempty"` // Sequencer - An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. Sequencer *string `json:"sequencer,omitempty"` + // Identity - The identity of the requester that triggered this event. + Identity *string `json:"identity,omitempty"` + // StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. + StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"` +} + +// StorageBlobRenamedEventData schema of the Data property of an EventGridEvent for an +// Microsoft.Storage.BlobRenamed event. +type StorageBlobRenamedEventData struct { + // API - The name of the API/operation that triggered this event. + API *string `json:"api,omitempty"` + // ClientRequestID - A request id provided by the client of the storage API operation that triggered this event. + ClientRequestID *string `json:"clientRequestId,omitempty"` + // RequestID - The request id generated by the storage service for the storage API operation that triggered this event. + RequestID *string `json:"requestId,omitempty"` + // SourceURL - The path to the blob that was renamed. + SourceURL *string `json:"sourceUrl,omitempty"` + // DestinationURL - The path to the blob that was rename to. + DestinationURL *string `json:"destinationUrl,omitempty"` + // Sequencer - An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. + Sequencer *string `json:"sequencer,omitempty"` + // Identity - The identity of the requester that triggered this event. + Identity *string `json:"identity,omitempty"` + // StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. + StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"` +} + +// StorageDirectoryCreatedEventData schema of the Data property of an EventGridEvent for an +// Microsoft.Storage.DirectoryCreated event. +type StorageDirectoryCreatedEventData struct { + // API - The name of the API/operation that triggered this event. + API *string `json:"api,omitempty"` + // ClientRequestID - A request id provided by the client of the storage API operation that triggered this event. + ClientRequestID *string `json:"clientRequestId,omitempty"` + // RequestID - The request id generated by the storage service for the storage API operation that triggered this event. + RequestID *string `json:"requestId,omitempty"` + // ETag - The etag of the directory at the time this event was triggered. + ETag *string `json:"eTag,omitempty"` + // URL - The path to the directory. + URL *string `json:"url,omitempty"` + // Sequencer - An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. + Sequencer *string `json:"sequencer,omitempty"` + // Identity - The identity of the requester that triggered this event. + Identity *string `json:"identity,omitempty"` + // StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. + StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"` +} + +// StorageDirectoryDeletedEventData schema of the Data property of an EventGridEvent for an +// Microsoft.Storage.DirectoryDeleted event. +type StorageDirectoryDeletedEventData struct { + // API - The name of the API/operation that triggered this event. + API *string `json:"api,omitempty"` + // ClientRequestID - A request id provided by the client of the storage API operation that triggered this event. + ClientRequestID *string `json:"clientRequestId,omitempty"` + // RequestID - The request id generated by the storage service for the storage API operation that triggered this event. + RequestID *string `json:"requestId,omitempty"` + // URL - The path to the directory deleted. + URL *string `json:"url,omitempty"` + // Recursive - Is this event for a recursive delete operation. + Recursive *string `json:"recursive,omitempty"` + // Sequencer - An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. + Sequencer *string `json:"sequencer,omitempty"` + // Identity - The identity of the requester that triggered this event. + Identity *string `json:"identity,omitempty"` + // StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. + StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"` +} + +// StorageDirectoryRenamedEventData schema of the Data property of an EventGridEvent for an +// Microsoft.Storage.DirectoryRenamed event. +type StorageDirectoryRenamedEventData struct { + // API - The name of the API/operation that triggered this event. + API *string `json:"api,omitempty"` + // ClientRequestID - A request id provided by the client of the storage API operation that triggered this event. + ClientRequestID *string `json:"clientRequestId,omitempty"` + // RequestID - The request id generated by the storage service for the storage API operation that triggered this event. + RequestID *string `json:"requestId,omitempty"` + // SourceURL - The path to the directory that was renamed. + SourceURL *string `json:"sourceUrl,omitempty"` + // DestinationURL - The path to the directory that was rename to. + DestinationURL *string `json:"destinationUrl,omitempty"` + // Sequencer - An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. + Sequencer *string `json:"sequencer,omitempty"` + // Identity - The identity of the requester that triggered this event. + Identity *string `json:"identity,omitempty"` // StorageDiagnostics - For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. StorageDiagnostics interface{} `json:"storageDiagnostics,omitempty"` } From 4f12847f88a5f15fc7937e45fa3a36e6f6e20066 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Thu, 17 Oct 2019 01:35:10 +0000 Subject: [PATCH 2/3] Generated from e1e58a72a322f6a32ebf891169674985771267f1 update according to pr reviews --- services/eventgrid/2018-01-01/eventgrid/client.go | 2 +- services/eventgrid/2018-01-01/eventgrid/models.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/eventgrid/2018-01-01/eventgrid/client.go b/services/eventgrid/2018-01-01/eventgrid/client.go index 762db7353b45..bf45635a3de4 100644 --- a/services/eventgrid/2018-01-01/eventgrid/client.go +++ b/services/eventgrid/2018-01-01/eventgrid/client.go @@ -1,4 +1,4 @@ -// Package eventgrid implements the Azure ARM Eventgrid service API version . +// Package eventgrid implements the Azure ARM Eventgrid service API version 2018-01-01. // // EventGrid Client package eventgrid diff --git a/services/eventgrid/2018-01-01/eventgrid/models.go b/services/eventgrid/2018-01-01/eventgrid/models.go index 39ae0a684eb6..78d939a868ad 100644 --- a/services/eventgrid/2018-01-01/eventgrid/models.go +++ b/services/eventgrid/2018-01-01/eventgrid/models.go @@ -2242,7 +2242,7 @@ type StorageBlobRenamedEventData struct { RequestID *string `json:"requestId,omitempty"` // SourceURL - The path to the blob that was renamed. SourceURL *string `json:"sourceUrl,omitempty"` - // DestinationURL - The path to the blob that was rename to. + // DestinationURL - The new path to the blob after the rename operation. DestinationURL *string `json:"destinationUrl,omitempty"` // Sequencer - An opaque string value representing the logical sequence of events for any particular blob name. Users can use standard string comparison to understand the relative sequence of two events on the same blob name. Sequencer *string `json:"sequencer,omitempty"` @@ -2282,7 +2282,7 @@ type StorageDirectoryDeletedEventData struct { ClientRequestID *string `json:"clientRequestId,omitempty"` // RequestID - The request id generated by the storage service for the storage API operation that triggered this event. RequestID *string `json:"requestId,omitempty"` - // URL - The path to the directory deleted. + // URL - The path to the deleted directory. URL *string `json:"url,omitempty"` // Recursive - Is this event for a recursive delete operation. Recursive *string `json:"recursive,omitempty"` @@ -2305,7 +2305,7 @@ type StorageDirectoryRenamedEventData struct { RequestID *string `json:"requestId,omitempty"` // SourceURL - The path to the directory that was renamed. SourceURL *string `json:"sourceUrl,omitempty"` - // DestinationURL - The path to the directory that was rename to. + // DestinationURL - The new path to the directory after the rename operation. DestinationURL *string `json:"destinationUrl,omitempty"` // Sequencer - An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. Sequencer *string `json:"sequencer,omitempty"` From 499320c5b6a11e4941d3ab61a6b19ab134a881d3 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Mon, 21 Oct 2019 20:45:38 +0000 Subject: [PATCH 3/3] Generated from 74a61c2feb1bc51623d2c11545aa52532ed20198 update according to pr reviews --- services/eventgrid/2018-01-01/eventgrid/models.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/eventgrid/2018-01-01/eventgrid/models.go b/services/eventgrid/2018-01-01/eventgrid/models.go index 78d939a868ad..ef63d54dcc3e 100644 --- a/services/eventgrid/2018-01-01/eventgrid/models.go +++ b/services/eventgrid/2018-01-01/eventgrid/models.go @@ -2285,7 +2285,7 @@ type StorageDirectoryDeletedEventData struct { // URL - The path to the deleted directory. URL *string `json:"url,omitempty"` // Recursive - Is this event for a recursive delete operation. - Recursive *string `json:"recursive,omitempty"` + Recursive *bool `json:"recursive,omitempty"` // Sequencer - An opaque string value representing the logical sequence of events for any particular directory name. Users can use standard string comparison to understand the relative sequence of two events on the same directory name. Sequencer *string `json:"sequencer,omitempty"` // Identity - The identity of the requester that triggered this event.