|
| 1 | +/* |
| 2 | + * Licensed to Elasticsearch B.V. under one or more contributor |
| 3 | + * license agreements. See the NOTICE file distributed with |
| 4 | + * this work for additional information regarding copyright |
| 5 | + * ownership. Elasticsearch B.V. licenses this file to you under |
| 6 | + * the Apache License, Version 2.0 (the "License"); you may |
| 7 | + * not use this file except in compliance with the License. |
| 8 | + * You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +using System.Runtime.Serialization; |
| 21 | +using Elasticsearch.Net.Utf8Json; |
| 22 | + |
| 23 | +namespace Nest |
| 24 | +{ |
| 25 | + public class Event<TEvent> where TEvent : class |
| 26 | + { |
| 27 | + /// <summary> |
| 28 | + /// The individual fields requested for a event. |
| 29 | + /// </summary> |
| 30 | + [DataMember(Name = "fields")] |
| 31 | + public FieldValues Fields { get; internal set; } |
| 32 | + |
| 33 | + /// <summary> |
| 34 | + /// The id of the event. |
| 35 | + /// </summary> |
| 36 | + [DataMember(Name = "_id")] |
| 37 | + public string Id { get; internal set; } |
| 38 | + |
| 39 | + /// <summary> |
| 40 | + /// The index in which the event resides. |
| 41 | + /// </summary> |
| 42 | + [DataMember(Name = "_index")] |
| 43 | + public string Index { get; internal set; } |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// The source document for the event. |
| 47 | + /// </summary> |
| 48 | + [DataMember(Name = "_source")] |
| 49 | + [JsonFormatter(typeof(SourceFormatter<>))] |
| 50 | + public TEvent Source { get; internal set; } |
| 51 | + } |
| 52 | +} |
0 commit comments