diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index d6fd28f6c12f..d43563877831 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -173,7 +173,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package.json b/eng/emitter-package.json index f0a7f70edd85..ee1acec53172 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,6 +1,6 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20230719.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20230719.3" } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs index 45fefd49b5e1..dea466eb51bf 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs @@ -167,13 +167,8 @@ public virtual async Task> AnswerCallAsync(AnswerCall if (options == null) throw new ArgumentNullException(nameof(options)); AnswerCallRequestInternal request = CreateAnswerCallRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var answerResponse = await AzureCommunicationServicesRestClient.AnswerCallAsync(request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken) - .ConfigureAwait(false); + var answerResponse = await AzureCommunicationServicesRestClient.AnswerCallAsync(request, cancellationToken).ConfigureAwait(false); var result = new AnswerCallResult(GetCallConnection(answerResponse.Value.CallConnectionId), new CallConnectionProperties(answerResponse.Value)); result.SetEventProcessor(EventProcessor, answerResponse.Value.CallConnectionId, null); @@ -220,12 +215,8 @@ public virtual Response AnswerCall(AnswerCallOptions options, if (options == null) throw new ArgumentNullException(nameof(options)); AnswerCallRequestInternal request = CreateAnswerCallRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var answerResponse = AzureCommunicationServicesRestClient.AnswerCall(request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken); + var answerResponse = AzureCommunicationServicesRestClient.AnswerCall(request, cancellationToken); var result = new AnswerCallResult(GetCallConnection(answerResponse.Value.CallConnectionId), new CallConnectionProperties(answerResponse.Value)); result.SetEventProcessor(EventProcessor, answerResponse.Value.CallConnectionId, null); @@ -294,18 +285,12 @@ public virtual async Task RedirectCallAsync(RedirectCallOptions option throw new ArgumentNullException(nameof(options)); RedirectCallRequestInternal request = new RedirectCallRequestInternal(options.IncomingCallContext, CommunicationIdentifierSerializer.Serialize(options.CallInvite.Target)); - var repeatabilityHeaders = new RepeatabilityHeaders(); request.CustomContext = new CustomContextInternal( options.CallInvite.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.SipHeaders, options.CallInvite.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.VoipHeaders); - return await AzureCommunicationServicesRestClient.RedirectCallAsync( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ).ConfigureAwait(false); + return await AzureCommunicationServicesRestClient.RedirectCallAsync(request, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { @@ -343,17 +328,12 @@ public virtual Response RedirectCall(RedirectCallOptions options, CancellationTo throw new ArgumentNullException(nameof(options)); RedirectCallRequestInternal request = new RedirectCallRequestInternal(options.IncomingCallContext, CommunicationIdentifierSerializer.Serialize(options.CallInvite.Target)); - var repeatabilityHeaders = new RepeatabilityHeaders(); request.CustomContext = new CustomContextInternal( options.CallInvite.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.SipHeaders, options.CallInvite.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.VoipHeaders); - return AzureCommunicationServicesRestClient.RedirectCall( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken); + return AzureCommunicationServicesRestClient.RedirectCall(request, cancellationToken); } catch (Exception ex) { @@ -390,14 +370,8 @@ public virtual async Task RejectCallAsync(RejectCallOptions options, C RejectCallRequestInternal request = new RejectCallRequestInternal(options.IncomingCallContext); request.CallRejectReason = options.CallRejectReason.ToString(); - var repeatabilityHeaders = new RepeatabilityHeaders(); - return await AzureCommunicationServicesRestClient.RejectCallAsync( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ).ConfigureAwait(false); + return await AzureCommunicationServicesRestClient.RejectCallAsync(request, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { @@ -434,14 +408,8 @@ public virtual Response RejectCall(RejectCallOptions options, CancellationToken RejectCallRequestInternal request = new RejectCallRequestInternal(options.IncomingCallContext); request.CallRejectReason = options.CallRejectReason.ToString(); - var repeatabilityHeaders = new RepeatabilityHeaders(); - return AzureCommunicationServicesRestClient.RejectCall( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ); + return AzureCommunicationServicesRestClient.RejectCall(request, cancellationToken); } catch (Exception ex) { @@ -486,14 +454,8 @@ public virtual async Task> CreateCallAsync(CreateCall throw new ArgumentNullException(nameof(options)); CreateCallRequestInternal request = CreateCallRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var createCallResponse = await AzureCommunicationServicesRestClient.CreateCallAsync( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ).ConfigureAwait(false); + var createCallResponse = await AzureCommunicationServicesRestClient.CreateCallAsync(request, cancellationToken).ConfigureAwait(false); var result = new CreateCallResult( GetCallConnection(createCallResponse.Value.CallConnectionId), @@ -546,14 +508,8 @@ public virtual Response CreateCall(CreateCallOptions options, if (options == null) throw new ArgumentNullException(nameof(options)); CreateCallRequestInternal request = CreateCallRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var createCallResponse = AzureCommunicationServicesRestClient.CreateCall( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ); + var createCallResponse = AzureCommunicationServicesRestClient.CreateCall(request, cancellationToken); var result = new CreateCallResult( GetCallConnection(createCallResponse.Value.CallConnectionId), @@ -591,14 +547,8 @@ public virtual async Task> CreateGroupCallAsync(Creat } CreateCallRequestInternal request = CreateCallRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var createCallResponse = await AzureCommunicationServicesRestClient.CreateCallAsync( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ).ConfigureAwait(false); + var createCallResponse = await AzureCommunicationServicesRestClient.CreateCallAsync(request, cancellationToken).ConfigureAwait(false); var result = new CreateCallResult( GetCallConnection(createCallResponse.Value.CallConnectionId), @@ -636,14 +586,8 @@ public virtual Response CreateGroupCall(CreateGroupCallOptions } CreateCallRequestInternal request = CreateCallRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - - var createCallResponse = AzureCommunicationServicesRestClient.CreateCall( - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ); + + var createCallResponse = AzureCommunicationServicesRestClient.CreateCall(request, cancellationToken); var result = new CreateCallResult( GetCallConnection(createCallResponse.Value.CallConnectionId), diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs index dcb7aa1da598..a3434b7d3c23 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs @@ -102,13 +102,7 @@ public virtual async Task HangUpAsync(bool forEveryone, CancellationTo { if (forEveryone) { - var repeatabilityHeaders = new RepeatabilityHeaders(); - return await RestClient.TerminateCallAsync( - CallConnectionId, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ).ConfigureAwait(false); + return await RestClient.TerminateCallAsync(CallConnectionId, cancellationToken).ConfigureAwait(false); } else { @@ -137,13 +131,7 @@ public virtual Response HangUp(bool forEveryone, CancellationToken cancellationT { if (forEveryone) { - var repeatabilityHeaders = new RepeatabilityHeaders(); - return RestClient.TerminateCall( - CallConnectionId, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ); + return RestClient.TerminateCall(CallConnectionId, cancellationToken); } else { @@ -208,15 +196,8 @@ public virtual async Task> TransferCal throw new ArgumentNullException(nameof(options)); TransferToParticipantRequestInternal request = CreateTransferToParticipantRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - - var response = await RestClient.TransferToParticipantAsync( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ).ConfigureAwait(false); + + var response = await RestClient.TransferToParticipantAsync(CallConnectionId, request, cancellationToken).ConfigureAwait(false); var result = response.Value; result.SetEventProcessor(EventProcessor, CallConnectionId, result.OperationContext); @@ -278,15 +259,8 @@ public virtual Response TransferCallToParticipa throw new ArgumentNullException(nameof(options)); TransferToParticipantRequestInternal request = CreateTransferToParticipantRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - - var response = RestClient.TransferToParticipant( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken - ); + + var response = RestClient.TransferToParticipant(CallConnectionId, request, cancellationToken); var result = response.Value; result.SetEventProcessor(EventProcessor, CallConnectionId, result.OperationContext); @@ -348,15 +322,8 @@ public virtual async Task> AddParticipantAsync(Ad throw new ArgumentNullException(nameof(options)); AddParticipantRequestInternal request = CreateAddParticipantRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var response = await RestClient.AddParticipantAsync( - callConnectionId: CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken: cancellationToken - ).ConfigureAwait(false); + var response = await RestClient.AddParticipantAsync(callConnectionId: CallConnectionId, request, cancellationToken: cancellationToken).ConfigureAwait(false); var result = new AddParticipantResult(response); result.SetEventProcessor(EventProcessor, CallConnectionId, result.OperationContext); @@ -396,15 +363,8 @@ public virtual Response AddParticipant(AddParticipantOptio throw new ArgumentNullException(nameof(options)); AddParticipantRequestInternal request = CreateAddParticipantRequest(options); - var repeatabilityHeaders = new RepeatabilityHeaders(); - var response = RestClient.AddParticipant( - callConnectionId: CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken: cancellationToken - ); + var response = RestClient.AddParticipant(callConnectionId: CallConnectionId, request, cancellationToken: cancellationToken); var result = new AddParticipantResult(response); result.SetEventProcessor(EventProcessor, CallConnectionId, result.OperationContext); @@ -590,7 +550,6 @@ public virtual async Task> RemoveParticipantAs Argument.AssertNotNull(options.ParticipantToRemove, nameof(options.ParticipantToRemove)); RemoveParticipantRequestInternal request = new(CommunicationIdentifierSerializer.Serialize(options.ParticipantToRemove)); - var repeatabilityHeaders = new RepeatabilityHeaders(); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { throw new ArgumentException(CallAutomationErrorMessages.OperationContextExceedsMaxLength); @@ -600,12 +559,7 @@ public virtual async Task> RemoveParticipantAs request.OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext; } request.CallbackUriOverride = options.CallbackUriOverride; - var response = await RestClient.RemoveParticipantAsync( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken).ConfigureAwait(false); + var response = await RestClient.RemoveParticipantAsync(CallConnectionId, request, cancellationToken).ConfigureAwait(false); var result = new RemoveParticipantResult(response); result.SetEventProcessor(EventProcessor, CallConnectionId, result.OperationContext); @@ -650,7 +604,6 @@ public virtual Response RemoveParticipant(RemovePartici throw new ArgumentNullException(nameof(options)); RemoveParticipantRequestInternal request = new(CommunicationIdentifierSerializer.Serialize(options.ParticipantToRemove)); - var repeatabilityHeaders = new RepeatabilityHeaders(); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { @@ -661,12 +614,7 @@ public virtual Response RemoveParticipant(RemovePartici options.OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext; } request.CallbackUriOverride = options.CallbackUriOverride; - var response = RestClient.RemoveParticipant( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken); + var response = RestClient.RemoveParticipant(CallConnectionId, request, cancellationToken); var result = new RemoveParticipantResult(response); result.SetEventProcessor(EventProcessor, CallConnectionId, result.OperationContext); @@ -752,7 +700,6 @@ public virtual Response MuteParticipants(MuteParticipa MuteParticipantsRequestInternal request = new MuteParticipantsRequestInternal( options.TargetParticipants.Select(participant => CommunicationIdentifierSerializer.Serialize(participant))); - var repeatabilityHeaders = new RepeatabilityHeaders(); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { @@ -763,12 +710,7 @@ public virtual Response MuteParticipants(MuteParticipa request.OperationContext = options.OperationContext; } - return RestClient.Mute( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken); + return RestClient.Mute(CallConnectionId, request, cancellationToken); } catch (Exception ex) { @@ -814,7 +756,6 @@ public virtual Response UnmuteParticipants(UnmutePar { UnmuteParticipantsRequestInternal request = new UnmuteParticipantsRequestInternal( options.TargetParticipants.Select(participant => CommunicationIdentifierSerializer.Serialize(participant)).ToList()); - var repeatabilityHeaders = new RepeatabilityHeaders(); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { throw new ArgumentException(CallAutomationErrorMessages.OperationContextExceedsMaxLength); @@ -824,12 +765,7 @@ public virtual Response UnmuteParticipants(UnmutePar request.OperationContext = options.OperationContext; } - return RestClient.Unmute( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken); + return RestClient.Unmute(CallConnectionId, request, cancellationToken); } catch (Exception ex) { @@ -877,7 +813,6 @@ public async virtual Task> MuteParticipantsAs MuteParticipantsRequestInternal request = new MuteParticipantsRequestInternal( options.TargetParticipants.Select(participant => CommunicationIdentifierSerializer.Serialize(participant))); - var repeatabilityHeaders = new RepeatabilityHeaders(); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { @@ -888,12 +823,7 @@ public async virtual Task> MuteParticipantsAs request.OperationContext = options.OperationContext; } - return await RestClient.MuteAsync( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken).ConfigureAwait(false); + return await RestClient.MuteAsync(CallConnectionId, request, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { @@ -939,7 +869,6 @@ public async virtual Task> UnmuteParticipan { UnmuteParticipantsRequestInternal request = new UnmuteParticipantsRequestInternal( options.TargetParticipants.Select(participant => CommunicationIdentifierSerializer.Serialize(participant)).ToList()); - var repeatabilityHeaders = new RepeatabilityHeaders(); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { throw new ArgumentException(CallAutomationErrorMessages.OperationContextExceedsMaxLength); @@ -949,12 +878,7 @@ public async virtual Task> UnmuteParticipan request.OperationContext = options.OperationContext; } - return await RestClient.UnmuteAsync( - CallConnectionId, - request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken).ConfigureAwait(false); + return await RestClient.UnmuteAsync(CallConnectionId, request, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs index 83f6d4e62991..b75ace67fe1a 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs @@ -90,11 +90,7 @@ public virtual Response Start(StartRecordingOptions option request.ExternalStorage = TranslateExternalStorageToInternal(options.ExternalStorage); } - var repeatabilityHeaders = new RepeatabilityHeaders(); - return _callRecordingRestClient.StartRecording(request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken: cancellationToken); + return _callRecordingRestClient.StartRecording(request, cancellationToken: cancellationToken); } catch (Exception ex) { @@ -151,11 +147,7 @@ public virtual async Task> StartAsync(StartRecord request.ExternalStorage = TranslateExternalStorageToInternal(options.ExternalStorage); } - var repeatabilityHeaders = new RepeatabilityHeaders(); - return await _callRecordingRestClient.StartRecordingAsync(request, - repeatabilityHeaders.RepeatabilityRequestId, - repeatabilityHeaders.RepeatabilityFirstSent, - cancellationToken: cancellationToken).ConfigureAwait(false); + return await _callRecordingRestClient.StartRecordingAsync(request, cancellationToken: cancellationToken).ConfigureAwait(false); } catch (Exception ex) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs index 0d261bbaf2ea..838300cdcc4f 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs @@ -38,7 +38,7 @@ public AzureCommunicationServicesRestClient(ClientDiagnostics clientDiagnostics, _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -48,14 +48,8 @@ internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCal uri.AppendPath("/calling/callConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -66,18 +60,16 @@ internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCal /// Create an outbound call. /// The create call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) { if (createCallRequest == null) { throw new ArgumentNullException(nameof(createCallRequest)); } - using var message = CreateCreateCallRequest(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateCreateCallRequest(createCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,18 +87,16 @@ public async Task> CreateCallAsync(Cr /// Create an outbound call. /// The create call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response CreateCall(CreateCallRequestInternal createCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response CreateCall(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) { if (createCallRequest == null) { throw new ArgumentNullException(nameof(createCallRequest)); } - using var message = CreateCreateCallRequest(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateCreateCallRequest(createCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -122,7 +112,7 @@ public Response CreateCall(CreateCallRequestIn } } - internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -132,14 +122,8 @@ internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCal uri.AppendPath("/calling/callConnections:answer", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -150,19 +134,17 @@ internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCal /// Answer a Call. /// The answer call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) { if (answerCallRequest == null) { throw new ArgumentNullException(nameof(answerCallRequest)); } - using var message = CreateAnswerCallRequest(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAnswerCallRequest(answerCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -180,19 +162,17 @@ public async Task> AnswerCallAsync(An /// Answer a Call. /// The answer call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public Response AnswerCall(AnswerCallRequestInternal answerCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response AnswerCall(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) { if (answerCallRequest == null) { throw new ArgumentNullException(nameof(answerCallRequest)); } - using var message = CreateAnswerCallRequest(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAnswerCallRequest(answerCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -208,7 +188,7 @@ public Response AnswerCall(AnswerCallRequestIn } } - internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -218,14 +198,8 @@ internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redir uri.AppendPath("/calling/callConnections:redirect", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -236,18 +210,16 @@ internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redir /// Redirect a call. /// The redirect call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) { if (redirectCallRequest == null) { throw new ArgumentNullException(nameof(redirectCallRequest)); } - using var message = CreateRedirectCallRequest(redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRedirectCallRequest(redirectCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -260,18 +232,16 @@ public async Task RedirectCallAsync(RedirectCallRequestInternal redire /// Redirect a call. /// The redirect call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) { if (redirectCallRequest == null) { throw new ArgumentNullException(nameof(redirectCallRequest)); } - using var message = CreateRedirectCallRequest(redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRedirectCallRequest(redirectCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -282,7 +252,7 @@ public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, Gu } } - internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -292,14 +262,8 @@ internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCal uri.AppendPath("/calling/callConnections:reject", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -310,18 +274,16 @@ internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCal /// Reject the call. /// The reject call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) { if (rejectCallRequest == null) { throw new ArgumentNullException(nameof(rejectCallRequest)); } - using var message = CreateRejectCallRequest(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRejectCallRequest(rejectCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -334,18 +296,16 @@ public async Task RejectCallAsync(RejectCallRequestInternal rejectCall /// Reject the call. /// The reject call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response RejectCall(RejectCallRequestInternal rejectCallRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response RejectCall(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) { if (rejectCallRequest == null) { throw new ArgumentNullException(nameof(rejectCallRequest)); } - using var message = CreateRejectCallRequest(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRejectCallRequest(rejectCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs index ea2dbc7df8c6..d6ada15ed0c3 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs @@ -166,7 +166,7 @@ public Response HangupCall(string callConnectionId, CancellationToken cancellati } } - internal HttpMessage CreateTerminateCallRequest(string callConnectionId, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateTerminateCallRequest(string callConnectionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -178,32 +178,24 @@ internal HttpMessage CreateTerminateCallRequest(string callConnectionId, Guid? r uri.AppendPath(":terminate", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); return message; } /// Terminate a call using CallConnectionId. /// The terminate call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task TerminateCallAsync(string callConnectionId, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task TerminateCallAsync(string callConnectionId, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - using var message = CreateTerminateCallRequest(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTerminateCallRequest(callConnectionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -216,18 +208,16 @@ public async Task TerminateCallAsync(string callConnectionId, Guid? re /// Terminate a call using CallConnectionId. /// The terminate call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response TerminateCall(string callConnectionId, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response TerminateCall(string callConnectionId, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - using var message = CreateTerminateCallRequest(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTerminateCallRequest(callConnectionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -238,7 +228,7 @@ public Response TerminateCall(string callConnectionId, Guid? repeatabilityReques } } - internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -250,14 +240,8 @@ internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, uri.AppendPath(":transferToParticipant", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -269,11 +253,9 @@ internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, /// Transfer the call to a participant. /// The call connection id. /// The transfer to participant request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -284,7 +266,7 @@ public async Task> TransferToParticipa throw new ArgumentNullException(nameof(transferToParticipantRequest)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -303,11 +285,9 @@ public async Task> TransferToParticipa /// Transfer the call to a participant. /// The call connection id. /// The transfer to participant request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -318,7 +298,7 @@ public Response TransferToParticipant(string ca throw new ArgumentNullException(nameof(transferToParticipantRequest)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -404,7 +384,7 @@ public Response GetParticipants(string callConn } } - internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantRequestInternal addParticipantRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -416,14 +396,8 @@ internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddPar uri.AppendPath("/participants:add", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -435,11 +409,9 @@ internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddPar /// Add participants to the call. /// The call connection Id. /// The AddParticipantRequest to use. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> AddParticipantAsync(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> AddParticipantAsync(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -450,7 +422,7 @@ public async Task> AddParticipantAsync( throw new ArgumentNullException(nameof(addParticipantRequest)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -469,11 +441,9 @@ public async Task> AddParticipantAsync( /// Add participants to the call. /// The call connection Id. /// The AddParticipantRequest to use. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response AddParticipant(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response AddParticipant(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -484,7 +454,7 @@ public Response AddParticipant(string callConnec throw new ArgumentNullException(nameof(addParticipantRequest)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -500,7 +470,7 @@ public Response AddParticipant(string callConnec } } - internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -512,14 +482,8 @@ internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, Rem uri.AppendPath("/participants:remove", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -531,11 +495,9 @@ internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, Rem /// Remove participant from the call using identifier. /// The call connection id. /// The participant to be removed from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> RemoveParticipantAsync(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> RemoveParticipantAsync(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -546,7 +508,7 @@ public async Task> RemoveParticipant throw new ArgumentNullException(nameof(removeParticipantRequest)); } - using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -565,11 +527,9 @@ public async Task> RemoveParticipant /// Remove participant from the call using identifier. /// The call connection id. /// The participant to be removed from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response RemoveParticipant(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response RemoveParticipant(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -580,7 +540,7 @@ public Response RemoveParticipant(string call throw new ArgumentNullException(nameof(removeParticipantRequest)); } - using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -596,7 +556,7 @@ public Response RemoveParticipant(string call } } - internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -608,14 +568,8 @@ internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipants uri.AppendPath("/participants:mute", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -627,11 +581,9 @@ internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipants /// Mute participants from the call using identifier. /// The call connection id. /// The participants to be muted from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> MuteAsync(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> MuteAsync(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -642,7 +594,7 @@ public async Task> MuteAsync(string callConne throw new ArgumentNullException(nameof(muteParticipantsRequest)); } - using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -661,11 +613,9 @@ public async Task> MuteAsync(string callConne /// Mute participants from the call using identifier. /// The call connection id. /// The participants to be muted from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response Mute(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response Mute(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -676,7 +626,7 @@ public Response Mute(string callConnectionId, MutePart throw new ArgumentNullException(nameof(muteParticipantsRequest)); } - using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -692,7 +642,7 @@ public Response Mute(string callConnectionId, MutePart } } - internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -704,14 +654,8 @@ internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticip uri.AppendPath("/participants:unmute", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -723,11 +667,9 @@ internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticip /// Unmute participants from the call using identifier. /// The call connection id. /// The participants to be unmuted from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> UnmuteAsync(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> UnmuteAsync(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -738,7 +680,7 @@ public async Task> UnmuteAsync(string callC throw new ArgumentNullException(nameof(unmuteParticipantsRequest)); } - using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -757,11 +699,9 @@ public async Task> UnmuteAsync(string callC /// Unmute participants from the call using identifier. /// The call connection id. /// The participants to be unmuted from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response Unmute(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response Unmute(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -772,7 +712,7 @@ public Response Unmute(string callConnectionId, Unmu throw new ArgumentNullException(nameof(unmuteParticipantsRequest)); } - using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallRecordingRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallRecordingRestClient.cs index 4f9e4f9a9de8..90fcfad75f0f 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallRecordingRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallRecordingRestClient.cs @@ -38,7 +38,7 @@ public CallRecordingRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateStartRecordingRequest(StartCallRecordingRequestInternal startCallRecording, Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent) + internal HttpMessage CreateStartRecordingRequest(StartCallRecordingRequestInternal startCallRecording) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -48,14 +48,8 @@ internal HttpMessage CreateStartRecordingRequest(StartCallRecordingRequestIntern uri.AppendPath("/calling/recordings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -66,18 +60,16 @@ internal HttpMessage CreateStartRecordingRequest(StartCallRecordingRequestIntern /// Start recording the call. /// The request body of start call recording request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task> StartRecordingAsync(StartCallRecordingRequestInternal startCallRecording, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> StartRecordingAsync(StartCallRecordingRequestInternal startCallRecording, CancellationToken cancellationToken = default) { if (startCallRecording == null) { throw new ArgumentNullException(nameof(startCallRecording)); } - using var message = CreateStartRecordingRequest(startCallRecording, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateStartRecordingRequest(startCallRecording); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,18 +87,16 @@ public async Task> StartRecordingAsync(StartCallR /// Start recording the call. /// The request body of start call recording request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response StartRecording(StartCallRecordingRequestInternal startCallRecording, Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response StartRecording(StartCallRecordingRequestInternal startCallRecording, CancellationToken cancellationToken = default) { if (startCallRecording == null) { throw new ArgumentNullException(nameof(startCallRecording)); } - using var message = CreateStartRecordingRequest(startCallRecording, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateStartRecordingRequest(startCallRecording); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/RepeatabilityHeaders.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/RepeatabilityHeaders.cs deleted file mode 100644 index 8e8da7d23519..000000000000 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/RepeatabilityHeaders.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; - -namespace Azure.Communication.CallAutomation -{ - /// - /// The Repeatability Headers. - /// - internal class RepeatabilityHeaders - { - /// - /// The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// - public Guid RepeatabilityRequestId { get; } - - /// - /// The value is the date and time at which the request was first created. - /// - public DateTimeOffset RepeatabilityFirstSent { get; } - - /// - /// Function that returns RepeatabilityFirstSent in string format using the IMF-fixdate form of HTTP-date. - /// - /// - internal string GetRepeatabilityFirstSentString() - { - return RepeatabilityFirstSent.ToString("R"); - } - - public RepeatabilityHeaders() - { - RepeatabilityRequestId = Guid.NewGuid(); - RepeatabilityFirstSent = DateTimeOffset.Now; - } - } -} diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/Misc/RepeatabilityHeadersTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/Misc/RepeatabilityHeadersTests.cs deleted file mode 100644 index 6430f0da361e..000000000000 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/Misc/RepeatabilityHeadersTests.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using NUnit.Framework; - -namespace Azure.Communication.CallAutomation.Tests.Misc -{ - public class RepeatabilityHeadersTests - { - [Test] - public void RepeatablityHeaders_IsSetInConstructor() - { - // arrange & act - var repeatabilityHeaders = new RepeatabilityHeaders(); - - // assert - Assert.IsNotNull(repeatabilityHeaders.RepeatabilityFirstSent); - Assert.IsNotNull(repeatabilityHeaders.RepeatabilityRequestId); - } - } -} diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs index 8cc013dc0999..caa9ceb58acb 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs @@ -165,7 +165,7 @@ public Response HangupCall(string callConnectionId, CancellationToken cancellati } } - internal HttpMessage CreateTerminateCallRequest(string callConnectionId, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateTerminateCallRequest(string callConnectionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -177,31 +177,23 @@ internal HttpMessage CreateTerminateCallRequest(string callConnectionId, Guid? r uri.AppendPath(":terminate", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); return message; } /// Terminate a call using CallConnectionId. /// The terminate call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task TerminateCallAsync(string callConnectionId, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task TerminateCallAsync(string callConnectionId, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - using var message = CreateTerminateCallRequest(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTerminateCallRequest(callConnectionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -214,18 +206,16 @@ public async Task TerminateCallAsync(string callConnectionId, Guid? re /// Terminate a call using CallConnectionId. /// The terminate call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response TerminateCall(string callConnectionId, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response TerminateCall(string callConnectionId, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - using var message = CreateTerminateCallRequest(callConnectionId, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTerminateCallRequest(callConnectionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -236,7 +226,7 @@ public Response TerminateCall(string callConnectionId, Guid? repeatabilityReques } } - internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -248,14 +238,8 @@ internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, uri.AppendPath(":transferToParticipant", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -267,11 +251,9 @@ internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, /// Transfer the call to a participant. /// The call connection id. /// The transfer to participant request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -282,7 +264,7 @@ public async Task> TransferToParticipa throw new ArgumentNullException(nameof(transferToParticipantRequest)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -301,11 +283,9 @@ public async Task> TransferToParticipa /// Transfer the call to a participant. /// The call connection id. /// The transfer to participant request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -316,7 +296,7 @@ public Response TransferToParticipant(string ca throw new ArgumentNullException(nameof(transferToParticipantRequest)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -402,7 +382,7 @@ public Response GetParticipants(string callConn } } - internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -414,14 +394,8 @@ internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddPar uri.AppendPath("/participants:add", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -433,11 +407,9 @@ internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddPar /// Add participants to the call. /// The call connection Id. /// The add participants request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> AddParticipantAsync(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> AddParticipantAsync(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -448,7 +420,7 @@ public async Task> AddParticipantAsync throw new ArgumentNullException(nameof(addParticipantsRequest)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -467,11 +439,9 @@ public async Task> AddParticipantAsync /// Add participants to the call. /// The call connection Id. /// The add participants request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response AddParticipant(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response AddParticipant(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -482,7 +452,7 @@ public Response AddParticipant(string callConne throw new ArgumentNullException(nameof(addParticipantsRequest)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -498,7 +468,7 @@ public Response AddParticipant(string callConne } } - internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -510,14 +480,8 @@ internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, Re uri.AppendPath("/participants:remove", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -529,11 +493,9 @@ internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, Re /// Remove participant from the call using identifier. /// The call connection id. /// The participants to be removed from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public async Task> RemoveParticipantsAsync(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> RemoveParticipantsAsync(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -544,7 +506,7 @@ public async Task> RemoveParticipantsAsync(st throw new ArgumentNullException(nameof(removeParticipantsRequest)); } - using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -563,11 +525,9 @@ public async Task> RemoveParticipantsAsync(st /// Remove participant from the call using identifier. /// The call connection id. /// The participants to be removed from the call. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// or is null. - public Response RemoveParticipants(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response RemoveParticipants(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -578,7 +538,7 @@ public Response RemoveParticipants(string callConnecti throw new ArgumentNullException(nameof(removeParticipantsRequest)); } - using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs index 8eeb2679a577..d81d832fa72e 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs @@ -243,7 +243,7 @@ public Response Recognize(string callConnectionId, RecognizeRequestInternal reco } } - internal HttpMessage CreateRecordingRequest(StartCallRecordingRequestInternal startCallRecording, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateRecordingRequest(StartCallRecordingRequestInternal startCallRecording) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -253,14 +253,8 @@ internal HttpMessage CreateRecordingRequest(StartCallRecordingRequestInternal st uri.AppendPath("/calling/recordings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -271,18 +265,16 @@ internal HttpMessage CreateRecordingRequest(StartCallRecordingRequestInternal st /// Start recording the call. /// The request body of start call recording request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task> RecordingAsync(StartCallRecordingRequestInternal startCallRecording, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> RecordingAsync(StartCallRecordingRequestInternal startCallRecording, CancellationToken cancellationToken = default) { if (startCallRecording == null) { throw new ArgumentNullException(nameof(startCallRecording)); } - using var message = CreateRecordingRequest(startCallRecording, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRecordingRequest(startCallRecording); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -300,18 +292,16 @@ public async Task> RecordingAsync(StartCallRecord /// Start recording the call. /// The request body of start call recording request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response Recording(StartCallRecordingRequestInternal startCallRecording, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response Recording(StartCallRecordingRequestInternal startCallRecording, CancellationToken cancellationToken = default) { if (startCallRecording == null) { throw new ArgumentNullException(nameof(startCallRecording)); } - using var message = CreateRecordingRequest(startCallRecording, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRecordingRequest(startCallRecording); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs index c0daf9055e78..be7efbfe1ed7 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs @@ -38,7 +38,7 @@ public ServerCallingRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -48,14 +48,8 @@ internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCal uri.AppendPath("/calling/callConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -66,18 +60,16 @@ internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCal /// Create an outbound call. /// The create call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) { if (createCallRequest == null) { throw new ArgumentNullException(nameof(createCallRequest)); } - using var message = CreateCreateCallRequest(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateCreateCallRequest(createCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,18 +87,16 @@ public async Task> CreateCallAsync(Cr /// Create an outbound call. /// The create call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response CreateCall(CreateCallRequestInternal createCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response CreateCall(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) { if (createCallRequest == null) { throw new ArgumentNullException(nameof(createCallRequest)); } - using var message = CreateCreateCallRequest(createCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateCreateCallRequest(createCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -122,7 +112,7 @@ public Response CreateCall(CreateCallRequestIn } } - internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -132,14 +122,8 @@ internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCal uri.AppendPath("/calling/callConnections:answer", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -150,19 +134,17 @@ internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCal /// Answer a Call. /// The answer call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) { if (answerCallRequest == null) { throw new ArgumentNullException(nameof(answerCallRequest)); } - using var message = CreateAnswerCallRequest(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAnswerCallRequest(answerCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -180,19 +162,17 @@ public async Task> AnswerCallAsync(An /// Answer a Call. /// The answer call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public Response AnswerCall(AnswerCallRequestInternal answerCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response AnswerCall(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) { if (answerCallRequest == null) { throw new ArgumentNullException(nameof(answerCallRequest)); } - using var message = CreateAnswerCallRequest(answerCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateAnswerCallRequest(answerCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -208,7 +188,7 @@ public Response AnswerCall(AnswerCallRequestIn } } - internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -218,14 +198,8 @@ internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redir uri.AppendPath("/calling/callConnections:redirect", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(redirectCallRequest); @@ -235,18 +209,16 @@ internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redir /// Redirect a call. /// The RedirectCallRequest to use. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) { if (redirectCallRequest == null) { throw new ArgumentNullException(nameof(redirectCallRequest)); } - using var message = CreateRedirectCallRequest(redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRedirectCallRequest(redirectCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -259,18 +231,16 @@ public async Task RedirectCallAsync(RedirectCallRequestInternal redire /// Redirect a call. /// The RedirectCallRequest to use. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) { if (redirectCallRequest == null) { throw new ArgumentNullException(nameof(redirectCallRequest)); } - using var message = CreateRedirectCallRequest(redirectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRedirectCallRequest(redirectCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -281,7 +251,7 @@ public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, Gu } } - internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequest, Guid? repeatabilityRequestID, string repeatabilityFirstSent) + internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequest) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -291,14 +261,8 @@ internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCal uri.AppendPath("/calling/callConnections:reject", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(rejectCallRequest); @@ -308,18 +272,16 @@ internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCal /// Reject the call. /// The reject call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) { if (rejectCallRequest == null) { throw new ArgumentNullException(nameof(rejectCallRequest)); } - using var message = CreateRejectCallRequest(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRejectCallRequest(rejectCallRequest); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -332,18 +294,16 @@ public async Task RejectCallAsync(RejectCallRequestInternal rejectCall /// Reject the call. /// The reject call request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT. /// The cancellation token to use. /// is null. - public Response RejectCall(RejectCallRequestInternal rejectCallRequest, Guid? repeatabilityRequestID = null, string repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + public Response RejectCall(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) { if (rejectCallRequest == null) { throw new ArgumentNullException(nameof(rejectCallRequest)); } - using var message = CreateRejectCallRequest(rejectCallRequest, repeatabilityRequestID, repeatabilityFirstSent); + using var message = CreateRejectCallRequest(rejectCallRequest); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Swagger/2022-04-07.json b/sdk/communication/Azure.Communication.CallingServer/src/Swagger/2022-04-07.json index 1b4920851d90..bffa645b099c 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Swagger/2022-04-07.json +++ b/sdk/communication/Azure.Communication.CallingServer/src/Swagger/2022-04-07.json @@ -46,7 +46,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -96,7 +97,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -146,7 +148,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -193,7 +196,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -302,7 +306,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -356,7 +361,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -562,7 +568,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -619,7 +626,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { @@ -710,7 +718,8 @@ "name": "Repeatability-First-Sent", "in": "header", "description": "If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.", - "type": "string" + "type": "string", + "format": "date-time-rfc1123" } ], "responses": { diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallAutomationClientLiveTestsBase.cs b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallAutomationClientLiveTestsBase.cs index 2c673c669348..9c5bfaa8fe6d 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallAutomationClientLiveTestsBase.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/Infrastructure/CallAutomationClientLiveTestsBase.cs @@ -21,6 +21,8 @@ public CallAutomationClientLiveTestsBase(bool isAsync) : base(isAsync) JsonPathSanitizers.Add("$..rawId"); JsonPathSanitizers.Add("$..value"); UriRegexSanitizers.Add(new UriRegexSanitizer(URIDomainRegEx, "https://sanitized.skype.com")); + IgnoredHeaders.Add("Repeatability-Request-ID"); + IgnoredHeaders.Add("Repeatability-First-Sent"); } public bool SkipCallingServerInteractionLiveTests diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTest.json index 366345638f90..4100c3ebc05d 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "241", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-576bc5895752ad4396d7171ef2f6f66e-9405fe997cc0b948-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", @@ -159,6 +161,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", "x-ms-client-request-id": "c57bf7876ecb64abf6ed40830807fdee", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTestAsync.json index 98bb512a457d..302e4d4f8262 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToACSGetCallAndHangUpCallTestAsync.json @@ -44,6 +44,8 @@ "Authorization": "Sanitized", "Content-Length": "241", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-53efe85bae8fc4458ae30ccd02918070-b70dfff80d9d5e43-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", @@ -158,6 +160,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", "x-ms-client-request-id": "ef206741215ebfe64fb88f347069e873", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTest.json index f3ba11111722..79e6c819f707 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "271", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-e4a09d8f5e31cb46ae73f71d51ac1b79-88a1c6658ce6cf4e-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", @@ -168,6 +170,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", "x-ms-client-request-id": "208fd665a2b33ceb238ba229c86a7f27", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTestAsync.json index b7af5012a8de..c63335c495b6 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallAutomationClientLiveTests/CreateCallToPSTNGetCallAndHangUpCallTestAsync.json @@ -44,6 +44,8 @@ "Authorization": "Sanitized", "Content-Length": "271", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-7ae0dc4a7593414d82d20ca2029b07cf-b823b72054360641-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", @@ -167,6 +169,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "X-FORWARDED-HOST": "Sanitized", "x-ms-client-request-id": "14b8b551f926c18e317a1da8552b0ec8", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTest.json index e39681228388..e54cdf2ac5aa 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "393", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-99a35ed7c0301a458ff9943ee48f7bf7-487e3dbb174bde43-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "a8d372738e7e2c411ff46749514157c0", @@ -280,6 +282,8 @@ "Authorization": "Sanitized", "Content-Length": "145", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "5574fab301e24885cf9ab7e813efa753", "x-ms-content-sha256": "Sanitized", @@ -368,6 +372,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "8a9ede035e5773e2e2c5045a6df92dfc", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTestAsync.json index 50291f42e625..8e26c82d7bb8 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserAndAcsUserFromAnOngoingCallTestAsync.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "393", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-18bde0c8a1ef0c479579a25cc1f26124-55f1343caa846d4a-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "c27fb92f9d3dbaf6fa8a82b1ed3d7758", @@ -280,6 +282,8 @@ "Authorization": "Sanitized", "Content-Length": "145", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "8c8c456c5ed3e2b8b512d3488843aa84", "x-ms-content-sha256": "Sanitized", @@ -368,6 +372,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "ca46eddfe6e8bb86cef20127ce805ae7", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTest.json index 8bb3ef4371be..f9cadf68a7de 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "332", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-4fb8519daf62d3459eb606d28d0becee-ffc8b05b3ce46549-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "7fc7e7f21fc686e1811635356427cd35", @@ -250,6 +252,8 @@ "Authorization": "Sanitized", "Content-Length": "84", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "74c8e3ad13a3f658f0ddd0e4eafc1c37", "x-ms-content-sha256": "Sanitized", @@ -332,6 +336,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "8737e8d8168245d2686e19c2aab3acb9", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTestAsync.json index 7fa89db355ef..f2b61f56e868 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/RemoveAPSTNUserFromAnOngoingCallTestAsync.json @@ -44,6 +44,8 @@ "Authorization": "Sanitized", "Content-Length": "332", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-0a13933e7a1e5a448dd97203aa3dc5f5-717391505d706e43-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "229397a4ac907731780a7ef0f9d4d1ca", @@ -249,6 +251,8 @@ "Authorization": "Sanitized", "Content-Length": "84", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "c0cf15332dc55a156ec2948ab4781d8f", "x-ms-content-sha256": "Sanitized", @@ -331,6 +335,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "448672abba1824ee6de1ab469e6b54f3", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTest.json index 70d5d68c4c82..2a8dfbfe8251 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "332", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-e2716d96bdca0c439f875cf572482f53-67bcb9da0def9048-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "159715850579189aa68c24310fcef214", @@ -248,6 +250,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "6fbdc22ec1c0884573d3621ae7d89950", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTestAsync.json index 21572b5ecda0..642fe050fd1a 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpForEveryoneTestAsync.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "332", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-6a533cb766482342b616a6e55667849b-3e7415f02f062845-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "700944abf1deddd354e9e4bc44be7913", @@ -248,6 +250,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "14f3be37626308c754ca294e49d3a060", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTest.json index 6ab92fe494ea..dfbadb834a32 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "332", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-35d419c946ed064bb766aa367a3a8eaa-31054af1731a894c-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "b8836327dd4ebfc5d5e8326c6df81c92", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTestAsync.json index 41d015b13aa3..48b6b65b13cd 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/StartAGroupCallAndHangUpTestAsync.json @@ -44,6 +44,8 @@ "Authorization": "Sanitized", "Content-Length": "332", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-4a980dbc58278a4d8ab8d5f0f88795e3-42d26d52c172cb4c-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "d54cd3f27663b7bd06c25539e0b75fc3", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTest.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTest.json index 800da212bdfe..c7fcac9717f5 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTest.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTest.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "274", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-4254bc777dce554da95a96c8cf052acb-26279842d43daa44-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "376684f10c7bbf0d86b4fdef4b8cd342", @@ -172,6 +174,8 @@ "Authorization": "Sanitized", "Content-Length": "82", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "f4ecae12ec9a68c81c33ac979105dbb5", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTestAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTestAsync.json index 2ffa6c46a986..09afee366bc1 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTestAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallConnectionLiveTests/TransferACallFromOneUserToAnotherUserTestAsync.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "274", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-69353cb42eb84a40a2214710eb38e5f8-9b480d81eb2d434f-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "c24ec62030109ac58240b663a1cc4f6a", @@ -172,6 +174,8 @@ "Authorization": "Sanitized", "Content-Length": "82", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220823.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "87f44f3a56a760ff8e83f428dee51508", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudio.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudio.json index c66e2bb084e3..b1aaec4a3972 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudio.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudio.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "235", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-37a96438b32f414f9ad24be88d80c99f-3393faaca940394a-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "b97085fd9032d91f18a08461a99528ae", @@ -152,6 +154,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "dc498252dbca5c3c3548593cd8c8434d", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudioAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudioAsync.json index d51d8c6dabfb..48176af2e799 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudioAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallMediaLiveTests/PlayAudioAsync.json @@ -44,6 +44,8 @@ "Authorization": "Sanitized", "Content-Length": "235", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-0c49b476852f6542927d1239127fcd8c-e9b7041a38439845-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "5a7eef5ec6ef4bde32f0aba2fb85b0b8", @@ -151,6 +153,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220809.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "7688a55ee1787d100a45edda2dd31b2f", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperations.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperations.json index a5700f8b7cb2..7388beffef84 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperations.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperations.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "235", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-7efbf538d6901c409633f31960d52386-7ed637a0e33ef247-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220808.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "5bcdd4719d9561d2949fad063d65cd2a", @@ -114,6 +116,8 @@ "Connection": "keep-alive", "Content-Length": "320", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220808.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "816a774b01f7f3daea8a88ac81da7084", "x-ms-content-sha256": "Sanitized", @@ -335,6 +339,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220808.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "05910b81a11243f39105ccc166536efc", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperationsAsync.json b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperationsAsync.json index a5700f8b7cb2..7388beffef84 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperationsAsync.json +++ b/sdk/communication/Azure.Communication.CallingServer/tests/SessionRecords/CallRecordingLiveTests/RecordingOperationsAsync.json @@ -45,6 +45,8 @@ "Authorization": "Sanitized", "Content-Length": "235", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "traceparent": "00-7efbf538d6901c409633f31960d52386-7ed637a0e33ef247-00", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220808.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "5bcdd4719d9561d2949fad063d65cd2a", @@ -114,6 +116,8 @@ "Connection": "keep-alive", "Content-Length": "320", "Content-Type": "application/json", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220808.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "816a774b01f7f3daea8a88ac81da7084", "x-ms-content-sha256": "Sanitized", @@ -335,6 +339,8 @@ "RequestHeaders": { "Authorization": "Sanitized", "Content-Length": "0", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", "User-Agent": "azsdk-net-Communication.CallingServer/1.0.0-alpha.20220808.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.19044 )", "x-ms-client-request-id": "05910b81a11243f39105ccc166536efc", "x-ms-content-sha256": "Sanitized", diff --git a/sdk/communication/Azure.Communication.Chat/src/ChatClient.cs b/sdk/communication/Azure.Communication.Chat/src/ChatClient.cs index 6d9e52c9a4dc..2f1b28ed7c0c 100644 --- a/sdk/communication/Azure.Communication.Chat/src/ChatClient.cs +++ b/sdk/communication/Azure.Communication.Chat/src/ChatClient.cs @@ -62,7 +62,6 @@ public virtual async Task> CreateChatThreadAsyn scope.Start(); try { - idempotencyToken ??= Guid.NewGuid().ToString(); Response createChatThreadResultInternal = await _chatRestClient.CreateChatThreadAsync(topic, idempotencyToken, participants.Select(x => x.ToChatParticipantInternal()), cancellationToken).ConfigureAwait(false); return Response.FromValue(new CreateChatThreadResult(createChatThreadResultInternal.Value), createChatThreadResultInternal.GetRawResponse()); } @@ -85,7 +84,6 @@ public virtual Response CreateChatThread(string topic, I scope.Start(); try { - idempotencyToken ??= Guid.NewGuid().ToString(); Response createChatThreadResultInternal = _chatRestClient.CreateChatThread(topic, idempotencyToken,participants.Select(x => x.ToChatParticipantInternal()), cancellationToken); return Response.FromValue(new CreateChatThreadResult(createChatThreadResultInternal.Value), createChatThreadResultInternal.GetRawResponse()); } diff --git a/sdk/communication/Azure.Communication.Chat/src/ChatRestClient.cs b/sdk/communication/Azure.Communication.Chat/src/ChatRestClient.cs new file mode 100644 index 000000000000..68e43b5ddd24 --- /dev/null +++ b/sdk/communication/Azure.Communication.Chat/src/ChatRestClient.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Communication.Chat +{ + // for backward compatibility, keep the previous method signature which will accept `repeatability-request-id` as a parameter + [CodeGenSuppress("CreateCreateChatThreadRequest", typeof(string), typeof(IEnumerable))] + [CodeGenSuppress("CreateChatThreadAsync", typeof(string), typeof(IEnumerable), typeof(CancellationToken))] + [CodeGenSuppress("CreateChatThread", typeof(string), typeof(IEnumerable), typeof(CancellationToken))] + internal partial class ChatRestClient + { + internal HttpMessage CreateCreateChatThreadRequest(string topic, string repeatabilityRequestId, IEnumerable participants) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/chat/threads", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("repeatability-request-id", repeatabilityRequestId ?? Guid.NewGuid().ToString()); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + CreateChatThreadRequest createChatThreadRequest = new CreateChatThreadRequest(topic); + if (participants != null) + { + foreach (var value in participants) + { + createChatThreadRequest.Participants.Add(value); + } + } + var model = createChatThreadRequest; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(model); + request.Content = content; + return message; + } + + /// Creates a chat thread. + /// The chat thread topic. + /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. + /// Participants to be added to the chat thread. + /// The cancellation token to use. + /// is null. + public async Task> CreateChatThreadAsync(string topic, string repeatabilityRequestId = null, IEnumerable participants = null, CancellationToken cancellationToken = default) + { + if (topic == null) + { + throw new ArgumentNullException(nameof(topic)); + } + + using var message = CreateCreateChatThreadRequest(topic, repeatabilityRequestId, participants); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 201: + { + CreateChatThreadResultInternal value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CreateChatThreadResultInternal.DeserializeCreateChatThreadResultInternal(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a chat thread. + /// The chat thread topic. + /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. + /// Participants to be added to the chat thread. + /// The cancellation token to use. + /// is null. + public Response CreateChatThread(string topic, string repeatabilityRequestId = null, IEnumerable participants = null, CancellationToken cancellationToken = default) + { + if (topic == null) + { + throw new ArgumentNullException(nameof(topic)); + } + + using var message = CreateCreateChatThreadRequest(topic, repeatabilityRequestId, participants); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 201: + { + CreateChatThreadResultInternal value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CreateChatThreadResultInternal.DeserializeCreateChatThreadResultInternal(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.Chat/src/Generated/ChatRestClient.cs b/sdk/communication/Azure.Communication.Chat/src/Generated/ChatRestClient.cs index ad87e6f3f454..ce25cc913aae 100644 --- a/sdk/communication/Azure.Communication.Chat/src/Generated/ChatRestClient.cs +++ b/sdk/communication/Azure.Communication.Chat/src/Generated/ChatRestClient.cs @@ -39,95 +39,6 @@ public ChatRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateChatThreadRequest(string topic, string repeatabilityRequestId, IEnumerable participants) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/chat/threads", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (repeatabilityRequestId != null) - { - request.Headers.Add("repeatability-request-id", repeatabilityRequestId); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - CreateChatThreadRequest createChatThreadRequest = new CreateChatThreadRequest(topic); - if (participants != null) - { - foreach (var value in participants) - { - createChatThreadRequest.Participants.Add(value); - } - } - var model = createChatThreadRequest; - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(model); - request.Content = content; - return message; - } - - /// Creates a chat thread. - /// The chat thread topic. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. - /// Participants to be added to the chat thread. - /// The cancellation token to use. - /// is null. - public async Task> CreateChatThreadAsync(string topic, string repeatabilityRequestId = null, IEnumerable participants = null, CancellationToken cancellationToken = default) - { - if (topic == null) - { - throw new ArgumentNullException(nameof(topic)); - } - - using var message = CreateCreateChatThreadRequest(topic, repeatabilityRequestId, participants); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - CreateChatThreadResultInternal value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CreateChatThreadResultInternal.DeserializeCreateChatThreadResultInternal(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a chat thread. - /// The chat thread topic. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. - /// Participants to be added to the chat thread. - /// The cancellation token to use. - /// is null. - public Response CreateChatThread(string topic, string repeatabilityRequestId = null, IEnumerable participants = null, CancellationToken cancellationToken = default) - { - if (topic == null) - { - throw new ArgumentNullException(nameof(topic)); - } - - using var message = CreateCreateChatThreadRequest(topic, repeatabilityRequestId, participants); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - CreateChatThreadResultInternal value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CreateChatThreadResultInternal.DeserializeCreateChatThreadResultInternal(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateListChatThreadsRequest(int? maxPageSize, DateTimeOffset? startTime) { var message = _pipeline.CreateMessage(); diff --git a/sdk/communication/Azure.Communication.Rooms/src/Generated/RoomsRestClient.cs b/sdk/communication/Azure.Communication.Rooms/src/Generated/RoomsRestClient.cs index 5164d8ed9c39..a2a04f329880 100644 --- a/sdk/communication/Azure.Communication.Rooms/src/Generated/RoomsRestClient.cs +++ b/sdk/communication/Azure.Communication.Rooms/src/Generated/RoomsRestClient.cs @@ -39,7 +39,7 @@ public RoomsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipelin _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateRequest(Guid? repeatabilityRequestID, DateTimeOffset? repeatabilityFirstSent, DateTimeOffset? validFrom, DateTimeOffset? validUntil, IDictionary participants) + internal HttpMessage CreateCreateRequest(DateTimeOffset? validFrom, DateTimeOffset? validUntil, IDictionary participants) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,14 +49,8 @@ internal HttpMessage CreateCreateRequest(Guid? repeatabilityRequestID, DateTimeO uri.AppendPath("/rooms", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (repeatabilityRequestID != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestID.Value); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); CreateRoomRequest createRoomRequest = new CreateRoomRequest() @@ -79,15 +73,13 @@ internal HttpMessage CreateCreateRequest(Guid? repeatabilityRequestID, DateTimeO } /// Creates a new room. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-ID and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-ID is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. /// The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time. /// The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time plus 180 days. /// (Optional) Participants to be invited to the room. /// The cancellation token to use. - public async Task> CreateAsync(Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, DateTimeOffset? validFrom = null, DateTimeOffset? validUntil = null, IDictionary participants = null, CancellationToken cancellationToken = default) + public async Task> CreateAsync(DateTimeOffset? validFrom = null, DateTimeOffset? validUntil = null, IDictionary participants = null, CancellationToken cancellationToken = default) { - using var message = CreateCreateRequest(repeatabilityRequestID, repeatabilityFirstSent, validFrom, validUntil, participants); + using var message = CreateCreateRequest(validFrom, validUntil, participants); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -104,15 +96,13 @@ public async Task> CreateAsync(Guid? repeatabilityRe } /// Creates a new room. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-ID and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-ID is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. - /// If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. /// The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time. /// The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. The default value is the current date time plus 180 days. /// (Optional) Participants to be invited to the room. /// The cancellation token to use. - public Response Create(Guid? repeatabilityRequestID = null, DateTimeOffset? repeatabilityFirstSent = null, DateTimeOffset? validFrom = null, DateTimeOffset? validUntil = null, IDictionary participants = null, CancellationToken cancellationToken = default) + public Response Create(DateTimeOffset? validFrom = null, DateTimeOffset? validUntil = null, IDictionary participants = null, CancellationToken cancellationToken = default) { - using var message = CreateCreateRequest(repeatabilityRequestID, repeatabilityFirstSent, validFrom, validUntil, participants); + using var message = CreateCreateRequest(validFrom, validUntil, participants); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.Rooms/src/RoomsClient.cs b/sdk/communication/Azure.Communication.Rooms/src/RoomsClient.cs index 51e8dc51e5bd..1e84b4c3ce22 100644 --- a/sdk/communication/Azure.Communication.Rooms/src/RoomsClient.cs +++ b/sdk/communication/Azure.Communication.Rooms/src/RoomsClient.cs @@ -119,10 +119,8 @@ public virtual async Task> CreateRoomAsync(DateTimeO scope.Start(); try { - Guid repeatabilityRequestId = Guid.NewGuid(); - DateTimeOffset repeatabilityFirstSent = DateTimeOffset.UtcNow; var participantDictionary = ConvertRoomParticipantsToDictionaryForAddOrUpdate(participants); - return await RoomsServiceClient.CreateAsync(repeatabilityRequestId, repeatabilityFirstSent, validFrom, validUntil, participantDictionary, cancellationToken).ConfigureAwait(false); + return await RoomsServiceClient.CreateAsync(validFrom, validUntil, participantDictionary, cancellationToken).ConfigureAwait(false); } catch (Exception ex) { @@ -144,10 +142,8 @@ public virtual Response CreateRoom(DateTimeOffset? validFrom scope.Start(); try { - Guid repeatabilityRequestId = Guid.NewGuid(); - DateTimeOffset repeatabilityFirstSent = DateTimeOffset.UtcNow; var participantDictionary = ConvertRoomParticipantsToDictionaryForAddOrUpdate(participants); - return RoomsServiceClient.Create(repeatabilityRequestId, repeatabilityFirstSent, validFrom, validUntil, participantDictionary, cancellationToken); + return RoomsServiceClient.Create(validFrom, validUntil, participantDictionary, cancellationToken); } catch (Exception ex) { diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs index 516e65dd9f96..3b435fe3e62e 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs @@ -6,10 +6,10 @@ protected CancerProfilingClient() { } public CancerProfilingClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } public CancerProfilingClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Health.Insights.CancerProfiling.CancerProfilingClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData oncoPhenotypeData, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData oncoPhenotypeData, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData oncoPhenotypeData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData oncoPhenotypeData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class CancerProfilingClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs index f0b97221fb7b..6a93da6a078f 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs @@ -64,36 +64,32 @@ public CancerProfilingClient(Uri endpoint, AzureKeyCredential credential, Cancer /// Create Onco Phenotype job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The body of the Onco Phenotype request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The cancellation token to use. /// is null. /// Creates an Onco Phenotype job with the given request body. - /// - public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + /// + public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, CancellationToken cancellationToken = default) { Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = await InferCancerProfileAsync(waitUntil, oncoPhenotypeData.ToRequestContent(), repeatabilityRequestId, repeatabilityFirstSent, context).ConfigureAwait(false); + Operation response = await InferCancerProfileAsync(waitUntil, oncoPhenotypeData.ToRequestContent(), context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, OncoPhenotypeResult.FromResponse, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); } /// Create Onco Phenotype job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The body of the Onco Phenotype request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The cancellation token to use. /// is null. /// Creates an Onco Phenotype job with the given request body. - /// - public virtual Operation InferCancerProfile(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + /// + public virtual Operation InferCancerProfile(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, CancellationToken cancellationToken = default) { Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = InferCancerProfile(waitUntil, oncoPhenotypeData.ToRequestContent(), repeatabilityRequestId, repeatabilityFirstSent, context); + Operation response = InferCancerProfile(waitUntil, oncoPhenotypeData.ToRequestContent(), context); return ProtocolOperationHelpers.Convert(response, OncoPhenotypeResult.FromResponse, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); } @@ -107,21 +103,19 @@ public virtual Operation InferCancerProfile(WaitUntil waitU /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The content to send as the body of the request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// - public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, RequestContent content, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, RequestContext context = null) + /// + public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -129,7 +123,7 @@ public virtual async Task> InferCancerProfileAsync(WaitUnt scope.Start(); try { - using HttpMessage message = CreateInferCancerProfileRequest(content, repeatabilityRequestId, repeatabilityFirstSent, context); + using HttpMessage message = CreateInferCancerProfileRequest(content, context); return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile", OperationFinalStateVia.Location, context, waitUntil).ConfigureAwait(false); } catch (Exception e) @@ -149,21 +143,19 @@ public virtual async Task> InferCancerProfileAsync(WaitUnt /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The content to send as the body of the request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// - public virtual Operation InferCancerProfile(WaitUntil waitUntil, RequestContent content, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, RequestContext context = null) + /// + public virtual Operation InferCancerProfile(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -171,7 +163,7 @@ public virtual Operation InferCancerProfile(WaitUntil waitUntil, Req scope.Start(); try { - using HttpMessage message = CreateInferCancerProfileRequest(content, repeatabilityRequestId, repeatabilityFirstSent, context); + using HttpMessage message = CreateInferCancerProfileRequest(content, context); return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile", OperationFinalStateVia.Location, context, waitUntil); } catch (Exception e) @@ -181,7 +173,7 @@ public virtual Operation InferCancerProfile(WaitUntil waitUntil, Req } } - internal HttpMessage CreateInferCancerProfileRequest(RequestContent content, string repeatabilityRequestId, DateTimeOffset? repeatabilityFirstSent, RequestContext context) + internal HttpMessage CreateInferCancerProfileRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200202); var request = message.Request; @@ -193,14 +185,8 @@ internal HttpMessage CreateInferCancerProfileRequest(RequestContent content, str uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (repeatabilityRequestId != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestId); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Content-Type", "application/json"); request.Content = content; return message; diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml index 4e08a543dab1..aea44f1a5d63 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml @@ -1,7 +1,7 @@ - + This sample shows how to call InferCancerProfileAsync with required parameters. ", DateTimeOffset.UtcNow); +var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); ]]> - + This sample shows how to call InferCancerProfile with required parameters. ", DateTimeOffset.UtcNow); +var operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); ]]> - + This sample shows how to call InferCancerProfileAsync with required parameters and request content, and how to parse the result. ", DateTimeOffset.UtcNow); +var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -210,7 +210,7 @@ Console.WriteLine(result.GetProperty("results").GetProperty("modelVersion").ToSt ]]> - + This sample shows how to call InferCancerProfile with required parameters and request content, and how to parse the result. ", DateTimeOffset.UtcNow); +var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs index 44ea97a6c8ad..44a2402058eb 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs @@ -98,7 +98,7 @@ public void Example_InferCancerProfile_AllParameters() }, }; - var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data), "", DateTimeOffset.UtcNow); + var operation = client.InferCancerProfile(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -208,7 +208,7 @@ public async Task Example_InferCancerProfile_AllParameters_Async() }, }; - var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data), "", DateTimeOffset.UtcNow); + var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -287,7 +287,7 @@ public async Task Example_InferCancerProfile_Convenience_Async() CheckForCancerCase = true, }, }; - var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData, "", DateTimeOffset.UtcNow); + var operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); } } } diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Infrastructure/HealthInsightsLiveTestBase.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Infrastructure/HealthInsightsLiveTestBase.cs index 48c271c2ee5e..a79217228839 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Infrastructure/HealthInsightsLiveTestBase.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Infrastructure/HealthInsightsLiveTestBase.cs @@ -18,6 +18,8 @@ public HealthInsightsLiveTestBase(bool isAsync) : base(isAsync) JsonPathSanitizers.Add("$..accessToken"); JsonPathSanitizers.Add("$..source"); SanitizedHeaders.Add(Constants.AuthorizationHeader); + IgnoredHeaders.Add("Repeatability-Request-ID"); + IgnoredHeaders.Add("Repeatability-First-Sent"); } /// diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJob.json b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJob.json index 83f01afeda10..23a47c3ba0cb 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJob.json +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJob.json @@ -1,16 +1,18 @@ { "Entries": [ { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs?api-version=2023-03-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "1048", + "Content-Length": "1072", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-28e42bf227d63e00a6d9cc031117c37f-703058def7b3ae57-00", - "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230306.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "bde6f932e3bd8ba966d5c6e6e8201526", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:37:24 GMT", + "Repeatability-Request-ID": "2d8494ef-5624-4075-a3e8-5d4a7b060ae5", + "traceparent": "00-abcd0eec8e0e0f556764a3bc0b57c2b6-81df996bc4cbc912-00", + "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "ef2454718241ef6b53e52f2f53371e62", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -39,64 +41,71 @@ }, "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "7ecc6c49-0fcb-4d64-a79a-cac7734a0724", + "apim-request-id": "e8d395e5-899a-4010-9213-7efdc78a8607", "Content-Length": "0", - "Date": "Mon, 06 Mar 2023 09:10:35 GMT", - "Operation-Location": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs/7c76e45b-fb37-4b7f-aa0c-e7bb0734aecc?api-version=2023-03-01-preview", + "Date": "Fri, 14 Jul 2023 06:37:26 GMT", + "operation-location": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs/2d8494ef-5624-4075-a3e8-5d4a7b060ae5?api-version=2023-03-01-preview", + "repeatability-result": "accepted", "Retry-After": "5", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "777", + "x-ms-region": "West US 2" }, "ResponseBody": null }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs/7c76e45b-fb37-4b7f-aa0c-e7bb0734aecc?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs/2d8494ef-5624-4075-a3e8-5d4a7b060ae5?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-28e42bf227d63e00a6d9cc031117c37f-5ce6f45bb60a201a-00", - "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230306.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "0c3e350c34489b80bd2a13d7407f99fa", + "traceparent": "00-abcd0eec8e0e0f556764a3bc0b57c2b6-5180402b85e2672b-00", + "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "34d56a1e356190dd7d0333d86d197db1", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "b5994a1b-0c78-4d59-9954-45f4c582115f", - "Content-Length": "199", + "apim-request-id": "a6befb90-b37b-45df-99a0-e60d9a6d80f2", + "Content-Length": "196", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:10:35 GMT", - "Retry-After": "5", + "Date": "Fri, 14 Jul 2023 06:37:26 GMT", + "Retry-After": "3", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "338", + "x-ms-region": "West US 2" }, "ResponseBody": { - "jobId": "7c76e45b-fb37-4b7f-aa0c-e7bb0734aecc", - "createdDateTime": "2023-03-06T09:10:35Z", - "expirationDateTime": "2023-03-06T09:27:15Z", - "lastUpdateDateTime": "2023-03-06T09:10:35Z", - "status": "notStarted" + "jobId": "2d8494ef-5624-4075-a3e8-5d4a7b060ae5", + "createdDateTime": "2023-07-14T06:37:26Z", + "expirationDateTime": "2023-07-15T06:37:26Z", + "lastUpdateDateTime": "2023-07-14T06:37:26Z", + "status": "running" } }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs/7c76e45b-fb37-4b7f-aa0c-e7bb0734aecc?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs/2d8494ef-5624-4075-a3e8-5d4a7b060ae5?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-28e42bf227d63e00a6d9cc031117c37f-44839a4aebf26a89-00", - "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230306.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "423ec87a7a0144311368b503db9068fe", + "traceparent": "00-abcd0eec8e0e0f556764a3bc0b57c2b6-f2f87876c9509b0d-00", + "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "490599b2d46e13993f6c87cd676dedc3", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "0fd99f75-7326-4d97-9d6d-7ed5b4e9e478", + "apim-request-id": "bf1d05bd-4d78-411f-aa18-b8b17af1db8f", "Content-Length": "6279", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:10:41 GMT", + "Date": "Fri, 14 Jul 2023 06:37:31 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "1216", + "x-ms-region": "West US 2" }, "ResponseBody": { "results": { @@ -596,19 +605,19 @@ ] } ], - "modelVersion": "2022-01-01-preview" + "modelVersion": "2023-03-01-preview" }, - "jobId": "7c76e45b-fb37-4b7f-aa0c-e7bb0734aecc", - "createdDateTime": "2023-03-06T09:10:35Z", - "expirationDateTime": "2023-03-06T09:27:15Z", - "lastUpdateDateTime": "2023-03-06T09:10:36Z", + "jobId": "2d8494ef-5624-4075-a3e8-5d4a7b060ae5", + "createdDateTime": "2023-07-14T06:37:26Z", + "expirationDateTime": "2023-07-15T06:37:26Z", + "lastUpdateDateTime": "2023-07-14T06:37:29Z", "status": "succeeded" } } ], "Variables": { "AZURE_HEALTH_INSIGHTS_API_KEY": "Sanitized", - "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://sanitized.azure-api.net/", - "RandomSeed": "1312474858" + "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://srnagar-healthinsights.cognitiveservices.azure.com/", + "RandomSeed": "21153929" } } diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJobAsync.json b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJobAsync.json index 30779255a427..de13f38df918 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJobAsync.json +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/SessionRecords/CancerProfilingClientLiveTests/GetResultsFromCreateJobAsync.json @@ -1,16 +1,18 @@ { "Entries": [ { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs?api-version=2023-03-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "1048", + "Content-Length": "1072", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-743c4fd3cb9746df91c3f01ad075ffe2-e177dbac61684a26-00", - "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230306.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "0b293a0acc67c3e87e25d31ed0d74c74", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:37:32 GMT", + "Repeatability-Request-ID": "4cdae2de-b149-4112-a8f6-978f19d51c36", + "traceparent": "00-8e642d10dfd10cd734a5859ba3639d53-b3ff758ee8b2ed61-00", + "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "73e539f21651495fbbd16aa282f0286f", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -39,64 +41,71 @@ }, "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "236c6e72-e7b3-4eb8-9a15-7c91d97a7eeb", + "apim-request-id": "1ab6efdb-3cf6-4890-9a32-851cf45ed4b5", "Content-Length": "0", - "Date": "Mon, 06 Mar 2023 09:11:26 GMT", - "Operation-Location": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs/31148113-3fe3-4e0e-9bee-efcd7d6abdf9?api-version=2023-03-01-preview", + "Date": "Fri, 14 Jul 2023 06:37:31 GMT", + "operation-location": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs/4cdae2de-b149-4112-a8f6-978f19d51c36?api-version=2023-03-01-preview", + "repeatability-result": "accepted", "Retry-After": "5", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "60", + "x-ms-region": "West US 2" }, "ResponseBody": null }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs/31148113-3fe3-4e0e-9bee-efcd7d6abdf9?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs/4cdae2de-b149-4112-a8f6-978f19d51c36?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-743c4fd3cb9746df91c3f01ad075ffe2-b1e2d45fa391482b-00", - "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230306.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "0e5a432d9b3883ff5350ffbb05e9e12e", + "traceparent": "00-8e642d10dfd10cd734a5859ba3639d53-0bb0c04b27f4bf71-00", + "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "40331402500e0776772931f6702ae6a4", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "4d11f0b8-e821-4cf0-b26f-12cb42a5ccda", - "Content-Length": "196", + "apim-request-id": "3becb74e-45b5-4bbd-9441-1f5e35978bb4", + "Content-Length": "199", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:11:26 GMT", - "Retry-After": "3", + "Date": "Fri, 14 Jul 2023 06:37:32 GMT", + "Retry-After": "5", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-region": "West US 2" }, "ResponseBody": { - "jobId": "31148113-3fe3-4e0e-9bee-efcd7d6abdf9", - "createdDateTime": "2023-03-06T09:11:26Z", - "expirationDateTime": "2023-03-06T09:28:06Z", - "lastUpdateDateTime": "2023-03-06T09:11:26Z", - "status": "running" + "jobId": "4cdae2de-b149-4112-a8f6-978f19d51c36", + "createdDateTime": "2023-07-14T06:37:32Z", + "expirationDateTime": "2023-07-15T06:37:32Z", + "lastUpdateDateTime": "2023-07-14T06:37:32Z", + "status": "notStarted" } }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/oncophenotype/jobs/31148113-3fe3-4e0e-9bee-efcd7d6abdf9?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/oncophenotype/jobs/4cdae2de-b149-4112-a8f6-978f19d51c36?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-743c4fd3cb9746df91c3f01ad075ffe2-e6b9a31d35d9c000-00", - "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230306.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "acf37c393d2d66cfa45f7276cdec4717", + "traceparent": "00-8e642d10dfd10cd734a5859ba3639d53-69c0944f783ffe1a-00", + "User-Agent": "azsdk-net-Health.Insights.CancerProfiling/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "b1a9d890456e9c1f2468745539df3745", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "a7fdc9f4-5283-4530-82ea-1f3bd77418c1", + "apim-request-id": "0a766f5c-685e-4095-8b97-f210cf4a06ae", "Content-Length": "6279", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:11:30 GMT", + "Date": "Fri, 14 Jul 2023 06:37:37 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-region": "West US 2" }, "ResponseBody": { "results": { @@ -596,19 +605,19 @@ ] } ], - "modelVersion": "2022-01-01-preview" + "modelVersion": "2023-03-01-preview" }, - "jobId": "31148113-3fe3-4e0e-9bee-efcd7d6abdf9", - "createdDateTime": "2023-03-06T09:11:26Z", - "expirationDateTime": "2023-03-06T09:28:06Z", - "lastUpdateDateTime": "2023-03-06T09:11:27Z", + "jobId": "4cdae2de-b149-4112-a8f6-978f19d51c36", + "createdDateTime": "2023-07-14T06:37:32Z", + "expirationDateTime": "2023-07-15T06:37:32Z", + "lastUpdateDateTime": "2023-07-14T06:37:36Z", "status": "succeeded" } } ], "Variables": { "AZURE_HEALTH_INSIGHTS_API_KEY": "Sanitized", - "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://sanitized.azure-api.net/", - "RandomSeed": "564752262" + "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://srnagar-healthinsights.cognitiveservices.azure.com/", + "RandomSeed": "1568236915" } } diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs index 1b8f1fd64ae3..1ecf1a4e51ab 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs @@ -81,10 +81,10 @@ protected ClinicalMatchingClient() { } public ClinicalMatchingClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } public ClinicalMatchingClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Health.Insights.ClinicalMatching.ClinicalMatchingClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, string repeatabilityRequestId = null, System.DateTimeOffset? repeatabilityFirstSent = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ClinicalMatchingClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs index 397684d68e5e..3984bf1f11ae 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs @@ -64,36 +64,32 @@ public ClinicalMatchingClient(Uri endpoint, AzureKeyCredential credential, Clini /// Create Trial Matcher job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The body of the Trial Matcher request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The cancellation token to use. /// is null. /// Creates a Trial Matcher job with the given request body. - /// - public virtual async Task> MatchTrialsAsync(WaitUntil waitUntil, TrialMatcherData trialMatcherData, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + /// + public virtual async Task> MatchTrialsAsync(WaitUntil waitUntil, TrialMatcherData trialMatcherData, CancellationToken cancellationToken = default) { Argument.AssertNotNull(trialMatcherData, nameof(trialMatcherData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = await MatchTrialsAsync(waitUntil, trialMatcherData.ToRequestContent(), repeatabilityRequestId, repeatabilityFirstSent, context).ConfigureAwait(false); + Operation response = await MatchTrialsAsync(waitUntil, trialMatcherData.ToRequestContent(), context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, TrialMatcherResult.FromResponse, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials"); } /// Create Trial Matcher job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The body of the Trial Matcher request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The cancellation token to use. /// is null. /// Creates a Trial Matcher job with the given request body. - /// - public virtual Operation MatchTrials(WaitUntil waitUntil, TrialMatcherData trialMatcherData, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, CancellationToken cancellationToken = default) + /// + public virtual Operation MatchTrials(WaitUntil waitUntil, TrialMatcherData trialMatcherData, CancellationToken cancellationToken = default) { Argument.AssertNotNull(trialMatcherData, nameof(trialMatcherData)); RequestContext context = FromCancellationToken(cancellationToken); - Operation response = MatchTrials(waitUntil, trialMatcherData.ToRequestContent(), repeatabilityRequestId, repeatabilityFirstSent, context); + Operation response = MatchTrials(waitUntil, trialMatcherData.ToRequestContent(), context); return ProtocolOperationHelpers.Convert(response, TrialMatcherResult.FromResponse, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials"); } @@ -107,21 +103,19 @@ public virtual Operation MatchTrials(WaitUntil waitUntil, Tr /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The content to send as the body of the request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// - public virtual async Task> MatchTrialsAsync(WaitUntil waitUntil, RequestContent content, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, RequestContext context = null) + /// + public virtual async Task> MatchTrialsAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -129,7 +123,7 @@ public virtual async Task> MatchTrialsAsync(WaitUntil wait scope.Start(); try { - using HttpMessage message = CreateMatchTrialsRequest(content, repeatabilityRequestId, repeatabilityFirstSent, context); + using HttpMessage message = CreateMatchTrialsRequest(content, context); return await ProtocolOperationHelpers.ProcessMessageAsync(_pipeline, message, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials", OperationFinalStateVia.Location, context, waitUntil).ConfigureAwait(false); } catch (Exception e) @@ -149,21 +143,19 @@ public virtual async Task> MatchTrialsAsync(WaitUntil wait /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The content to send as the body of the request. - /// An opaque, globally-unique, client-generated string identifier for the request. - /// Specifies the date and time at which the request was first created. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The representing an asynchronous operation on the service. - /// - public virtual Operation MatchTrials(WaitUntil waitUntil, RequestContent content, string repeatabilityRequestId = null, DateTimeOffset? repeatabilityFirstSent = null, RequestContext context = null) + /// + public virtual Operation MatchTrials(WaitUntil waitUntil, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -171,7 +163,7 @@ public virtual Operation MatchTrials(WaitUntil waitUntil, RequestCon scope.Start(); try { - using HttpMessage message = CreateMatchTrialsRequest(content, repeatabilityRequestId, repeatabilityFirstSent, context); + using HttpMessage message = CreateMatchTrialsRequest(content, context); return ProtocolOperationHelpers.ProcessMessage(_pipeline, message, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials", OperationFinalStateVia.Location, context, waitUntil); } catch (Exception e) @@ -181,7 +173,7 @@ public virtual Operation MatchTrials(WaitUntil waitUntil, RequestCon } } - internal HttpMessage CreateMatchTrialsRequest(RequestContent content, string repeatabilityRequestId, DateTimeOffset? repeatabilityFirstSent, RequestContext context) + internal HttpMessage CreateMatchTrialsRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200202); var request = message.Request; @@ -193,14 +185,8 @@ internal HttpMessage CreateMatchTrialsRequest(RequestContent content, string rep uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (repeatabilityRequestId != null) - { - request.Headers.Add("Repeatability-Request-ID", repeatabilityRequestId); - } - if (repeatabilityFirstSent != null) - { - request.Headers.Add("Repeatability-First-Sent", repeatabilityFirstSent.Value, "R"); - } + request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid()); + request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Content-Type", "application/json"); request.Content = content; return message; diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml index 48295590ad0f..6829ce2eb059 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml @@ -1,7 +1,7 @@ - + This sample shows how to call MatchTrialsAsync with required parameters. ", DateTimeOffset.UtcNow); +var operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); ]]> - + This sample shows how to call MatchTrials with required parameters. ", DateTimeOffset.UtcNow); +var operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); ]]> - + This sample shows how to call MatchTrialsAsync with required parameters and request content, and how to parse the result. ", DateTimeOffset.UtcNow); +var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -531,7 +531,7 @@ Console.WriteLine(result.GetProperty("results").GetProperty("knowledgeGraphLastU ]]> - + This sample shows how to call MatchTrials with required parameters and request content, and how to parse the result. ", DateTimeOffset.UtcNow); +var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs index 3397177df552..92068c243138 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs @@ -197,7 +197,7 @@ public void Example_MatchTrials_AllParameters() }, }; - var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data), "", DateTimeOffset.UtcNow); + var operation = client.MatchTrials(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -427,7 +427,7 @@ public async Task Example_MatchTrials_AllParameters_Async() }, }; - var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data), "", DateTimeOffset.UtcNow); + var operation = await client.MatchTrialsAsync(WaitUntil.Completed, RequestContent.Create(data)); BinaryData responseData = operation.Value; JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement; @@ -628,7 +628,7 @@ public async Task Example_MatchTrials_Convenience_Async() IncludeEvidence = true, }, }; - var operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData, "", DateTimeOffset.UtcNow); + var operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); } } } diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Infrastructure/HealthInsightsLiveTestBase.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Infrastructure/HealthInsightsLiveTestBase.cs index e694271c8806..ade978124a71 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Infrastructure/HealthInsightsLiveTestBase.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Infrastructure/HealthInsightsLiveTestBase.cs @@ -18,6 +18,8 @@ public HealthInsightsLiveTestBase(bool isAsync) : base(isAsync) JsonPathSanitizers.Add("$..accessToken"); JsonPathSanitizers.Add("$..source"); SanitizedHeaders.Add(Constants.AuthorizationHeader); + IgnoredHeaders.Add("Repeatability-Request-ID"); + IgnoredHeaders.Add("Repeatability-First-Sent"); } /// diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJob.json b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJob.json index 75c4e3dec6dc..f5865b701dd6 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJob.json +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJob.json @@ -1,16 +1,18 @@ { "Entries": [ { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs?api-version=2023-03-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "2328", + "Content-Length": "2404", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-213b7d144a1833db-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "5a437bb7afeafcab70224541a69468bd", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:05 GMT", + "Repeatability-Request-ID": "7ee666e4-4631-467b-841e-788b8e59a4fa", + "traceparent": "00-50b8bd3c7db27cdfab36be4d1f6af16d-4c44f827d3c0ab64-00", + "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "c55ca13f093e4d56674cb2f6e60c34d2", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -83,238 +85,102 @@ }, "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "97ab65ca-831d-45f1-9e95-4610590b1515", + "apim-request-id": "fe79c1ed-9829-4f48-9aeb-2d7c5af5e8d2", "Content-Length": "0", - "Date": "Mon, 06 Mar 2023 09:41:06 GMT", - "Operation-Location": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", + "Date": "Fri, 14 Jul 2023 06:39:07 GMT", + "operation-location": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs/7ee666e4-4631-467b-841e-788b8e59a4fa?api-version=2023-03-01-preview", + "repeatability-result": "accepted", "Retry-After": "1", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "1123", + "x-ms-region": "West US 2" }, "ResponseBody": null }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs/7ee666e4-4631-467b-841e-788b8e59a4fa?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-0f1b14b624eaa1c0-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "ff28bc63ead29a419507bfb40162487c", + "traceparent": "00-50b8bd3c7db27cdfab36be4d1f6af16d-bbd1c7814e39db87-00", + "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "fdcc3889ec88d5dede8b083ee85e3b79", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "0c421456-f993-4f0f-b3bc-af2051851d90", + "apim-request-id": "d337b567-41f9-40b5-b8d7-cdaa4aeccde3", "Content-Length": "196", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:06 GMT", + "Date": "Fri, 14 Jul 2023 06:39:08 GMT", "Retry-After": "1", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "446", + "x-ms-region": "West US 2" }, "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", + "jobId": "7ee666e4-4631-467b-841e-788b8e59a4fa", + "createdDateTime": "2023-07-14T06:39:07Z", + "expirationDateTime": "2023-07-15T06:39:07Z", + "lastUpdateDateTime": "2023-07-14T06:39:07Z", "status": "running" } }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs/7ee666e4-4631-467b-841e-788b8e59a4fa?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-33e954a816bf0d63-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "b4593f773ab1aa4f1e8222cc6624bb4c", + "traceparent": "00-50b8bd3c7db27cdfab36be4d1f6af16d-f9744073d17cec12-00", + "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "a8e4bed5089ed27c3b80da2223eddaf6", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "fc3846e4-edc2-4e72-baf3-46230ee1e61a", + "apim-request-id": "ae30aad7-bbb5-4f83-ab66-1c21e4fc98d8", "Content-Length": "196", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:08 GMT", + "Date": "Fri, 14 Jul 2023 06:39:09 GMT", "Retry-After": "1", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "403", + "x-ms-region": "West US 2" }, "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", + "jobId": "7ee666e4-4631-467b-841e-788b8e59a4fa", + "createdDateTime": "2023-07-14T06:39:07Z", + "expirationDateTime": "2023-07-15T06:39:07Z", + "lastUpdateDateTime": "2023-07-14T06:39:07Z", "status": "running" } }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs/7ee666e4-4631-467b-841e-788b8e59a4fa?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-3e056ec17a0e09c8-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "837eaf832a77cdf73aa9c4e3f0f7fa0e", + "traceparent": "00-50b8bd3c7db27cdfab36be4d1f6af16d-75fbdfb044ec7773-00", + "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "fb8494ceda715398c287e6b301176409", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "88c444a3-88dd-49c7-aad2-63c42742c3fe", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:09 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-069581f214057443-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "67cac9dab33b280c6c7ee050c7753471", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "b65b1627-aeaf-4106-952e-ad5368426913", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:11 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-937d90d5c1bc1c81-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "5130724bc4e34c05488b7907756cb927", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "787f7d2e-f167-4f3e-8aa8-c6c39f2ffcbf", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:12 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-c96ccbd6691cd449-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "9df21487545ad010a35617f849a705c5", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "824fdee7-7b8f-47c7-b72b-537de0a322b9", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:13 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-d0471e86ca508b99-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "7d985375a9c7152bc37d1faf3904b200", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "fee97603-a27a-444a-9bba-a287d10c78e8", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:15 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:06Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/2a785274-5256-46a0-b0f3-d04f3c5b4bbf?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-9f8b153b5906dad6236c6a3081ca2bda-34f1cc7f49c0e53f-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "b2c8b9c59683f7176260ad8cad0d02a1", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "908280ab-75c2-46da-aa28-63970f96b4f0", - "Content-Length": "1029", + "apim-request-id": "91da23a0-f68c-4247-a61a-b2c54f45756f", + "Content-Length": "7748", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:16 GMT", + "Date": "Fri, 14 Jul 2023 06:39:11 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "78", + "x-ms-region": "West US 2" }, "ResponseBody": { "results": { @@ -326,7 +192,7 @@ "type": "trialEligibility", "evidence": [ { - "eligibilityCriteriaEvidence": "Inclusion: Has a radiation therapy plan approved by the central radiation therapy quality assurance vendor", + "eligibilityCriteriaEvidence": "Inclusion: Is able to receive SBRT and does not have an ultra - centrally located tumor", "patientInfoEvidence": { "system": "http://www.nlm.nih.gov/research/umls", "code": "C1522449", @@ -336,7 +202,7 @@ "importance": 0.0 }, { - "eligibilityCriteriaEvidence": "Inclusion: Is able to receive SBRT and does not have an ultra-centrally located tumor", + "eligibilityCriteriaEvidence": "Inclusion: Has a radiation therapy plan approved by the central radiation therapy quality assurance vendor", "patientInfoEvidence": { "system": "http://www.nlm.nih.gov/research/umls", "code": "C1522449", @@ -350,25 +216,290 @@ "source": "Sanitized", "value": "Ineligible", "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Inclusion: Last dose of previous anticancer therapy \u2265 21 days, radiotherapy \u003E 21 days, or surgical intervention \u003E 21 days prior to the first dose of T3011.", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + } + ], + "id": "NCT04370587", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Severe, active co-morbidity defined as follows: Unstable angina and/or congestive heart failure requiring hospitalization within the last 3 months", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT03811002", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Inclusion: PATIENT PRE-REGISTRATION ELIGIBILITY CRITERIA: No patients known to be pregnant or lactating, PATIENT REGISTRATION ELIGIBILITY CRITERIA: In order to allow for time for central genotyping and eligibility for the ALCHEMIST treatment trial, patients must register within the following eligibility windows: Non-squamous patients: If adjuvant chemotherapy and radiation, register patient within 285 days following surgery", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032961", + "name": "Pregnancy", + "value": "false" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: PATIENT PRE-REGISTRATION ELIGIBILITY CRITERIA: No patients known to be pregnant or lactating, PATIENT REGISTRATION ELIGIBILITY CRITERIA: In order to allow for time for central genotyping and eligibility for the ALCHEMIST treatment trial, patients must register within the following eligibility windows: Non-squamous patients: If adjuvant chemotherapy and radiation, register patient within 285 days following surgery", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + } + ], + "id": "NCT02194738", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Has known active central nervous system metastases and/or carcinomatous meningitis", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT04165798", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Has known active central nervous system metastases and/or carcinomatous meningitis", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT04165083", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Any history of primary brain or leptomeningeal disease , presence of symptomatic central nervous system metastases, or CNS metastases that require local treatment .", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: Measurable disease by RECIST v1.1 with at least one lesion not chosen for biopsy during the screening period that can be accurately measured at baseline with computed tomography or magnetic resonance imaging and that is suitable for accurate repeated measurements. A biopsied lesion should not be used as a target lesion for RECIST 1.1 tumor assessments. Previously irradiated lesions must have shown progression to be considered measurable.", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: Adequate bone marrow function as assessed by the following laboratory tests to be conducted within 7 days before the first dose of study treatment: Platelets \u2265 100 \u00D7 10 ^ 9 cells / L.", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032181", + "name": "Platelet count", + "value": "250000" + }, + "importance": 0.0 + } + ], + "id": "NCT05099172", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Has known active central nervous system metastases and/or carcinomatous meningitis", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT04165070", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT02201992", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04367311", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04267848", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT03175224", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04092283", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT03767348", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04200963", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT02716116", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04476797", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04981119", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT05215574", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 } ], - "neededClinicalInfo": [] + "neededClinicalInfo": [ + { + "semanticType": "T093", + "category": "ExaminationName", + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1512162", + "name": "Eastern Cooperative Oncology Group", + "value": ";EntityType:ExaminationName" + }, + { + "semanticType": "T061", + "category": "TreatmentName", + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1515119", + "name": "Systemic Therapy", + "value": ";EntityType:TreatmentName" + }, + { + "semanticType": "T191", + "category": "Diagnosis", + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007131", + "name": "Non-Small Cell Lung Carcinoma", + "value": ";EntityType:Diagnosis" + } + ] } ], - "modelVersion": "2023.130.1.0", - "knowledgeGraphLastUpdateDate": "01/11/2023" + "modelVersion": "2023-03-01-preview", + "knowledgeGraphLastUpdateDate": "2023-05-22" }, - "jobId": "2a785274-5256-46a0-b0f3-d04f3c5b4bbf", - "createdDateTime": "2023-03-06T09:41:06Z", - "expirationDateTime": "2023-03-06T10:41:06Z", - "lastUpdateDateTime": "2023-03-06T09:41:15Z", + "jobId": "7ee666e4-4631-467b-841e-788b8e59a4fa", + "createdDateTime": "2023-07-14T06:39:07Z", + "expirationDateTime": "2023-07-15T06:39:07Z", + "lastUpdateDateTime": "2023-07-14T06:39:10Z", "status": "succeeded" } } ], "Variables": { "AZURE_HEALTH_INSIGHTS_API_KEY": "Sanitized", - "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://sanitized.azure-api.net/", - "RandomSeed": "2077978177" + "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://srnagar-healthinsights.cognitiveservices.azure.com/", + "RandomSeed": "348819391" } } diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJobAsync.json b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJobAsync.json index cf3823b3f2c3..9f457d9a34e5 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJobAsync.json +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/SessionRecords/ClinicalMatchingClientLiveTests/GetResultsFromCreateJobAsync.json @@ -1,16 +1,18 @@ { "Entries": [ { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs?api-version=2023-03-01-preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json", - "Content-Length": "2328", + "Content-Length": "2404", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-3bdeeb7d0a7d4cea-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "03d0f2729283dd282b7a20a125af49f1", + "Repeatability-First-Sent": "Fri, 14 Jul 2023 06:39:11 GMT", + "Repeatability-Request-ID": "ee1787a8-f945-4c05-b493-a72222d98701", + "traceparent": "00-cc8addadb706fd989eb4177a18718634-66b22d6a6bf3abc4-00", + "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "855808f7d4c3e169c74aa37948c6363c", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -83,238 +85,40 @@ }, "StatusCode": 202, "ResponseHeaders": { - "apim-request-id": "0e5092fb-964e-4c91-96a8-f131e6299252", + "apim-request-id": "abd1f68e-e887-4c42-923a-45968c1d3ed0", "Content-Length": "0", - "Date": "Mon, 06 Mar 2023 09:41:21 GMT", - "Operation-Location": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", + "Date": "Fri, 14 Jul 2023 06:39:12 GMT", + "operation-location": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs/ee1787a8-f945-4c05-b493-a72222d98701?api-version=2023-03-01-preview", + "repeatability-result": "accepted", "Retry-After": "1", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "666", + "x-ms-region": "West US 2" }, "ResponseBody": null }, { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", + "RequestUri": "https://srnagar-healthinsights.cognitiveservices.azure.com/healthinsights/trialmatcher/jobs/ee1787a8-f945-4c05-b493-a72222d98701?api-version=2023-03-01-preview", "RequestMethod": "GET", "RequestHeaders": { "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-6ef98d69d4be270b-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "69bca8efc1e7b48e32fdefdadda70174", + "traceparent": "00-cc8addadb706fd989eb4177a18718634-f634b7e4d90f9fcb-00", + "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230714.1 (.NET 6.0.20; Microsoft Windows 10.0.19045)", + "x-ms-client-request-id": "c5c79e828acd1d947997f0943a1d4e5c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { - "apim-request-id": "96ad52e7-1401-417c-8203-797af0fee2a2", - "Content-Length": "196", + "apim-request-id": "af7efc5e-8a34-4563-b6b9-a87f8234f72b", + "Content-Length": "7748", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:21 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-d7d1e7255d1f4d9f-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "1563dc5f8652fc6003be299073b5fdf1", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "335850dd-7faf-493e-9d4a-823b84a53394", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:23 GMT", - "Retry-After": "1", + "Date": "Fri, 14 Jul 2023 06:39:12 GMT", "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-299212fc45af51ce-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "9f87e1d8c6f5b09d641bd086a24dff83", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "4b13402d-10dd-48b6-86ea-9bf003a59869", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:24 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-67f86904c7f7a342-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "4841ac78334b689e47bf652898fd417d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "7bda5f52-8e4c-4865-9112-f9f5b9481df2", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:25 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-95bc5d819115e224-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "fb02feff6220997e3fb2b137b5da5ab6", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "2495bf2a-29ab-4c68-bac7-4a152f9f5c93", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:27 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-798f97e79d9e2320-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "c618a5beb473a4a5431e573660741767", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "2e493738-9f7c-468f-b689-b2a051013556", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:28 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-2247a9f48e26b75a-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "a38652da044b15632ea809988267b26d", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "aefa6d6e-2f15-458a-b346-597a69a6cd90", - "Content-Length": "196", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:29 GMT", - "Retry-After": "1", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" - }, - "ResponseBody": { - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:21Z", - "status": "running" - } - }, - { - "RequestUri": "https://sanitized.azure-api.net/healthinsights/trialmatcher/jobs/f91a9b0f-f6db-4f7d-af96-76ef29c951c1?api-version=2023-03-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-b5753b3715abc1be5cd6d493821ac8c8-a94aae3aec7548a4-00", - "User-Agent": "azsdk-net-Health.Insights.ClinicalMatching/1.0.0-alpha.20230302.1 (.NET 6.0.14; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "f26aaf657ae44a0a595db8010b4838cb", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "dcb1a529-22fd-4968-b255-624fc898ce90", - "Content-Length": "1029", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 06 Mar 2023 09:41:31 GMT", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "X-Content-Type-Options": "nosniff" + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "58", + "x-ms-region": "West US 2" }, "ResponseBody": { "results": { @@ -326,7 +130,36 @@ "type": "trialEligibility", "evidence": [ { - "eligibilityCriteriaEvidence": "Inclusion: Has a radiation therapy plan approved by the central radiation therapy quality assurance vendor", + "eligibilityCriteriaEvidence": "Exclusion: Has known active central nervous system metastases and/or carcinomatous meningitis", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT04165070", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Any history of primary brain or leptomeningeal disease , presence of symptomatic central nervous system metastases, or CNS metastases that require local treatment .", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: Measurable disease by RECIST v1.1 with at least one lesion not chosen for biopsy during the screening period that can be accurately measured at baseline with computed tomography or magnetic resonance imaging and that is suitable for accurate repeated measurements. A biopsied lesion should not be used as a target lesion for RECIST 1.1 tumor assessments. Previously irradiated lesions must have shown progression to be considered measurable.", "patientInfoEvidence": { "system": "http://www.nlm.nih.gov/research/umls", "code": "C1522449", @@ -336,7 +169,74 @@ "importance": 0.0 }, { - "eligibilityCriteriaEvidence": "Inclusion: Is able to receive SBRT and does not have an ultra-centrally located tumor", + "eligibilityCriteriaEvidence": "Inclusion: Adequate bone marrow function as assessed by the following laboratory tests to be conducted within 7 days before the first dose of study treatment: Platelets \u2265 100 \u00D7 10 ^ 9 cells / L.", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032181", + "name": "Platelet count", + "value": "250000" + }, + "importance": 0.0 + } + ], + "id": "NCT05099172", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Has known active central nervous system metastases and/or carcinomatous meningitis", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT04165798", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Inclusion: Last dose of previous anticancer therapy \u2265 21 days, radiotherapy \u003E 21 days, or surgical intervention \u003E 21 days prior to the first dose of T3011.", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + } + ], + "id": "NCT04370587", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Inclusion: Is able to receive SBRT and does not have an ultra - centrally located tumor", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: Has a radiation therapy plan approved by the central radiation therapy quality assurance vendor", "patientInfoEvidence": { "system": "http://www.nlm.nih.gov/research/umls", "code": "C1522449", @@ -350,25 +250,194 @@ "source": "Sanitized", "value": "Ineligible", "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Inclusion: PATIENT PRE-REGISTRATION ELIGIBILITY CRITERIA: No patients known to be pregnant or lactating, PATIENT REGISTRATION ELIGIBILITY CRITERIA: In order to allow for time for central genotyping and eligibility for the ALCHEMIST treatment trial, patients must register within the following eligibility windows: Non-squamous patients: If adjuvant chemotherapy and radiation, register patient within 285 days following surgery", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0032961", + "name": "Pregnancy", + "value": "false" + }, + "importance": 0.0 + }, + { + "eligibilityCriteriaEvidence": "Inclusion: PATIENT PRE-REGISTRATION ELIGIBILITY CRITERIA: No patients known to be pregnant or lactating, PATIENT REGISTRATION ELIGIBILITY CRITERIA: In order to allow for time for central genotyping and eligibility for the ALCHEMIST treatment trial, patients must register within the following eligibility windows: Non-squamous patients: If adjuvant chemotherapy and radiation, register patient within 285 days following surgery", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1522449", + "name": "Radiotherapy", + "value": "false" + }, + "importance": 0.0 + } + ], + "id": "NCT02194738", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Severe, active co-morbidity defined as follows: Unstable angina and/or congestive heart failure requiring hospitalization within the last 3 months", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT03811002", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "evidence": [ + { + "eligibilityCriteriaEvidence": "Exclusion: Has known active central nervous system metastases and/or carcinomatous meningitis", + "patientInfoEvidence": { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0002965", + "name": "Unstable Angina", + "value": "true" + }, + "importance": 0.0 + } + ], + "id": "NCT04165083", + "source": "Sanitized", + "value": "Ineligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04200963", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04267848", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04092283", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04476797", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT02716116", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT03767348", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04367311", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT03175224", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT02201992", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT04981119", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 + }, + { + "type": "trialEligibility", + "id": "NCT05215574", + "source": "Sanitized", + "value": "Eligible", + "confidenceScore": 0.0 } ], - "neededClinicalInfo": [] + "neededClinicalInfo": [ + { + "semanticType": "T093", + "category": "ExaminationName", + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1512162", + "name": "Eastern Cooperative Oncology Group", + "value": ";EntityType:ExaminationName" + }, + { + "semanticType": "T061", + "category": "TreatmentName", + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C1515119", + "name": "Systemic Therapy", + "value": ";EntityType:TreatmentName" + }, + { + "semanticType": "T191", + "category": "Diagnosis", + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0007131", + "name": "Non-Small Cell Lung Carcinoma", + "value": ";EntityType:Diagnosis" + } + ] } ], - "modelVersion": "2023.130.1.0", - "knowledgeGraphLastUpdateDate": "01/11/2023" + "modelVersion": "2023-03-01-preview", + "knowledgeGraphLastUpdateDate": "2023-05-22" }, - "jobId": "f91a9b0f-f6db-4f7d-af96-76ef29c951c1", - "createdDateTime": "2023-03-06T09:41:21Z", - "expirationDateTime": "2023-03-06T10:41:21Z", - "lastUpdateDateTime": "2023-03-06T09:41:30Z", + "jobId": "ee1787a8-f945-4c05-b493-a72222d98701", + "createdDateTime": "2023-07-14T06:39:11Z", + "expirationDateTime": "2023-07-15T06:39:11Z", + "lastUpdateDateTime": "2023-07-14T06:39:12Z", "status": "succeeded" } } ], "Variables": { "AZURE_HEALTH_INSIGHTS_API_KEY": "Sanitized", - "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://sanitized.azure-api.net/", - "RandomSeed": "1727651881" + "AZURE_HEALTH_INSIGHTS_ENDPOINT": "https://srnagar-healthinsights.cognitiveservices.azure.com/", + "RandomSeed": "508723084" } } diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/api/Azure.Analytics.Purview.Sharing.netstandard2.0.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/api/Azure.Analytics.Purview.Sharing.netstandard2.0.cs index d033b1dc250b..252538a0dc71 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/api/Azure.Analytics.Purview.Sharing.netstandard2.0.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/api/Azure.Analytics.Purview.Sharing.netstandard2.0.cs @@ -14,8 +14,8 @@ protected ReceivedSharesClient() { } public ReceivedSharesClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } public ReceivedSharesClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Purview.Sharing.PurviewShareClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response ActivateTenantEmailRegistration(Azure.Core.RequestContent content, string repeatabilityRequestId = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task ActivateTenantEmailRegistrationAsync(Azure.Core.RequestContent content, string repeatabilityRequestId = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ActivateTenantEmailRegistration(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ActivateTenantEmailRegistrationAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Operation CreateOrReplaceReceivedShare(Azure.WaitUntil waitUntil, string receivedShareId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrReplaceReceivedShareAsync(Azure.WaitUntil waitUntil, string receivedShareId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Operation DeleteReceivedShare(Azure.WaitUntil waitUntil, string receivedShareId, Azure.RequestContext context) { throw null; } @@ -26,8 +26,8 @@ public ReceivedSharesClient(System.Uri endpoint, Azure.Core.TokenCredential cred public virtual Azure.AsyncPageable GetAllDetachedReceivedSharesAsync(string filter, string orderby, Azure.RequestContext context) { throw null; } public virtual Azure.Response GetReceivedShare(string receivedShareId, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task GetReceivedShareAsync(string receivedShareId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response RegisterTenantEmailRegistration(string repeatabilityRequestId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task RegisterTenantEmailRegistrationAsync(string repeatabilityRequestId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response RegisterTenantEmailRegistration(Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task RegisterTenantEmailRegistrationAsync(Azure.RequestContext context) { throw null; } } public partial class SentSharesClient { @@ -51,8 +51,8 @@ public SentSharesClient(System.Uri endpoint, Azure.Core.TokenCredential credenti public virtual System.Threading.Tasks.Task GetSentShareAsync(string sentShareId, Azure.RequestContext context) { throw null; } public virtual Azure.Response GetSentShareInvitation(string sentShareId, string sentShareInvitationId, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task GetSentShareInvitationAsync(string sentShareId, string sentShareInvitationId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response NotifyUserSentShareInvitation(string sentShareId, string sentShareInvitationId, string repeatabilityRequestId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task NotifyUserSentShareInvitationAsync(string sentShareId, string sentShareInvitationId, string repeatabilityRequestId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response NotifyUserSentShareInvitation(string sentShareId, string sentShareInvitationId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task NotifyUserSentShareInvitationAsync(string sentShareId, string sentShareInvitationId, Azure.RequestContext context) { throw null; } } public partial class ShareResourcesClient { diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml index 51ee9a2e0536..06c28769105d 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/ReceivedSharesClient.xml @@ -35,9 +35,9 @@ Console.WriteLine(result.GetProperty("type").ToString()); ]]> - + -This sample shows how to call ActivateTenantEmailRegistrationAsync with required parameters and parse the result. +This sample shows how to call ActivateTenantEmailRegistrationAsync and parse the result. "); @@ -50,7 +50,7 @@ Response response = await client.ActivateTenantEmailRegistrationAsync(RequestCon JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ActivateTenantEmailRegistrationAsync with all parameters and request content, and how to parse the result. +This sample shows how to call ActivateTenantEmailRegistrationAsync with all request content, and how to parse the result. "); @@ -62,7 +62,7 @@ var data = new { }, }; -Response response = await client.ActivateTenantEmailRegistrationAsync(RequestContent.Create(data), ""); +Response response = await client.ActivateTenantEmailRegistrationAsync(RequestContent.Create(data)); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); @@ -76,9 +76,9 @@ Console.WriteLine(result.GetProperty("type").ToString()); ]]> - + -This sample shows how to call ActivateTenantEmailRegistration with required parameters and parse the result. +This sample shows how to call ActivateTenantEmailRegistration and parse the result. "); @@ -91,7 +91,7 @@ Response response = client.ActivateTenantEmailRegistration(RequestContent.Create JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); ]]> -This sample shows how to call ActivateTenantEmailRegistration with all parameters and request content, and how to parse the result. +This sample shows how to call ActivateTenantEmailRegistration with all request content, and how to parse the result. "); @@ -103,7 +103,7 @@ var data = new { }, }; -Response response = client.ActivateTenantEmailRegistration(RequestContent.Create(data), ""); +Response response = client.ActivateTenantEmailRegistration(RequestContent.Create(data)); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); @@ -117,7 +117,7 @@ Console.WriteLine(result.GetProperty("type").ToString()); ]]> - + This sample shows how to call RegisterTenantEmailRegistrationAsync with required parameters and parse the result. "); var client = new ReceivedSharesClient(endpoint, credential); -Response response = await client.RegisterTenantEmailRegistrationAsync("", new RequestContext()); +Response response = await client.RegisterTenantEmailRegistrationAsync(new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); @@ -139,7 +139,7 @@ Console.WriteLine(result.GetProperty("type").ToString()); ]]> - + This sample shows how to call RegisterTenantEmailRegistration with required parameters and parse the result. "); var client = new ReceivedSharesClient(endpoint, credential); -Response response = client.RegisterTenantEmailRegistration("", new RequestContext()); +Response response = client.RegisterTenantEmailRegistration(new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml index 94364ee5e2f6..59711bb32641 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/Docs/SentSharesClient.xml @@ -163,7 +163,7 @@ Console.WriteLine(result.GetProperty("type").ToString()); ]]> - + This sample shows how to call NotifyUserSentShareInvitationAsync with required parameters and parse the result. "); var client = new SentSharesClient(endpoint, credential); -Response response = await client.NotifyUserSentShareInvitationAsync("", "", "", new RequestContext()); +Response response = await client.NotifyUserSentShareInvitationAsync("", "", new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); @@ -180,7 +180,7 @@ Console.WriteLine(result.GetProperty("type").ToString()); ]]> - + This sample shows how to call NotifyUserSentShareInvitation with required parameters and parse the result. "); var client = new SentSharesClient(endpoint, credential); -Response response = client.NotifyUserSentShareInvitation("", "", "", new RequestContext()); +Response response = client.NotifyUserSentShareInvitation("", "", new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/ReceivedSharesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/ReceivedSharesClient.cs index 942d74fc720b..0a4e25f749f9 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/ReceivedSharesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/ReceivedSharesClient.cs @@ -141,13 +141,12 @@ public virtual Response GetReceivedShare(string receivedShareId, RequestContext /// /// /// The content to send as the body of the request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task ActivateTenantEmailRegistrationAsync(RequestContent content, string repeatabilityRequestId = null, RequestContext context = null) + /// + public virtual async Task ActivateTenantEmailRegistrationAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -155,7 +154,7 @@ public virtual async Task ActivateTenantEmailRegistrationAsync(Request scope.Start(); try { - using HttpMessage message = CreateActivateTenantEmailRegistrationRequest(content, repeatabilityRequestId, context); + using HttpMessage message = CreateActivateTenantEmailRegistrationRequest(content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -176,13 +175,12 @@ public virtual async Task ActivateTenantEmailRegistrationAsync(Request /// /// /// The content to send as the body of the request. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response ActivateTenantEmailRegistration(RequestContent content, string repeatabilityRequestId = null, RequestContext context = null) + /// + public virtual Response ActivateTenantEmailRegistration(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -190,7 +188,7 @@ public virtual Response ActivateTenantEmailRegistration(RequestContent content, scope.Start(); try { - using HttpMessage message = CreateActivateTenantEmailRegistrationRequest(content, repeatabilityRequestId, context); + using HttpMessage message = CreateActivateTenantEmailRegistrationRequest(content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -210,18 +208,17 @@ public virtual Response ActivateTenantEmailRegistration(RequestContent content, /// /// /// - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task RegisterTenantEmailRegistrationAsync(string repeatabilityRequestId, RequestContext context) + /// + public virtual async Task RegisterTenantEmailRegistrationAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("ReceivedSharesClient.RegisterTenantEmailRegistration"); scope.Start(); try { - using HttpMessage message = CreateRegisterTenantEmailRegistrationRequest(repeatabilityRequestId, context); + using HttpMessage message = CreateRegisterTenantEmailRegistrationRequest(context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -241,18 +238,17 @@ public virtual async Task RegisterTenantEmailRegistrationAsync(string /// /// /// - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response RegisterTenantEmailRegistration(string repeatabilityRequestId, RequestContext context) + /// + public virtual Response RegisterTenantEmailRegistration(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("ReceivedSharesClient.RegisterTenantEmailRegistration"); scope.Start(); try { - using HttpMessage message = CreateRegisterTenantEmailRegistrationRequest(repeatabilityRequestId, context); + using HttpMessage message = CreateRegisterTenantEmailRegistrationRequest(context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -602,7 +598,7 @@ internal HttpMessage CreateGetAllDetachedReceivedSharesRequest(string filter, st return message; } - internal HttpMessage CreateActivateTenantEmailRegistrationRequest(RequestContent content, string repeatabilityRequestId, RequestContext context) + internal HttpMessage CreateActivateTenantEmailRegistrationRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -613,16 +609,13 @@ internal HttpMessage CreateActivateTenantEmailRegistrationRequest(RequestContent uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (repeatabilityRequestId != null) - { - request.Headers.Add("repeatability-request-id", repeatabilityRequestId); - } + request.Headers.Add("repeatability-request-id", Guid.NewGuid()); request.Headers.Add("Content-Type", "application/json"); request.Content = content; return message; } - internal HttpMessage CreateRegisterTenantEmailRegistrationRequest(string repeatabilityRequestId, RequestContext context) + internal HttpMessage CreateRegisterTenantEmailRegistrationRequest(RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -633,10 +626,7 @@ internal HttpMessage CreateRegisterTenantEmailRegistrationRequest(string repeata uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (repeatabilityRequestId != null) - { - request.Headers.Add("repeatability-request-id", repeatabilityRequestId); - } + request.Headers.Add("repeatability-request-id", Guid.NewGuid()); return message; } diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/SentSharesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/SentSharesClient.cs index 6d630ac1cdf0..96e147755c92 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/SentSharesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/Generated/SentSharesClient.cs @@ -294,14 +294,13 @@ public virtual Response CreateSentShareInvitation(string sentShareId, string sen /// /// Id of the sent share. /// Id of the sent share invitation. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual async Task NotifyUserSentShareInvitationAsync(string sentShareId, string sentShareInvitationId, string repeatabilityRequestId, RequestContext context) + /// + public virtual async Task NotifyUserSentShareInvitationAsync(string sentShareId, string sentShareInvitationId, RequestContext context) { Argument.AssertNotNullOrEmpty(sentShareId, nameof(sentShareId)); Argument.AssertNotNullOrEmpty(sentShareInvitationId, nameof(sentShareInvitationId)); @@ -310,7 +309,7 @@ public virtual async Task NotifyUserSentShareInvitationAsync(string se scope.Start(); try { - using HttpMessage message = CreateNotifyUserSentShareInvitationRequest(sentShareId, sentShareInvitationId, repeatabilityRequestId, context); + using HttpMessage message = CreateNotifyUserSentShareInvitationRequest(sentShareId, sentShareInvitationId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -332,14 +331,13 @@ public virtual async Task NotifyUserSentShareInvitationAsync(string se /// /// Id of the sent share. /// Id of the sent share invitation. - /// If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// or is null. /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// - public virtual Response NotifyUserSentShareInvitation(string sentShareId, string sentShareInvitationId, string repeatabilityRequestId, RequestContext context) + /// + public virtual Response NotifyUserSentShareInvitation(string sentShareId, string sentShareInvitationId, RequestContext context) { Argument.AssertNotNullOrEmpty(sentShareId, nameof(sentShareId)); Argument.AssertNotNullOrEmpty(sentShareInvitationId, nameof(sentShareInvitationId)); @@ -348,7 +346,7 @@ public virtual Response NotifyUserSentShareInvitation(string sentShareId, string scope.Start(); try { - using HttpMessage message = CreateNotifyUserSentShareInvitationRequest(sentShareId, sentShareInvitationId, repeatabilityRequestId, context); + using HttpMessage message = CreateNotifyUserSentShareInvitationRequest(sentShareId, sentShareInvitationId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -839,7 +837,7 @@ internal HttpMessage CreateDeleteSentShareInvitationRequest(string sentShareId, return message; } - internal HttpMessage CreateNotifyUserSentShareInvitationRequest(string sentShareId, string sentShareInvitationId, string repeatabilityRequestId, RequestContext context) + internal HttpMessage CreateNotifyUserSentShareInvitationRequest(string sentShareId, string sentShareInvitationId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -854,10 +852,7 @@ internal HttpMessage CreateNotifyUserSentShareInvitationRequest(string sentShare uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (repeatabilityRequestId != null) - { - request.Headers.Add("repeatability-request-id", repeatabilityRequestId); - } + request.Headers.Add("repeatability-request-id", Guid.NewGuid()); return message; } diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs index 3e28921952df..4114ea1ab3be 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_ReceivedSharesClient.cs @@ -113,7 +113,7 @@ public void Example_ActivateTenantEmailRegistration_AllParameters() }, }; - Response response = client.ActivateTenantEmailRegistration(RequestContent.Create(data), ""); + Response response = client.ActivateTenantEmailRegistration(RequestContent.Create(data)); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); @@ -158,7 +158,7 @@ public async Task Example_ActivateTenantEmailRegistration_AllParameters_Async() }, }; - Response response = await client.ActivateTenantEmailRegistrationAsync(RequestContent.Create(data), ""); + Response response = await client.ActivateTenantEmailRegistrationAsync(RequestContent.Create(data)); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); @@ -179,7 +179,7 @@ public void Example_RegisterTenantEmailRegistration() var endpoint = new Uri(""); var client = new ReceivedSharesClient(endpoint, credential); - Response response = client.RegisterTenantEmailRegistration("", new RequestContext()); + Response response = client.RegisterTenantEmailRegistration(new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -193,7 +193,7 @@ public void Example_RegisterTenantEmailRegistration_AllParameters() var endpoint = new Uri(""); var client = new ReceivedSharesClient(endpoint, credential); - Response response = client.RegisterTenantEmailRegistration("", new RequestContext()); + Response response = client.RegisterTenantEmailRegistration(new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); @@ -214,7 +214,7 @@ public async Task Example_RegisterTenantEmailRegistration_Async() var endpoint = new Uri(""); var client = new ReceivedSharesClient(endpoint, credential); - Response response = await client.RegisterTenantEmailRegistrationAsync("", new RequestContext()); + Response response = await client.RegisterTenantEmailRegistrationAsync(new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -228,7 +228,7 @@ public async Task Example_RegisterTenantEmailRegistration_AllParameters_Async() var endpoint = new Uri(""); var client = new ReceivedSharesClient(endpoint, credential); - Response response = await client.RegisterTenantEmailRegistrationAsync("", new RequestContext()); + Response response = await client.RegisterTenantEmailRegistrationAsync(new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("properties").GetProperty("activationCode").ToString()); diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs index 7ddcdf1666fa..7e48a61a61d0 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/tests/Generated/Samples/Samples_SentSharesClient.cs @@ -257,7 +257,7 @@ public void Example_NotifyUserSentShareInvitation() var endpoint = new Uri(""); var client = new SentSharesClient(endpoint, credential); - Response response = client.NotifyUserSentShareInvitation("", "", "", new RequestContext()); + Response response = client.NotifyUserSentShareInvitation("", "", new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); @@ -272,7 +272,7 @@ public void Example_NotifyUserSentShareInvitation_AllParameters() var endpoint = new Uri(""); var client = new SentSharesClient(endpoint, credential); - Response response = client.NotifyUserSentShareInvitation("", "", "", new RequestContext()); + Response response = client.NotifyUserSentShareInvitation("", "", new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); @@ -288,7 +288,7 @@ public async Task Example_NotifyUserSentShareInvitation_Async() var endpoint = new Uri(""); var client = new SentSharesClient(endpoint, credential); - Response response = await client.NotifyUserSentShareInvitationAsync("", "", "", new RequestContext()); + Response response = await client.NotifyUserSentShareInvitationAsync("", "", new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString()); @@ -303,7 +303,7 @@ public async Task Example_NotifyUserSentShareInvitation_AllParameters_Async() var endpoint = new Uri(""); var client = new SentSharesClient(endpoint, credential); - Response response = await client.NotifyUserSentShareInvitationAsync("", "", "", new RequestContext()); + Response response = await client.NotifyUserSentShareInvitationAsync("", "", new RequestContext()); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invitationKind").ToString());