| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Text.Json; |
| | 10 | |
|
| | 11 | | namespace Azure.Messaging.EventGrid.Models |
| | 12 | | { |
| | 13 | | /// <summary> Properties of an event published to an Event Grid topic using the EventGrid Schema. </summary> |
| | 14 | | internal partial class EventGridEventInternal |
| | 15 | | { |
| | 16 | | /// <summary> Initializes a new instance of EventGridEventInternal. </summary> |
| | 17 | | /// <param name="id"> An unique identifier for the event. </param> |
| | 18 | | /// <param name="subject"> A resource path relative to the topic path. </param> |
| | 19 | | /// <param name="data"> Event data specific to the event type. </param> |
| | 20 | | /// <param name="eventType"> The type of the event that occurred. </param> |
| | 21 | | /// <param name="eventTime"> The time (in UTC) the event was generated. </param> |
| | 22 | | /// <param name="dataVersion"> The schema version of the data object. </param> |
| | 23 | | /// <exception cref="ArgumentNullException"> <paramref name="id"/>, <paramref name="subject"/>, <paramref name=" |
| 80 | 24 | | public EventGridEventInternal(string id, string subject, JsonElement data, string eventType, DateTimeOffset even |
| | 25 | | { |
| 80 | 26 | | if (id == null) |
| | 27 | | { |
| 0 | 28 | | throw new ArgumentNullException(nameof(id)); |
| | 29 | | } |
| 80 | 30 | | if (subject == null) |
| | 31 | | { |
| 0 | 32 | | throw new ArgumentNullException(nameof(subject)); |
| | 33 | | } |
| 80 | 34 | | if (eventType == null) |
| | 35 | | { |
| 0 | 36 | | throw new ArgumentNullException(nameof(eventType)); |
| | 37 | | } |
| 80 | 38 | | if (dataVersion == null) |
| | 39 | | { |
| 0 | 40 | | throw new ArgumentNullException(nameof(dataVersion)); |
| | 41 | | } |
| | 42 | |
|
| 80 | 43 | | Id = id; |
| 80 | 44 | | Subject = subject; |
| 80 | 45 | | Data = data; |
| 80 | 46 | | EventType = eventType; |
| 80 | 47 | | EventTime = eventTime; |
| 80 | 48 | | DataVersion = dataVersion; |
| 80 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> Initializes a new instance of EventGridEventInternal. </summary> |
| | 52 | | /// <param name="id"> An unique identifier for the event. </param> |
| | 53 | | /// <param name="topic"> The resource path of the event source. </param> |
| | 54 | | /// <param name="subject"> A resource path relative to the topic path. </param> |
| | 55 | | /// <param name="data"> Event data specific to the event type. </param> |
| | 56 | | /// <param name="eventType"> The type of the event that occurred. </param> |
| | 57 | | /// <param name="eventTime"> The time (in UTC) the event was generated. </param> |
| | 58 | | /// <param name="metadataVersion"> The schema version of the event metadata. </param> |
| | 59 | | /// <param name="dataVersion"> The schema version of the data object. </param> |
| 86 | 60 | | internal EventGridEventInternal(string id, string topic, string subject, JsonElement data, string eventType, Dat |
| | 61 | | { |
| 86 | 62 | | Id = id; |
| 86 | 63 | | Topic = topic; |
| 86 | 64 | | Subject = subject; |
| 86 | 65 | | Data = data; |
| 86 | 66 | | EventType = eventType; |
| 86 | 67 | | EventTime = eventTime; |
| 86 | 68 | | MetadataVersion = metadataVersion; |
| 86 | 69 | | DataVersion = dataVersion; |
| 86 | 70 | | } |
| | 71 | |
|
| | 72 | | /// <summary> An unique identifier for the event. </summary> |
| 332 | 73 | | public string Id { get; set; } |
| | 74 | | /// <summary> The resource path of the event source. </summary> |
| 266 | 75 | | public string Topic { get; set; } |
| | 76 | | /// <summary> A resource path relative to the topic path. </summary> |
| 332 | 77 | | public string Subject { get; set; } |
| | 78 | | /// <summary> The type of the event that occurred. </summary> |
| 500 | 79 | | public string EventType { get; set; } |
| | 80 | | /// <summary> The time (in UTC) the event was generated. </summary> |
| 332 | 81 | | public DateTimeOffset EventTime { get; set; } |
| | 82 | | /// <summary> The schema version of the event metadata. </summary> |
| 0 | 83 | | public string MetadataVersion { get; } |
| | 84 | | /// <summary> The schema version of the data object. </summary> |
| 332 | 85 | | public string DataVersion { get; set; } |
| | 86 | | } |
| | 87 | | } |