internal static ContainerRegistryImageDeletedEventData DeserializeContainerRegistryImageDeletedEventData(JsonElement element)
        {
            Optional <string>         id                     = default;
            Optional <DateTimeOffset> timestamp              = default;
            Optional <string>         action                 = default;
            Optional <ContainerRegistryEventTarget>  target  = default;
            Optional <ContainerRegistryEventRequest> request = default;
            Optional <ContainerRegistryEventActor>   actor   = default;
            Optional <ContainerRegistryEventSource>  source  = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("timestamp"))
                {
                    timestamp = property.Value.GetDateTimeOffset("O");
                    continue;
                }
                if (property.NameEquals("action"))
                {
                    action = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("target"))
                {
                    target = ContainerRegistryEventTarget.DeserializeContainerRegistryEventTarget(property.Value);
                    continue;
                }
                if (property.NameEquals("request"))
                {
                    request = ContainerRegistryEventRequest.DeserializeContainerRegistryEventRequest(property.Value);
                    continue;
                }
                if (property.NameEquals("actor"))
                {
                    actor = ContainerRegistryEventActor.DeserializeContainerRegistryEventActor(property.Value);
                    continue;
                }
                if (property.NameEquals("source"))
                {
                    source = ContainerRegistryEventSource.DeserializeContainerRegistryEventSource(property.Value);
                    continue;
                }
            }
            return(new ContainerRegistryImageDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value, request.Value, actor.Value, source.Value));
        }
        internal static ContainerRegistryImagePushedEventData DeserializeContainerRegistryImagePushedEventData(JsonElement element)
        {
            Optional <string>         id        = default;
            Optional <DateTimeOffset> timestamp = default;
            Optional <string>         action    = default;
            Optional <string>         location  = default;
            Optional <ContainerRegistryEventTarget>            target            = default;
            Optional <ContainerRegistryEventRequest>           request           = default;
            Optional <ContainerRegistryEventActor>             actor             = default;
            Optional <ContainerRegistryEventSource>            source            = default;
            Optional <ContainerRegistryEventConnectedRegistry> connectedRegistry = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("id"))
                {
                    id = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("timestamp"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    timestamp = property.Value.GetDateTimeOffset("O");
                    continue;
                }
                if (property.NameEquals("action"))
                {
                    action = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("target"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    target = ContainerRegistryEventTarget.DeserializeContainerRegistryEventTarget(property.Value);
                    continue;
                }
                if (property.NameEquals("request"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    request = ContainerRegistryEventRequest.DeserializeContainerRegistryEventRequest(property.Value);
                    continue;
                }
                if (property.NameEquals("actor"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    actor = ContainerRegistryEventActor.DeserializeContainerRegistryEventActor(property.Value);
                    continue;
                }
                if (property.NameEquals("source"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    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, location.Value, target.Value, request.Value, actor.Value, source.Value, connectedRegistry.Value));
        }