/* Copyright 2010-present MongoDB Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using MongoDB.Bson;
namespace MongoDB.Driver
{
///
/// Options for a bulk write operation.
///
public sealed class ClientBulkWriteOptions
{
///
/// Initializes a new instance of the class.
///
public ClientBulkWriteOptions()
{
IsOrdered = true;
}
///
/// Initializes a new instance of the class.
///
///
///
///
///
///
///
public ClientBulkWriteOptions(
bool isOrdered,
bool? bypassDocumentValidation,
bool verboseResult,
WriteConcern writeConcern,
BsonDocument let,
BsonValue comment)
{
IsOrdered = isOrdered;
BypassDocumentValidation = bypassDocumentValidation;
VerboseResult = verboseResult;
WriteConcern = writeConcern;
Let = let;
Comment = comment;
}
///
/// Bypass document validation.
///
public bool? BypassDocumentValidation { get; set; }
///
/// Comment.
///
public BsonValue Comment { get; set; }
///
/// A value indicating is bulk requests are fulfilled in order.
///
public bool IsOrdered { get; set; }
///
/// Let document.
///
public BsonDocument Let { get; set; }
///
/// Whether detailed results for each successful operation should be included in the returned results.
///
public bool VerboseResult { get; set; }
///
/// The write concern to use for this bulk write.
///
public WriteConcern WriteConcern { get; set; }
}
}