1
1
// Copyright (c) Microsoft. All rights reserved.
2
2
3
+ using System ;
3
4
using System . Collections . Generic ;
4
5
using System . Text . Json . Serialization ;
5
6
@@ -14,31 +15,31 @@ public sealed class GeminiGroundingMetadata
14
15
/// Search entry point information.
15
16
/// </summary>
16
17
[ JsonPropertyName ( "searchEntryPoint" ) ]
17
- public SearchEntryPointElement SearchEntryPoint { get ; set ; } = null ! ;
18
+ public SearchEntryPointElement ? SearchEntryPoint { get ; set ; }
18
19
19
20
/// <summary>
20
21
/// Grounding chunks.
21
22
/// </summary>
22
23
[ JsonPropertyName ( "groundingChunks" ) ]
23
- public IList < GroundingChunkElement > GroundingChunks { get ; set ; } = null ! ;
24
+ public IList < GroundingChunkElement > ? GroundingChunks { get ; set ; }
24
25
25
26
/// <summary>
26
27
/// Grounding supports.
27
28
/// </summary>
28
29
[ JsonPropertyName ( "groundingSupports" ) ]
29
- public IList < GroundingSupportElement > GroundingSupports { get ; set ; } = null ! ;
30
+ public IList < GroundingSupportElement > ? GroundingSupports { get ; set ; }
30
31
31
32
/// <summary>
32
33
/// Retrieval metadata.
33
34
/// </summary>
34
35
[ JsonPropertyName ( "retrievalMetadata" ) ]
35
- public Dictionary < string , object > RetrievalMetadata { get ; set ; } = null ! ;
36
+ public Dictionary < string , object > ? RetrievalMetadata { get ; set ; }
36
37
37
38
/// <summary>
38
39
/// Web search queries.
39
40
/// </summary>
40
41
[ JsonPropertyName ( "webSearchQueries" ) ]
41
- public IList < string > WebSearchQueries { get ; set ; } = null ! ;
42
+ public IList < string > ? WebSearchQueries { get ; set ; }
42
43
43
44
/// <summary>
44
45
/// Search entry point element.
@@ -49,7 +50,7 @@ public sealed class SearchEntryPointElement
49
50
/// Rendered content.
50
51
/// </summary>
51
52
[ JsonPropertyName ( "renderedContent" ) ]
52
- public string RenderedContent { get ; set ; } = null ! ;
53
+ public string ? RenderedContent { get ; set ; }
53
54
}
54
55
55
56
/// <summary>
@@ -61,7 +62,7 @@ public sealed class GroundingChunkElement
61
62
/// Web information.
62
63
/// </summary>
63
64
[ JsonPropertyName ( "web" ) ]
64
- public WebElement Web { get ; set ; } = null ! ;
65
+ public WebElement ? Web { get ; set ; }
65
66
}
66
67
67
68
/// <summary>
@@ -73,13 +74,13 @@ public sealed class WebElement
73
74
/// URI of the web resource.
74
75
/// </summary>
75
76
[ JsonPropertyName ( "uri" ) ]
76
- public string Uri { get ; set ; } = null ! ;
77
+ public Uri ? Uri { get ; set ; }
77
78
78
79
/// <summary>
79
80
/// Title of the web resource.
80
81
/// </summary>
81
82
[ JsonPropertyName ( "title" ) ]
82
- public string Title { get ; set ; } = null ! ;
83
+ public string ? Title { get ; set ; }
83
84
}
84
85
85
86
/// <summary>
@@ -91,19 +92,19 @@ public sealed class GroundingSupportElement
91
92
/// Segment information.
92
93
/// </summary>
93
94
[ JsonPropertyName ( "segment" ) ]
94
- public SegmentElement Segment { get ; set ; } = null ! ;
95
+ public SegmentElement ? Segment { get ; set ; }
95
96
96
97
/// <summary>
97
98
/// Grounding chunk indices.
98
99
/// </summary>
99
100
[ JsonPropertyName ( "groundingChunkIndices" ) ]
100
- public IList < int > GroundingChunkIndices { get ; set ; } = null ! ;
101
+ public IList < int > ? GroundingChunkIndices { get ; set ; }
101
102
102
103
/// <summary>
103
104
/// Confidence scores.
104
105
/// </summary>
105
106
[ JsonPropertyName ( "confidenceScores" ) ]
106
- public IList < double > ConfidenceScores { get ; set ; } = null ! ;
107
+ public IList < double > ? ConfidenceScores { get ; set ; }
107
108
}
108
109
109
110
/// <summary>
@@ -127,6 +128,6 @@ public sealed class SegmentElement
127
128
/// Text of the segment.
128
129
/// </summary>
129
130
[ JsonPropertyName ( "text" ) ]
130
- public string Text { get ; set ; } = null ! ;
131
+ public string ? Text { get ; set ; }
131
132
}
132
133
}
0 commit comments