From ebc75f5f38aea10ca77d2cbf9d463b40228af024 Mon Sep 17 00:00:00 2001 From: Rakesh Kumar Date: Tue, 7 Jul 2020 23:48:58 +0530 Subject: [PATCH] Adding TransactionalBatchRequestOption and test cases Signed-off-by: Rakesh Kumar --- Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs | 2 +- .../Batch/PartitionKeyRangeBatchResponse.cs | 2 +- .../src/Batch/TransactionalBatch.cs | 4 +- .../Batch/TransactionalBatchRequestOption.cs | 59 ++++++++ .../src/Batch/TransactionalBatchResponse.cs | 39 ++---- .../Batch/BatchSinglePartitionKeyTests.cs | 34 ++++- .../Batch/BatchTestBase.cs | 12 +- .../CosmosContentResponseTests.cs | 46 ++++++ .../CosmosDiagnosticsTests.cs | 4 +- .../Batch/BatchUnitTests.cs | 12 +- .../Contracts/DotNetSDKAPI.json | 131 ++++++++++++++++-- 11 files changed, 291 insertions(+), 54 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchRequestOption.cs diff --git a/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs b/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs index e99bf6a25d..f43f9e1c97 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs @@ -214,7 +214,7 @@ public override Task ExecuteAsync( /// (Optional) representing request cancellation. /// An awaitable which contains the completion status and results of each operation. public override Task ExecuteAsync( - ItemRequestOptions requestOptions, + TransactionalBatchRequestOption requestOptions, CancellationToken cancellationToken = default(CancellationToken)) { return this.container.ClientContext.OperationHelperAsync( diff --git a/Microsoft.Azure.Cosmos/src/Batch/PartitionKeyRangeBatchResponse.cs b/Microsoft.Azure.Cosmos/src/Batch/PartitionKeyRangeBatchResponse.cs index 94f4c8ea5e..352323685a 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/PartitionKeyRangeBatchResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/PartitionKeyRangeBatchResponse.cs @@ -50,7 +50,7 @@ internal PartitionKeyRangeBatchResponse( } itemBatchOperations.AddRange(serverResponse.Operations); - this.RequestCharge += serverResponse.RequestCharge; + this.Headers = serverResponse.Headers; if (!string.IsNullOrEmpty(serverResponse.ErrorMessage)) { diff --git a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs index 866e220b1e..2439b8cee8 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs @@ -227,7 +227,7 @@ public abstract Task ExecuteAsync( /// /// Executes the transactional batch at the Azure Cosmos service as an asynchronous operation. /// - /// Options that apply to the batch. + /// Options that apply specifically to batch request. /// (Optional) Cancellation token representing request cancellation. /// An awaitable response which contains details of execution of the transactional batch. /// @@ -253,7 +253,7 @@ public abstract Task ExecuteAsync( /// Use on the response returned to ensure that the transactional batch succeeded. /// public abstract Task ExecuteAsync( - ItemRequestOptions requestOptions, + TransactionalBatchRequestOption requestOptions, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchRequestOption.cs b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchRequestOption.cs new file mode 100644 index 0000000000..8abc706bd5 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchRequestOption.cs @@ -0,0 +1,59 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos +{ + using Microsoft.Azure.Documents; + + /// + /// Cosmos batch request options + /// + public class TransactionalBatchRequestOption : RequestOptions + { + /// + /// Gets or sets the consistency level required for the request in the Azure Cosmos DB service. + /// + /// + /// The consistency level required for the request. + /// + /// + /// Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency. + /// + /// While this is set at a database account level, Azure Cosmos DB allows a developer to override the default consistency level + /// for each individual request. + /// + /// + public ConsistencyLevel? ConsistencyLevel + { + get => this.BaseConsistencyLevel; + set => this.BaseConsistencyLevel = value; + } + + /// + /// Gets or sets the boolean to only return the headers and status code in + /// the Cosmos DB response for operations in the transactional batch request. + /// This removes the resource from the response. This reduces networking and CPU load by not sending + /// the resource back over the network and serializing it on the client. + /// + /// + /// This is optimal for workloads where the returned resource is not used. + /// + public bool? EnableContentResponseOnOperations { get; set; } + + /// + /// Fill the CosmosRequestMessage headers with the set properties + /// + /// The + internal override void PopulateRequestOptions(RequestMessage request) + { + if (this.EnableContentResponseOnOperations.HasValue && + !this.EnableContentResponseOnOperations.Value) + { + request.Headers.Add(HttpConstants.HttpHeaders.Prefer, HttpConstants.HttpHeaderValues.PreferReturnMinimal); + } + + base.PopulateRequestOptions(request); + } + } +} diff --git a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchResponse.cs b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchResponse.cs index 845d067419..398e6ef737 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatchResponse.cs @@ -44,9 +44,7 @@ internal TransactionalBatchResponse( : this(statusCode, subStatusCode, errorMessage, - requestCharge: 0, - retryAfter: null, - activityId: Guid.Empty.ToString(), + new Headers(), diagnosticsContext: diagnosticsContext, operations: operations, serializer: null) @@ -65,9 +63,7 @@ private TransactionalBatchResponse( HttpStatusCode statusCode, SubStatusCodes subStatusCode, string errorMessage, - double requestCharge, - TimeSpan? retryAfter, - string activityId, + Headers headers, CosmosDiagnosticsContext diagnosticsContext, IReadOnlyList operations, CosmosSerializerCore serializer) @@ -77,17 +73,20 @@ private TransactionalBatchResponse( this.ErrorMessage = errorMessage; this.Operations = operations; this.SerializerCore = serializer; - this.RequestCharge = requestCharge; - this.RetryAfter = retryAfter; - this.ActivityId = activityId; + this.Headers = headers; this.Diagnostics = diagnosticsContext.Diagnostics; this.DiagnosticsContext = diagnosticsContext ?? throw new ArgumentNullException(nameof(diagnosticsContext)); } + /// + /// Gets the current HTTP headers. + /// + public virtual Headers Headers { get; set; } + /// /// Gets the ActivityId that identifies the server request made to execute the batch. /// - public virtual string ActivityId { get; } + public virtual string ActivityId => this.Headers?.ActivityId; /// /// Gets the request charge for the batch request. @@ -95,12 +94,12 @@ private TransactionalBatchResponse( /// /// The request charge measured in request units. /// - public virtual double RequestCharge { get; internal set; } + public virtual double RequestCharge => this.Headers?.RequestCharge ?? 0; /// /// Gets the amount of time to wait before retrying this or any other request within Cosmos container or collection due to throttling. /// - public virtual TimeSpan? RetryAfter { get; } + public virtual TimeSpan? RetryAfter => this.Headers?.RetryAfter; /// /// Gets the completion status code of the batch request. @@ -252,9 +251,7 @@ internal static async Task FromResponseMessageAsync( HttpStatusCode.InternalServerError, SubStatusCodes.Unknown, ClientResources.ServerResponseDeserializationFailure, - responseMessage.Headers.RequestCharge, - responseMessage.Headers.RetryAfter, - responseMessage.Headers.ActivityId, + responseMessage.Headers, responseMessage.DiagnosticsContext, serverRequest.Operations, serializer); @@ -268,9 +265,7 @@ internal static async Task FromResponseMessageAsync( responseMessage.StatusCode, responseMessage.Headers.SubStatusCode, responseMessage.ErrorMessage, - responseMessage.Headers.RequestCharge, - responseMessage.Headers.RetryAfter, - responseMessage.Headers.ActivityId, + responseMessage.Headers, responseMessage.DiagnosticsContext, serverRequest.Operations, serializer); @@ -286,9 +281,7 @@ internal static async Task FromResponseMessageAsync( HttpStatusCode.InternalServerError, SubStatusCodes.Unknown, ClientResources.InvalidServerResponse, - responseMessage.Headers.RequestCharge, - responseMessage.Headers.RetryAfter, - responseMessage.Headers.ActivityId, + responseMessage.Headers, responseMessage.DiagnosticsContext, serverRequest.Operations, serializer); @@ -382,9 +375,7 @@ record => responseStatusCode, responseSubStatusCode, responseMessage.ErrorMessage, - responseMessage.Headers.RequestCharge, - responseMessage.Headers.RetryAfter, - responseMessage.Headers.ActivityId, + responseMessage.Headers, responseMessage.DiagnosticsContext, serverRequest.Operations, serializer); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs index 7d241a16bc..65812bc502 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs @@ -171,6 +171,38 @@ public async Task BatchItemETagAsync() } } + [TestMethod] + [Owner("rakkuma")] + [Description("Verify session token received from batch operations")] + public async Task BatchItemSessionTokenAsync() + { + Container container = BatchTestBase.JsonContainer; + await this.CreateJsonTestDocsAsync(container); + + TestDoc testDocToCreate = BatchTestBase.PopulateTestDoc(this.PartitionKey1); + + TestDoc testDocToReplace = this.GetTestDocCopy(this.TestDocPk1ExistingA); + testDocToReplace.Cost++; + + ItemResponse readResponse = await BatchTestBase.JsonContainer.ReadItemAsync( + this.TestDocPk1ExistingA.Id, + BatchTestBase.GetPartitionKey(this.PartitionKey1)); + + ISessionToken beforeRequestSessionToken = BatchTestBase.GetSessionToken(readResponse.Headers.Session); + + TransactionalBatchResponse batchResponse = await new BatchCore((ContainerInlineCore)container, BatchTestBase.GetPartitionKey(this.PartitionKey1)) + .CreateItem(testDocToCreate) + .ReplaceItem(testDocToReplace.Id, testDocToReplace) + .ExecuteAsync(); + + BatchSinglePartitionKeyTests.VerifyBatchProcessed(batchResponse, numberOfOperations: 2); + Assert.AreEqual(HttpStatusCode.Created, batchResponse[0].StatusCode); + Assert.AreEqual(HttpStatusCode.OK, batchResponse[1].StatusCode); + + ISessionToken afterRequestSessionToken = BatchTestBase.GetSessionToken(batchResponse.Headers.Session); + Assert.IsTrue(afterRequestSessionToken.LSN > beforeRequestSessionToken.LSN, "Response session token should be more than request session token"); + } + [TestMethod] [Owner("abpai")] [Description("Verify TTL passed to binary passthrough batch operations flow as expected")] @@ -320,7 +352,7 @@ public async Task BatchReadsOnlyAsync() private async Task RunCrudAsync(bool isStream, bool isSchematized, bool useEpk, Container container) { - ItemRequestOptions batchOptions = null; + TransactionalBatchRequestOption batchOptions = null; if (isSchematized) { await this.CreateSchematizedTestDocsAsync(container); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs index 165cf47841..2dee58b9d5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs @@ -292,8 +292,8 @@ protected static async Task VerifyNotFoundAsync(Container container, TestDoc doc Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode); } - protected static ItemRequestOptions GetUpdatedBatchRequestOptions( - ItemRequestOptions batchOptions = null, + protected static TransactionalBatchRequestOption GetUpdatedBatchRequestOptions( + TransactionalBatchRequestOption batchOptions = null, bool isSchematized = false, bool useEpk = false, object partitionKey = null) @@ -302,7 +302,7 @@ protected static ItemRequestOptions GetUpdatedBatchRequestOptions( { if (batchOptions == null) { - batchOptions = new ItemRequestOptions(); + batchOptions = new TransactionalBatchRequestOption(); } Dictionary properties = new Dictionary() @@ -412,6 +412,12 @@ protected static byte[] HexStringToBytes(string input) return bytes; } + internal static ISessionToken GetSessionToken(string sessionToken) + { + string[] tokenParts = sessionToken.Split(':'); + return SessionTokenHelper.Parse(tokenParts[1]); + } + private static bool PopulateRequestOptions(RequestOptions requestOptions, TestDoc doc, bool isSchematized, bool useEpk, int? ttlInSeconds) { Dictionary properties = new Dictionary(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs index 06bcebe0ed..a0f46d3c22 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs @@ -244,6 +244,52 @@ public async Task ItemBatchNoResponseTest() this.ValidateResponse(response, noResponseItemCount); } + [TestMethod] + public async Task TransactionalBatchNoResponseTest() + { + TransactionalBatchRequestOption requestOptions = new TransactionalBatchRequestOption() + { + EnableContentResponseOnOperations = false + }; + + string pkId = "TestTransactionalBatchId"; + TransactionalBatch batch = this.container.CreateTransactionalBatch(new PartitionKey(pkId)); + + int noResponseItemCount = 100; + for (int i = 0; i < noResponseItemCount; i++) + { + ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(pk: pkId); + batch.CreateItem(item); + } + + TransactionalBatchResponse response = await batch.ExecuteAsync(requestOptions); + Assert.AreEqual(100, response.Count); + this.ValidateResponse(response, noResponseItemCount); + + pkId = "TestTransactionalBatchId2"; + batch = this.container.CreateTransactionalBatch(new PartitionKey(pkId)); + + noResponseItemCount = 0; + for (int i = 0; i < 10; i++) + { + ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(pk: pkId); + batch.CreateItem(item); + noResponseItemCount++; + ToDoActivity item2 = ToDoActivity.CreateRandomToDoActivity(pk: pkId); + item2.id = item.id; + batch.ReplaceItem(item2.id, item2); + noResponseItemCount++; + + // Even Read won't return response + batch.ReadItem(item2.id); + noResponseItemCount++; + } + + response = await batch.ExecuteAsync(requestOptions); + Assert.AreEqual(noResponseItemCount, response.Count); + this.ValidateResponse(response, noResponseItemCount); + } + [TestMethod] public async Task ItemBulkNoResponseTest() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDiagnosticsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDiagnosticsTests.cs index 92b77a390d..33f3c826e8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDiagnosticsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDiagnosticsTests.cs @@ -27,7 +27,7 @@ public class CosmosDiagnosticsTests : BaseCosmosClientHelper private Container Container = null; private ContainerProperties containerSettings = null; - private static readonly ItemRequestOptions RequestOptionDisableDiagnostic = new ItemRequestOptions() + private static readonly TransactionalBatchRequestOption RequestOptionDisableDiagnostic = new TransactionalBatchRequestOption() { DiagnosticContextFactory = () => EmptyCosmosDiagnosticsContext.Singleton }; @@ -398,7 +398,7 @@ public async Task BatchOperationDiagnostic(bool disableDiagnostics) batch.ReadItem(createItems[i].id); } - ItemRequestOptions requestOptions = disableDiagnostics ? RequestOptionDisableDiagnostic : null; + TransactionalBatchRequestOption requestOptions = disableDiagnostics ? RequestOptionDisableDiagnostic : null; TransactionalBatchResponse response = await batch.ExecuteAsync(requestOptions); Assert.IsNotNull(response); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchUnitTests.cs index f29138dec0..ff66b7e59c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchUnitTests.cs @@ -31,19 +31,19 @@ public class BatchUnitTests public async Task BatchInvalidOptionsAsync() { Container container = BatchUnitTests.GetContainer(); - List badBatchOptionsList = new List() + List badBatchOptionsList = new List() { - new ItemRequestOptions() + new TransactionalBatchRequestOption() { IfMatchEtag = "cond", }, - new ItemRequestOptions() + new TransactionalBatchRequestOption() { IfNoneMatchEtag = "cond2", } }; - foreach (ItemRequestOptions batchOptions in badBatchOptionsList) + foreach (TransactionalBatchRequestOption batchOptions in badBatchOptionsList) { BatchCore batch = (BatchCore) new BatchCore((ContainerInternal)container, new Cosmos.PartitionKey(BatchUnitTests.PartitionKey1)) @@ -476,8 +476,8 @@ private static void VerifyBatchItemRequestOptionsAreEqual(TransactionalBatchItem private static async Task VerifyExceptionThrownOnExecuteAsync( TransactionalBatch batch, Type expectedTypeOfException, - string expectedExceptionMessage = null, - ItemRequestOptions requestOptions = null) + string expectedExceptionMessage = null, + TransactionalBatchRequestOption requestOptions = null) { bool wasExceptionThrown = false; try diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 85fcc5e8c6..5d01db2bc9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -5371,6 +5371,51 @@ } }, "NestedTypes": {} + }, + "TransactionalBatchRequestOption": { + "Subclasses": {}, + "Members": { + "System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] ConsistencyLevel": { + "Type": "Property", + "Attributes": [], + "MethodInfo": null + }, + "System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] get_ConsistencyLevel()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] get_ConsistencyLevel()" + }, + "System.Nullable`1[System.Boolean] EnableContentResponseOnOperations": { + "Type": "Property", + "Attributes": [], + "MethodInfo": null + }, + "System.Nullable`1[System.Boolean] get_EnableContentResponseOnOperations()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.Nullable`1[System.Boolean] get_EnableContentResponseOnOperations()" + }, + "Void .ctor()": { + "Type": "Constructor", + "Attributes": [], + "MethodInfo": "Void .ctor()" + }, + "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel])": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel])" + }, + "Void set_EnableContentResponseOnOperations(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableContentResponseOnOperations(System.Nullable`1[System.Boolean])" + } + }, + "NestedTypes": {} } }, "Members": { @@ -8048,10 +8093,10 @@ "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.TransactionalBatch UpsertItemStream(System.IO.Stream, Microsoft.Azure.Cosmos.TransactionalBatchItemRequestOptions)" }, - "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.TransactionalBatchResponse] ExecuteAsync(Microsoft.Azure.Cosmos.ItemRequestOptions, System.Threading.CancellationToken)": { + "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.TransactionalBatchResponse] ExecuteAsync(Microsoft.Azure.Cosmos.TransactionalBatchRequestOption, System.Threading.CancellationToken)": { "Type": "Method", "Attributes": [], - "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.TransactionalBatchResponse] ExecuteAsync(Microsoft.Azure.Cosmos.ItemRequestOptions, System.Threading.CancellationToken)" + "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.TransactionalBatchResponse] ExecuteAsync(Microsoft.Azure.Cosmos.TransactionalBatchRequestOption, System.Threading.CancellationToken)" }, "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.TransactionalBatchResponse] ExecuteAsync(System.Threading.CancellationToken)": { "Type": "Method", @@ -8225,6 +8270,51 @@ }, "NestedTypes": {} }, + "TransactionalBatchRequestOption": { + "Subclasses": {}, + "Members": { + "System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] ConsistencyLevel": { + "Type": "Property", + "Attributes": [], + "MethodInfo": null + }, + "System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] get_ConsistencyLevel()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel] get_ConsistencyLevel()" + }, + "System.Nullable`1[System.Boolean] EnableContentResponseOnOperations": { + "Type": "Property", + "Attributes": [], + "MethodInfo": null + }, + "System.Nullable`1[System.Boolean] get_EnableContentResponseOnOperations()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.Nullable`1[System.Boolean] get_EnableContentResponseOnOperations()" + }, + "Void .ctor()": { + "Type": "Constructor", + "Attributes": [], + "MethodInfo": "Void .ctor()" + }, + "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel])": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Void set_ConsistencyLevel(System.Nullable`1[Microsoft.Azure.Cosmos.ConsistencyLevel])" + }, + "Void set_EnableContentResponseOnOperations(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableContentResponseOnOperations(System.Nullable`1[System.Boolean])" + } + }, + "NestedTypes": {} + }, "TransactionalBatchResponse": { "Subclasses": {}, "Members": { @@ -8238,11 +8328,9 @@ "Attributes": [], "MethodInfo": null }, - "Double get_RequestCharge()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Double get_RequestCharge()": { "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], + "Attributes": [], "MethodInfo": "Double get_RequestCharge()" }, "Double RequestCharge": { @@ -8272,6 +8360,18 @@ ], "MethodInfo": "Microsoft.Azure.Cosmos.CosmosDiagnostics get_Diagnostics()" }, + "Microsoft.Azure.Cosmos.Headers get_Headers()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Microsoft.Azure.Cosmos.Headers get_Headers()" + }, + "Microsoft.Azure.Cosmos.Headers Headers": { + "Type": "Property", + "Attributes": [], + "MethodInfo": null + }, "Microsoft.Azure.Cosmos.TransactionalBatchOperationResult get_Item(Int32)": { "Type": "Method", "Attributes": [], @@ -8304,11 +8404,9 @@ "Attributes": [], "MethodInfo": null }, - "System.Nullable`1[System.TimeSpan] get_RetryAfter()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "System.Nullable`1[System.TimeSpan] get_RetryAfter()": { "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], + "Attributes": [], "MethodInfo": "System.Nullable`1[System.TimeSpan] get_RetryAfter()" }, "System.Nullable`1[System.TimeSpan] RetryAfter": { @@ -8326,11 +8424,9 @@ "Attributes": [], "MethodInfo": null }, - "System.String get_ActivityId()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "System.String get_ActivityId()": { "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], + "Attributes": [], "MethodInfo": "System.String get_ActivityId()" }, "System.String get_ErrorMessage()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { @@ -8344,6 +8440,13 @@ "Type": "Method", "Attributes": [], "MethodInfo": "Void Dispose()" + }, + "Void set_Headers(Microsoft.Azure.Cosmos.Headers)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_Headers(Microsoft.Azure.Cosmos.Headers)" } }, "NestedTypes": {}