internal static ContainerRegistryChartDeletedEventData DeserializeContainerRegistryChartDeletedEventData(JsonElement element) { Optional <string> id = default; Optional <DateTimeOffset> timestamp = default; Optional <string> action = default; Optional <ContainerRegistryArtifactEventTarget> target = 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 = ContainerRegistryArtifactEventTarget.DeserializeContainerRegistryArtifactEventTarget(property.Value); continue; } } return(new ContainerRegistryChartDeletedEventData(id.Value, Optional.ToNullable(timestamp), action.Value, target.Value)); }
internal ContainerRegistryArtifactEventData(string id, DateTimeOffset?timestamp, string action, ContainerRegistryArtifactEventTarget target) { Id = id; Timestamp = timestamp; Action = action; Target = target; }
internal static ContainerRegistryArtifactEventData DeserializeContainerRegistryArtifactEventData(JsonElement element) { Optional <string> id = default; Optional <DateTimeOffset> timestamp = default; Optional <string> action = default; Optional <string> location = default; Optional <ContainerRegistryArtifactEventTarget> target = 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 = 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, location.Value, target.Value, connectedRegistry.Value)); }
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; }
internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset?timestamp, string action, string location, ContainerRegistryArtifactEventTarget target, ContainerRegistryEventConnectedRegistry connectedRegistry) : base(id, timestamp, action, location, target, connectedRegistry) { }
internal ContainerRegistryChartDeletedEventData(string id, DateTimeOffset?timestamp, string action, ContainerRegistryArtifactEventTarget target) : base(id, timestamp, action, target) { }