Skip to content

Commit b9fec23

Browse files
committed
fix: changing uri string to System.Uri
1 parent 41292cc commit b9fec23

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

dotnet/src/Connectors/Connectors.Google/Models/Gemini/GeminiGroundingMetadata.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3+
using System;
34
using System.Collections.Generic;
45
using System.Text.Json.Serialization;
56

@@ -14,31 +15,31 @@ public sealed class GeminiGroundingMetadata
1415
/// Search entry point information.
1516
/// </summary>
1617
[JsonPropertyName("searchEntryPoint")]
17-
public SearchEntryPointElement SearchEntryPoint { get; set; } = null!;
18+
public SearchEntryPointElement? SearchEntryPoint { get; set; }
1819

1920
/// <summary>
2021
/// Grounding chunks.
2122
/// </summary>
2223
[JsonPropertyName("groundingChunks")]
23-
public IList<GroundingChunkElement> GroundingChunks { get; set; } = null!;
24+
public IList<GroundingChunkElement>? GroundingChunks { get; set; }
2425

2526
/// <summary>
2627
/// Grounding supports.
2728
/// </summary>
2829
[JsonPropertyName("groundingSupports")]
29-
public IList<GroundingSupportElement> GroundingSupports { get; set; } = null!;
30+
public IList<GroundingSupportElement>? GroundingSupports { get; set; }
3031

3132
/// <summary>
3233
/// Retrieval metadata.
3334
/// </summary>
3435
[JsonPropertyName("retrievalMetadata")]
35-
public Dictionary<string, object> RetrievalMetadata { get; set; } = null!;
36+
public Dictionary<string, object>? RetrievalMetadata { get; set; }
3637

3738
/// <summary>
3839
/// Web search queries.
3940
/// </summary>
4041
[JsonPropertyName("webSearchQueries")]
41-
public IList<string> WebSearchQueries { get; set; } = null!;
42+
public IList<string>? WebSearchQueries { get; set; }
4243

4344
/// <summary>
4445
/// Search entry point element.
@@ -49,7 +50,7 @@ public sealed class SearchEntryPointElement
4950
/// Rendered content.
5051
/// </summary>
5152
[JsonPropertyName("renderedContent")]
52-
public string RenderedContent { get; set; } = null!;
53+
public string? RenderedContent { get; set; }
5354
}
5455

5556
/// <summary>
@@ -61,7 +62,7 @@ public sealed class GroundingChunkElement
6162
/// Web information.
6263
/// </summary>
6364
[JsonPropertyName("web")]
64-
public WebElement Web { get; set; } = null!;
65+
public WebElement? Web { get; set; }
6566
}
6667

6768
/// <summary>
@@ -73,13 +74,13 @@ public sealed class WebElement
7374
/// URI of the web resource.
7475
/// </summary>
7576
[JsonPropertyName("uri")]
76-
public string Uri { get; set; } = null!;
77+
public Uri? Uri { get; set; }
7778

7879
/// <summary>
7980
/// Title of the web resource.
8081
/// </summary>
8182
[JsonPropertyName("title")]
82-
public string Title { get; set; } = null!;
83+
public string? Title { get; set; }
8384
}
8485

8586
/// <summary>
@@ -91,19 +92,19 @@ public sealed class GroundingSupportElement
9192
/// Segment information.
9293
/// </summary>
9394
[JsonPropertyName("segment")]
94-
public SegmentElement Segment { get; set; } = null!;
95+
public SegmentElement? Segment { get; set; }
9596

9697
/// <summary>
9798
/// Grounding chunk indices.
9899
/// </summary>
99100
[JsonPropertyName("groundingChunkIndices")]
100-
public IList<int> GroundingChunkIndices { get; set; } = null!;
101+
public IList<int>? GroundingChunkIndices { get; set; }
101102

102103
/// <summary>
103104
/// Confidence scores.
104105
/// </summary>
105106
[JsonPropertyName("confidenceScores")]
106-
public IList<double> ConfidenceScores { get; set; } = null!;
107+
public IList<double>? ConfidenceScores { get; set; }
107108
}
108109

109110
/// <summary>
@@ -127,6 +128,6 @@ public sealed class SegmentElement
127128
/// Text of the segment.
128129
/// </summary>
129130
[JsonPropertyName("text")]
130-
public string Text { get; set; } = null!;
131+
public string? Text { get; set; }
131132
}
132133
}

0 commit comments

Comments
 (0)