@@ -129,6 +129,10 @@ public sealed record BackendDto
129129
130130 public record BackendContract
131131 {
132+ [ JsonPropertyName ( "circuitBreaker" ) ]
133+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
134+ public BackendCircuitBreaker ? CircuitBreaker { get ; init ; }
135+
132136 [ JsonPropertyName ( "credentials" ) ]
133137 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
134138 public BackendCredentialsContract ? Credentials { get ; init ; }
@@ -137,6 +141,10 @@ public record BackendContract
137141 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
138142 public string ? Description { get ; init ; }
139143
144+ [ JsonPropertyName ( "pool" ) ]
145+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
146+ public Pool ? Pool { get ; init ; }
147+
140148 [ JsonPropertyName ( "properties" ) ]
141149 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
142150 public BackendProperties ? Properties { get ; init ; }
@@ -161,13 +169,77 @@ public record BackendContract
161169 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
162170 public BackendTlsProperties ? Tls { get ; init ; }
163171
172+ [ JsonPropertyName ( "type" ) ]
173+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
174+ public string ? Type { get ; init ; }
175+
164176 [ JsonPropertyName ( "url" ) ]
165177 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
166178#pragma warning disable CA1056 // URI-like properties should not be strings
167179 public string ? Url { get ; init ; }
168180#pragma warning restore CA1056 // URI-like properties should not be strings
169181 }
170182
183+ public record BackendCircuitBreaker
184+ {
185+ [ JsonPropertyName ( "rules" ) ]
186+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
187+ public ImmutableArray < CircuitBreakerRule > ? Rules { get ; init ; }
188+ }
189+
190+ public record CircuitBreakerRule
191+ {
192+ [ JsonPropertyName ( "acceptRetryAfter" ) ]
193+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
194+ public bool ? AcceptRetryAfter { get ; init ; }
195+
196+ [ JsonPropertyName ( "failureCondition" ) ]
197+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
198+ public CircuitBreakerFailureCondition ? FailureCondition { get ; init ; }
199+
200+ [ JsonPropertyName ( "name" ) ]
201+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
202+ public string ? Name { get ; init ; }
203+
204+ [ JsonPropertyName ( "tripDuration" ) ]
205+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
206+ public string ? TripDuration { get ; init ; }
207+ }
208+
209+ public record CircuitBreakerFailureCondition
210+ {
211+ [ JsonPropertyName ( "count" ) ]
212+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
213+ public int ? Count { get ; init ; }
214+
215+ [ JsonPropertyName ( "errorReasons" ) ]
216+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
217+ public ImmutableArray < string > ? ErrorReasons { get ; init ; }
218+
219+ [ JsonPropertyName ( "interval" ) ]
220+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
221+ public string ? Interval { get ; init ; }
222+
223+ [ JsonPropertyName ( "percentage" ) ]
224+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
225+ public int ? Percentage { get ; init ; }
226+
227+ [ JsonPropertyName ( "statusCodeRanges" ) ]
228+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
229+ public ImmutableArray < FailureStatusCodeRange > ? StatusCodeRanges { get ; init ; }
230+ }
231+
232+ public record FailureStatusCodeRange
233+ {
234+ [ JsonPropertyName ( "max" ) ]
235+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
236+ public int ? Max { get ; init ; }
237+
238+ [ JsonPropertyName ( "min" ) ]
239+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
240+ public int ? Min { get ; init ; }
241+ }
242+
171243 public record BackendCredentialsContract
172244 {
173245 [ JsonPropertyName ( "authorization" ) ]
@@ -176,11 +248,11 @@ public record BackendCredentialsContract
176248
177249 [ JsonPropertyName ( "certificate" ) ]
178250 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
179- public ImmutableList < string > ? Certificate { get ; init ; }
251+ public ImmutableArray < string > ? Certificate { get ; init ; }
180252
181253 [ JsonPropertyName ( "certificateIds" ) ]
182254 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
183- public ImmutableList < string > ? CertificateIds { get ; init ; }
255+ public ImmutableArray < string > ? CertificateIds { get ; init ; }
184256
185257 [ JsonPropertyName ( "header" ) ]
186258 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
@@ -238,19 +310,41 @@ public record BackendServiceFabricClusterProperties
238310
239311 [ JsonPropertyName ( "managementEndpoints" ) ]
240312 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
241- public ImmutableList < string > ? ManagementEndpoints { get ; init ; }
313+ public ImmutableArray < string > ? ManagementEndpoints { get ; init ; }
242314
243315 [ JsonPropertyName ( "maxPartitionResolutionRetries" ) ]
244316 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
245317 public int ? MaxPartitionResolutionRetries { get ; init ; }
246318
247319 [ JsonPropertyName ( "serverCertificateThumbprints" ) ]
248320 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
249- public ImmutableList < string > ? ServerCertificateThumbprints { get ; init ; }
321+ public ImmutableArray < string > ? ServerCertificateThumbprints { get ; init ; }
250322
251323 [ JsonPropertyName ( "serverX509Names" ) ]
252324 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
253- public ImmutableList < X509CertificateName > ? ServerX509Names { get ; init ; }
325+ public ImmutableArray < X509CertificateName > ? ServerX509Names { get ; init ; }
326+ }
327+
328+ public record Pool
329+ {
330+ [ JsonPropertyName ( "services" ) ]
331+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
332+ public ImmutableArray < BackendPoolItem > ? Services { get ; init ; }
333+ }
334+
335+ public record BackendPoolItem
336+ {
337+ [ JsonPropertyName ( "id" ) ]
338+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
339+ public string ? Id { get ; init ; }
340+
341+ [ JsonPropertyName ( "priority" ) ]
342+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
343+ public int ? Priority { get ; init ; }
344+
345+ [ JsonPropertyName ( "weight" ) ]
346+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingDefault ) ]
347+ public int ? Weight { get ; init ; }
254348 }
255349
256350 public record BackendTlsProperties
0 commit comments