From 248565d371c3ac5c103c93053b5071ed2e1faa39 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 31 Jan 2022 19:36:45 +0000 Subject: [PATCH] CodeGen from PR 17565 in Azure/azure-rest-api-specs Merge 80bfd3d035a82fe41bafc87d7b7b274b830ce567 into 4251faf27335ee402cbac8c47d5cd915d861842c --- .../src/Generated/EventGridModelFactory.cs | 2 +- ...entHubCaptureFileCreatedEventData.Serialization.cs | 8 ++++---- .../StorageDirectoryDeletedEventData.Serialization.cs | 11 +++-------- .../Models/StorageDirectoryDeletedEventData.cs | 4 ++-- .../Azure.Messaging.EventGrid/src/autorest.md | 2 +- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index 72dfa1e4e2752..0981746ad04b5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -76,7 +76,7 @@ public static StorageDirectoryCreatedEventData StorageDirectoryCreatedEventData( /// The identity of the requester that triggered this event. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. /// A new instance for mocking. - public static StorageDirectoryDeletedEventData StorageDirectoryDeletedEventData(string api = null, string clientRequestId = null, string requestId = null, string url = null, bool? recursive = null, string sequencer = null, string identity = null, object storageDiagnostics = null) + public static StorageDirectoryDeletedEventData StorageDirectoryDeletedEventData(string api = null, string clientRequestId = null, string requestId = null, string url = null, string recursive = null, string sequencer = null, string identity = null, object storageDiagnostics = null) { return new StorageDirectoryDeletedEventData(api, clientRequestId, requestId, url, recursive, sequencer, identity, storageDiagnostics); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EventHubCaptureFileCreatedEventData.Serialization.cs index d6f0eb471857f..f05a6d3df248b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -17,7 +17,7 @@ public partial class EventHubCaptureFileCreatedEventData { internal static EventHubCaptureFileCreatedEventData DeserializeEventHubCaptureFileCreatedEventData(JsonElement element) { - Optional fileurl = default; + Optional fileUrl = default; Optional fileType = default; Optional partitionId = default; Optional sizeInBytes = default; @@ -28,9 +28,9 @@ internal static EventHubCaptureFileCreatedEventData DeserializeEventHubCaptureFi Optional lastEnqueueTime = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("fileurl")) + if (property.NameEquals("fileUrl")) { - fileurl = property.Value.GetString(); + fileUrl = property.Value.GetString(); continue; } if (property.NameEquals("fileType")) @@ -104,7 +104,7 @@ internal static EventHubCaptureFileCreatedEventData DeserializeEventHubCaptureFi continue; } } - return new EventHubCaptureFileCreatedEventData(fileurl.Value, fileType.Value, partitionId.Value, Optional.ToNullable(sizeInBytes), Optional.ToNullable(eventCount), Optional.ToNullable(firstSequenceNumber), Optional.ToNullable(lastSequenceNumber), Optional.ToNullable(firstEnqueueTime), Optional.ToNullable(lastEnqueueTime)); + return new EventHubCaptureFileCreatedEventData(fileUrl.Value, fileType.Value, partitionId.Value, Optional.ToNullable(sizeInBytes), Optional.ToNullable(eventCount), Optional.ToNullable(firstSequenceNumber), Optional.ToNullable(lastSequenceNumber), Optional.ToNullable(firstEnqueueTime), Optional.ToNullable(lastEnqueueTime)); } internal partial class EventHubCaptureFileCreatedEventDataConverter : JsonConverter diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.Serialization.cs index 15f04b71c1b7c..b20f756a6006d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.Serialization.cs @@ -21,7 +21,7 @@ internal static StorageDirectoryDeletedEventData DeserializeStorageDirectoryDele Optional clientRequestId = default; Optional requestId = default; Optional url = default; - Optional recursive = default; + Optional recursive = default; Optional sequencer = default; Optional identity = default; Optional storageDiagnostics = default; @@ -49,12 +49,7 @@ internal static StorageDirectoryDeletedEventData DeserializeStorageDirectoryDele } if (property.NameEquals("recursive")) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - recursive = property.Value.GetBoolean(); + recursive = property.Value.GetString(); continue; } if (property.NameEquals("sequencer")) @@ -78,7 +73,7 @@ internal static StorageDirectoryDeletedEventData DeserializeStorageDirectoryDele continue; } } - return new StorageDirectoryDeletedEventData(api.Value, clientRequestId.Value, requestId.Value, url.Value, Optional.ToNullable(recursive), sequencer.Value, identity.Value, storageDiagnostics.Value); + return new StorageDirectoryDeletedEventData(api.Value, clientRequestId.Value, requestId.Value, url.Value, recursive.Value, sequencer.Value, identity.Value, storageDiagnostics.Value); } internal partial class StorageDirectoryDeletedEventDataConverter : JsonConverter diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.cs index 3ab160bed3cc4..9cacff6d6ded0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/StorageDirectoryDeletedEventData.cs @@ -24,7 +24,7 @@ internal StorageDirectoryDeletedEventData() /// 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. /// The identity of the requester that triggered this event. /// For service use only. Diagnostic data occasionally included by the Azure Storage service. This property should be ignored by event consumers. - internal StorageDirectoryDeletedEventData(string api, string clientRequestId, string requestId, string url, bool? recursive, string sequencer, string identity, object storageDiagnostics) + internal StorageDirectoryDeletedEventData(string api, string clientRequestId, string requestId, string url, string recursive, string sequencer, string identity, object storageDiagnostics) { Api = api; ClientRequestId = clientRequestId; @@ -45,7 +45,7 @@ internal StorageDirectoryDeletedEventData(string api, string clientRequestId, st /// The path to the deleted directory. public string Url { get; } /// Is this event for a recursive delete operation. - public bool? Recursive { get; } + public string Recursive { get; } /// 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. public string Sequencer { get; } /// The identity of the requester that triggered this event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index 9985b47f59ae4..1e53c9ddbcbf5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/409af02e5ca217c7e7ec2acf50f4976c053496f8/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/1debf578d85088d28106d707a4c0cf5c0bc7968c/specification/eventgrid/data-plane/readme.md ``` ## Swagger workarounds