diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs
index 0787bda195a3..f9141ab34350 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs
@@ -311,14 +311,16 @@ public static DeviceTelemetryEventProperties DeviceTelemetryEventProperties(obje
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
/// The request that generated the event.
/// The agent that initiated the event. For most situations, this could be from the authorization context of the request.
/// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
+ /// The connected registry information if the event is generated by a connected registry.
/// A new instance for mocking.
- public static ContainerRegistryEventData ContainerRegistryEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null)
+ public static ContainerRegistryEventData ContainerRegistryEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryEventTarget target = null, ContainerRegistryEventRequest request = null, ContainerRegistryEventActor actor = null, ContainerRegistryEventSource source = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null)
{
- return new ContainerRegistryEventData(id, timestamp, action, target, request, actor, source);
+ return new ContainerRegistryEventData(id, timestamp, action, location, target, request, actor, source, connectedRegistry);
}
/// Initializes a new instance of ContainerRegistryEventTarget.
@@ -364,15 +366,25 @@ public static ContainerRegistryEventSource ContainerRegistryEventSource(string a
return new ContainerRegistryEventSource(addr, instanceID);
}
+ /// Initializes a new instance of ContainerRegistryEventConnectedRegistry.
+ /// The name of the connected registry that generated this event.
+ /// A new instance for mocking.
+ public static ContainerRegistryEventConnectedRegistry ContainerRegistryEventConnectedRegistry(string name = null)
+ {
+ return new ContainerRegistryEventConnectedRegistry(name);
+ }
+
/// Initializes a new instance of ContainerRegistryArtifactEventData.
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
+ /// The connected registry information if the event is generated by a connected registry.
/// A new instance for mocking.
- public static ContainerRegistryArtifactEventData ContainerRegistryArtifactEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, ContainerRegistryArtifactEventTarget target = null)
+ public static ContainerRegistryArtifactEventData ContainerRegistryArtifactEventData(string id = null, DateTimeOffset? timestamp = null, string action = null, string location = null, ContainerRegistryArtifactEventTarget target = null, ContainerRegistryEventConnectedRegistry connectedRegistry = null)
{
- return new ContainerRegistryArtifactEventData(id, timestamp, action, target);
+ return new ContainerRegistryArtifactEventData(id, timestamp, action, location, target, connectedRegistry);
}
/// Initializes a new instance of ContainerRegistryArtifactEventTarget.
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.Serialization.cs
index 83ee3a507fd1..8c4e739538eb 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.Serialization.cs
@@ -20,7 +20,9 @@ internal static ContainerRegistryArtifactEventData DeserializeContainerRegistryA
Optional id = default;
Optional timestamp = default;
Optional action = default;
+ Optional location = default;
Optional target = default;
+ Optional connectedRegistry = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
@@ -43,6 +45,11 @@ internal static ContainerRegistryArtifactEventData DeserializeContainerRegistryA
action = property.Value.GetString();
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("target"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -53,8 +60,18 @@ internal static ContainerRegistryArtifactEventData DeserializeContainerRegistryA
target = ContainerRegistryArtifactEventTarget.DeserializeContainerRegistryArtifactEventTarget(property.Value);
continue;
}
+ if (property.NameEquals("connectedRegistry"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ connectedRegistry = ContainerRegistryEventConnectedRegistry.DeserializeContainerRegistryEventConnectedRegistry(property.Value);
+ continue;
+ }
}
- return new ContainerRegistryArtifactEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value);
+ return new ContainerRegistryArtifactEventData(id.Value, Optional.ToNullable(timestamp), action.Value, location.Value, target.Value, connectedRegistry.Value);
}
internal partial class ContainerRegistryArtifactEventDataConverter : JsonConverter
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.cs
index f6e88c27a84e..168dde2c5b8b 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryArtifactEventData.cs
@@ -21,13 +21,17 @@ internal ContainerRegistryArtifactEventData()
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
- internal ContainerRegistryArtifactEventData(string id, DateTimeOffset? timestamp, string action, ContainerRegistryArtifactEventTarget target)
+ /// The connected registry information if the event is generated by a connected registry.
+ internal ContainerRegistryArtifactEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry)
{
Id = id;
Timestamp = timestamp;
Action = action;
+ Location = location;
Target = target;
+ ConnectedRegistry = connectedRegistry;
}
/// The event ID.
@@ -36,7 +40,11 @@ internal ContainerRegistryArtifactEventData(string id, DateTimeOffset? timestamp
public DateTimeOffset? Timestamp { get; }
/// The action that encompasses the provided event.
public string Action { get; }
+ /// The location of the event.
+ public string Location { get; }
/// The target of the event.
public ContainerRegistryArtifactEventTarget Target { get; }
+ /// The connected registry information if the event is generated by a connected registry.
+ public ContainerRegistryEventConnectedRegistry ConnectedRegistry { get; }
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.Serialization.cs
index 0fc35d6b20fe..db883794d673 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.Serialization.cs
@@ -20,7 +20,9 @@ internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegis
Optional id = default;
Optional timestamp = default;
Optional action = default;
+ Optional location = default;
Optional target = default;
+ Optional connectedRegistry = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
@@ -43,6 +45,11 @@ internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegis
action = property.Value.GetString();
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("target"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -53,8 +60,18 @@ internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegis
target = ContainerRegistryArtifactEventTarget.DeserializeContainerRegistryArtifactEventTarget(property.Value);
continue;
}
+ if (property.NameEquals("connectedRegistry"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ connectedRegistry = ContainerRegistryEventConnectedRegistry.DeserializeContainerRegistryEventConnectedRegistry(property.Value);
+ continue;
+ }
}
- return new ContainerRegistryChartDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value);
+ return new ContainerRegistryChartDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, location.Value, target.Value, connectedRegistry.Value);
}
internal partial class ContainerRegistryChartDeletedEventDataConverter : JsonConverter
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.cs
index 2bb0f50f4c54..66b42b1f2045 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartDeletedEventData.cs
@@ -21,8 +21,10 @@ internal ContainerRegistryChartDeletedEventData()
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
- internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset? timestamp, string action, ContainerRegistryArtifactEventTarget target) : base(id, timestamp, action, target)
+ /// The connected registry information if the event is generated by a connected registry.
+ internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(id, timestamp, action, location, target, connectedRegistry)
{
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.Serialization.cs
index d5aa96d526e1..1bde481a1ac9 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.Serialization.cs
@@ -20,7 +20,9 @@ internal static ContainerRegistryChartPushedEventData DeserializeContainerRegist
Optional id = default;
Optional timestamp = default;
Optional action = default;
+ Optional location = default;
Optional target = default;
+ Optional connectedRegistry = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
@@ -43,6 +45,11 @@ internal static ContainerRegistryChartPushedEventData DeserializeContainerRegist
action = property.Value.GetString();
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("target"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -53,8 +60,18 @@ internal static ContainerRegistryChartPushedEventData DeserializeContainerRegist
target = ContainerRegistryArtifactEventTarget.DeserializeContainerRegistryArtifactEventTarget(property.Value);
continue;
}
+ if (property.NameEquals("connectedRegistry"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ connectedRegistry = ContainerRegistryEventConnectedRegistry.DeserializeContainerRegistryEventConnectedRegistry(property.Value);
+ continue;
+ }
}
- return new ContainerRegistryChartPushedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value);
+ return new ContainerRegistryChartPushedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, location.Value, target.Value, connectedRegistry.Value);
}
internal partial class ContainerRegistryChartPushedEventDataConverter : JsonConverter
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.cs
index fe9f3bd610ca..407a312e5959 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryChartPushedEventData.cs
@@ -21,8 +21,10 @@ internal ContainerRegistryChartPushedEventData()
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
- internal ContainerRegistryChartPushedEventData(string id, DateTimeOffset? timestamp, string action, ContainerRegistryArtifactEventTarget target) : base(id, timestamp, action, target)
+ /// The connected registry information if the event is generated by a connected registry.
+ internal ContainerRegistryChartPushedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(id, timestamp, action, location, target, connectedRegistry)
{
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventConnectedRegistry.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventConnectedRegistry.Serialization.cs
new file mode 100644
index 000000000000..2208ed0d1f25
--- /dev/null
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventConnectedRegistry.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Messaging.EventGrid.SystemEvents
+{
+ public partial class ContainerRegistryEventConnectedRegistry
+ {
+ internal static ContainerRegistryEventConnectedRegistry DeserializeContainerRegistryEventConnectedRegistry(JsonElement element)
+ {
+ Optional name = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ }
+ return new ContainerRegistryEventConnectedRegistry(name.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventConnectedRegistry.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventConnectedRegistry.cs
new file mode 100644
index 000000000000..8aae2036a518
--- /dev/null
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventConnectedRegistry.cs
@@ -0,0 +1,28 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.Messaging.EventGrid.SystemEvents
+{
+ /// The connected registry information if the event is generated by a connected registry.
+ public partial class ContainerRegistryEventConnectedRegistry
+ {
+ /// Initializes a new instance of ContainerRegistryEventConnectedRegistry.
+ internal ContainerRegistryEventConnectedRegistry()
+ {
+ }
+
+ /// Initializes a new instance of ContainerRegistryEventConnectedRegistry.
+ /// The name of the connected registry that generated this event.
+ internal ContainerRegistryEventConnectedRegistry(string name)
+ {
+ Name = name;
+ }
+
+ /// The name of the connected registry that generated this event.
+ public string Name { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.Serialization.cs
index 9bef4e9e7324..c4d68397c607 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.Serialization.cs
@@ -20,10 +20,12 @@ internal static ContainerRegistryEventData DeserializeContainerRegistryEventData
Optional id = default;
Optional timestamp = default;
Optional action = default;
+ Optional location = default;
Optional target = default;
Optional request = default;
Optional actor = default;
Optional source = default;
+ Optional connectedRegistry = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
@@ -46,6 +48,11 @@ internal static ContainerRegistryEventData DeserializeContainerRegistryEventData
action = property.Value.GetString();
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("target"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -86,8 +93,18 @@ internal static ContainerRegistryEventData DeserializeContainerRegistryEventData
source = ContainerRegistryEventSource.DeserializeContainerRegistryEventSource(property.Value);
continue;
}
+ if (property.NameEquals("connectedRegistry"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ connectedRegistry = ContainerRegistryEventConnectedRegistry.DeserializeContainerRegistryEventConnectedRegistry(property.Value);
+ continue;
+ }
}
- return new ContainerRegistryEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value, request.Value, actor.Value, source.Value);
+ return new ContainerRegistryEventData(id.Value, Optional.ToNullable(timestamp), action.Value, location.Value, target.Value, request.Value, actor.Value, source.Value, connectedRegistry.Value);
}
internal partial class ContainerRegistryEventDataConverter : JsonConverter
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.cs
index 7d61eff9fb7c..08264fa4a27f 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryEventData.cs
@@ -21,19 +21,23 @@ internal ContainerRegistryEventData()
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
/// The request that generated the event.
/// The agent that initiated the event. For most situations, this could be from the authorization context of the request.
/// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
- internal ContainerRegistryEventData(string id, DateTimeOffset? timestamp, string action, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source)
+ /// The connected registry information if the event is generated by a connected registry.
+ internal ContainerRegistryEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry)
{
Id = id;
Timestamp = timestamp;
Action = action;
+ Location = location;
Target = target;
Request = request;
Actor = actor;
Source = source;
+ ConnectedRegistry = connectedRegistry;
}
/// The event ID.
@@ -42,6 +46,8 @@ internal ContainerRegistryEventData(string id, DateTimeOffset? timestamp, string
public DateTimeOffset? Timestamp { get; }
/// The action that encompasses the provided event.
public string Action { get; }
+ /// The location of the event.
+ public string Location { get; }
/// The target of the event.
public ContainerRegistryEventTarget Target { get; }
/// The request that generated the event.
@@ -50,5 +56,7 @@ internal ContainerRegistryEventData(string id, DateTimeOffset? timestamp, string
public ContainerRegistryEventActor Actor { get; }
/// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
public ContainerRegistryEventSource Source { get; }
+ /// The connected registry information if the event is generated by a connected registry.
+ public ContainerRegistryEventConnectedRegistry ConnectedRegistry { get; }
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.Serialization.cs
index 6dadf8460665..1fdb7bfb6ced 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.Serialization.cs
@@ -20,10 +20,12 @@ internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegis
Optional id = default;
Optional timestamp = default;
Optional action = default;
+ Optional location = default;
Optional target = default;
Optional request = default;
Optional actor = default;
Optional source = default;
+ Optional connectedRegistry = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
@@ -46,6 +48,11 @@ internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegis
action = property.Value.GetString();
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("target"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -86,8 +93,18 @@ internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegis
source = ContainerRegistryEventSource.DeserializeContainerRegistryEventSource(property.Value);
continue;
}
+ if (property.NameEquals("connectedRegistry"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ connectedRegistry = ContainerRegistryEventConnectedRegistry.DeserializeContainerRegistryEventConnectedRegistry(property.Value);
+ continue;
+ }
}
- return new ContainerRegistryImageDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value, request.Value, actor.Value, source.Value);
+ return new ContainerRegistryImageDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, location.Value, target.Value, request.Value, actor.Value, source.Value, connectedRegistry.Value);
}
internal partial class ContainerRegistryImageDeletedEventDataConverter : JsonConverter
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.cs
index ec17fe861377..ccd8c752d978 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImageDeletedEventData.cs
@@ -21,11 +21,13 @@ internal ContainerRegistryImageDeletedEventData()
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
/// The request that generated the event.
/// The agent that initiated the event. For most situations, this could be from the authorization context of the request.
/// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
- internal ContainerRegistryImageDeletedEventData(string id, DateTimeOffset? timestamp, string action, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source) : base(id, timestamp, action, target, request, actor, source)
+ /// The connected registry information if the event is generated by a connected registry.
+ internal ContainerRegistryImageDeletedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(id, timestamp, action, location, target, request, actor, source, connectedRegistry)
{
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.Serialization.cs
index b42a98c31b49..78bf95a852e1 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.Serialization.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.Serialization.cs
@@ -20,10 +20,12 @@ internal static ContainerRegistryImagePushedEventData DeserializeContainerRegist
Optional id = default;
Optional timestamp = default;
Optional action = default;
+ Optional location = default;
Optional target = default;
Optional request = default;
Optional actor = default;
Optional source = default;
+ Optional connectedRegistry = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
@@ -46,6 +48,11 @@ internal static ContainerRegistryImagePushedEventData DeserializeContainerRegist
action = property.Value.GetString();
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("target"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -86,8 +93,18 @@ internal static ContainerRegistryImagePushedEventData DeserializeContainerRegist
source = ContainerRegistryEventSource.DeserializeContainerRegistryEventSource(property.Value);
continue;
}
+ if (property.NameEquals("connectedRegistry"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ connectedRegistry = ContainerRegistryEventConnectedRegistry.DeserializeContainerRegistryEventConnectedRegistry(property.Value);
+ continue;
+ }
}
- return new ContainerRegistryImagePushedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value, request.Value, actor.Value, source.Value);
+ return new ContainerRegistryImagePushedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, location.Value, target.Value, request.Value, actor.Value, source.Value, connectedRegistry.Value);
}
internal partial class ContainerRegistryImagePushedEventDataConverter : JsonConverter
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.cs
index 7eb72d9f78a4..8c84f9035ca4 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ContainerRegistryImagePushedEventData.cs
@@ -21,11 +21,13 @@ internal ContainerRegistryImagePushedEventData()
/// The event ID.
/// The time at which the event occurred.
/// The action that encompasses the provided event.
+ /// The location of the event.
/// The target of the event.
/// The request that generated the event.
/// The agent that initiated the event. For most situations, this could be from the authorization context of the request.
/// The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it.
- internal ContainerRegistryImagePushedEventData(string id, DateTimeOffset? timestamp, string action, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source) : base(id, timestamp, action, target, request, actor, source)
+ /// The connected registry information if the event is generated by a connected registry.
+ internal ContainerRegistryImagePushedEventData(string id, DateTimeOffset? timestamp, string action, string location, ContainerRegistryEventTarget target, ContainerRegistryEventRequest request, ContainerRegistryEventActor actor, ContainerRegistryEventSource source, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(id, timestamp, action, location, target, request, actor, source, connectedRegistry)
{
}
}
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md
index b15c03fe8ff4..6ba6a31ebafb 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/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/readme.md
+require: https://github.com/Azure/azure-rest-api-specs/blob/a1491c963c38d822dbcb8f416967878db3975f07/specification/eventgrid/data-plane/readme.md
```
## Swagger workarounds