@@ -190,6 +190,10 @@ public struct FindOneAndDeleteOptions: FindAndModifyOptionsConvertible, Decodabl
190190 /// A document or string that specifies the index to use to support the query. Only supported in server 4.4+.
191191 public var hint : IndexHint ?
192192
193+ /// Variables that can be accessed within the operation using the double
194+ /// dollar sign prefix in the form `$$<variable_name>`. This option is only available on MongoDB 5.0+.
195+ public var `let` : BSONDocument ?
196+
193197 /// The maximum amount of time to allow the query to run.
194198 public var maxTimeMS : Int ?
195199
@@ -206,6 +210,8 @@ public struct FindOneAndDeleteOptions: FindAndModifyOptionsConvertible, Decodabl
206210 try FindAndModifyOptions (
207211 collation: self . collation,
208212 hint: self . hint,
213+ // swiftlint:disable:next colon
214+ `let`: self . let,
209215 maxTimeMS: self . maxTimeMS,
210216 projection: self . projection,
211217 remove: true ,
@@ -218,13 +224,15 @@ public struct FindOneAndDeleteOptions: FindAndModifyOptionsConvertible, Decodabl
218224 public init (
219225 collation: BSONDocument ? = nil ,
220226 hint: IndexHint ? = nil ,
227+ `let`: BSONDocument ? = nil ,
221228 maxTimeMS: Int ? = nil ,
222229 projection: BSONDocument ? = nil ,
223230 sort: BSONDocument ? = nil ,
224231 writeConcern: WriteConcern ? = nil
225232 ) {
226233 self . collation = collation
227234 self . hint = hint
235+ self . let = `let`
228236 self . maxTimeMS = maxTimeMS
229237 self . projection = projection
230238 self . sort = sort
@@ -243,6 +251,10 @@ public struct FindOneAndReplaceOptions: FindAndModifyOptionsConvertible, Decodab
243251 /// A document or string that specifies the index to use to support the query. Only supported in server 4.4+.
244252 public var hint : IndexHint ?
245253
254+ /// Variables that can be accessed within the operation using the double
255+ /// dollar sign prefix in the form `$$<variable_name>`. This option is only available on MongoDB 5.0+.
256+ public var `let` : BSONDocument ?
257+
246258 /// The maximum amount of time to allow the query to run.
247259 public var maxTimeMS : Int ?
248260
@@ -266,6 +278,8 @@ public struct FindOneAndReplaceOptions: FindAndModifyOptionsConvertible, Decodab
266278 bypassDocumentValidation: self . bypassDocumentValidation,
267279 collation: self . collation,
268280 hint: self . hint,
281+ // swiftlint:disable:next colon
282+ `let`: self . let,
269283 maxTimeMS: self . maxTimeMS,
270284 projection: self . projection,
271285 returnDocument: self . returnDocument,
@@ -280,6 +294,7 @@ public struct FindOneAndReplaceOptions: FindAndModifyOptionsConvertible, Decodab
280294 bypassDocumentValidation: Bool ? = nil ,
281295 collation: BSONDocument ? = nil ,
282296 hint: IndexHint ? = nil ,
297+ `let`: BSONDocument ? = nil ,
283298 maxTimeMS: Int ? = nil ,
284299 projection: BSONDocument ? = nil ,
285300 returnDocument: ReturnDocument ? = nil ,
@@ -290,6 +305,7 @@ public struct FindOneAndReplaceOptions: FindAndModifyOptionsConvertible, Decodab
290305 self . bypassDocumentValidation = bypassDocumentValidation
291306 self . collation = collation
292307 self . hint = hint
308+ self . let = `let`
293309 self . maxTimeMS = maxTimeMS
294310 self . projection = projection
295311 self . returnDocument = returnDocument
@@ -313,6 +329,10 @@ public struct FindOneAndUpdateOptions: FindAndModifyOptionsConvertible, Decodabl
313329 /// A document or string that specifies the index to use to support the query. Only supported in server 4.4+.
314330 public var hint : IndexHint ?
315331
332+ /// Variables that can be accessed within the operation using the double
333+ /// dollar sign prefix in the form `$$<variable_name>`. This option is only available on MongoDB 5.0+.
334+ public var `let` : BSONDocument ?
335+
316336 /// The maximum amount of time to allow the query to run.
317337 public var maxTimeMS : Int ?
318338
@@ -337,6 +357,8 @@ public struct FindOneAndUpdateOptions: FindAndModifyOptionsConvertible, Decodabl
337357 bypassDocumentValidation: self . bypassDocumentValidation,
338358 collation: self . collation,
339359 hint: self . hint,
360+ // swiftlint:disable:next colon
361+ `let`: self . let,
340362 maxTimeMS: self . maxTimeMS,
341363 projection: self . projection,
342364 returnDocument: self . returnDocument,
@@ -352,6 +374,7 @@ public struct FindOneAndUpdateOptions: FindAndModifyOptionsConvertible, Decodabl
352374 bypassDocumentValidation: Bool ? = nil ,
353375 collation: BSONDocument ? = nil ,
354376 hint: IndexHint ? = nil ,
377+ `let`: BSONDocument ? = nil ,
355378 maxTimeMS: Int ? = nil ,
356379 projection: BSONDocument ? = nil ,
357380 returnDocument: ReturnDocument ? = nil ,
@@ -363,6 +386,7 @@ public struct FindOneAndUpdateOptions: FindAndModifyOptionsConvertible, Decodabl
363386 self . bypassDocumentValidation = bypassDocumentValidation
364387 self . collation = collation
365388 self . hint = hint
389+ self . let = `let`
366390 self . maxTimeMS = maxTimeMS
367391 self . projection = projection
368392 self . returnDocument = returnDocument
0 commit comments