Skip to content

Commit

Permalink
Juntuchen/callback uri override (#37652)
Browse files Browse the repository at this point in the history
* added logic to pass callbackUri override

* updated api

* Update autorest.md

* Update autorest.md
  • Loading branch information
juntuchen-msft authored Jul 18, 2023
1 parent 4000920 commit 0782ff3
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ internal AddParticipantFailed() { }
public partial class AddParticipantOptions
{
public AddParticipantOptions(Azure.Communication.CallAutomation.CallInvite participantToAdd) { }
public string CallbackUriOverride { get { throw null; } set { } }
public int? InvitationTimeoutInSeconds { get { throw null; } set { } }
public string OperationContext { get { throw null; } set { } }
public Azure.Communication.CallAutomation.CallInvite ParticipantToAdd { get { throw null; } }
Expand Down Expand Up @@ -1127,6 +1128,7 @@ internal RemoveParticipantFailed() { }
public partial class RemoveParticipantOptions
{
public RemoveParticipantOptions(Azure.Communication.CommunicationIdentifier participantToRemove) { }
public string CallbackUriOverride { get { throw null; } set { } }
public string OperationContext { get { throw null; } set { } }
public Azure.Communication.CommunicationIdentifier ParticipantToRemove { get { throw null; } }
}
Expand Down Expand Up @@ -1275,6 +1277,7 @@ public partial class TransferToParticipantOptions
public TransferToParticipantOptions(Azure.Communication.CommunicationUserIdentifier targetIdentity) { }
public TransferToParticipantOptions(Azure.Communication.MicrosoftTeamsUserIdentifier targetIdentity) { }
public TransferToParticipantOptions(Azure.Communication.PhoneNumberIdentifier targetPhoneNumberIdentity) { }
public string CallbackUriOverride { get { throw null; } set { } }
public Azure.Communication.CallAutomation.CustomContext CustomContext { get { throw null; } }
public string OperationContext { get { throw null; } set { } }
public Azure.Communication.CommunicationIdentifier Target { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private static TransferToParticipantRequestInternal CreateTransferToParticipantR
{
request.OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext;
}

request.CallbackUriOverride = options.CallbackUriOverride;
return request;
}

Expand Down Expand Up @@ -442,7 +442,7 @@ private static AddParticipantRequestInternal CreateAddParticipantRequest(AddPart
{
request.InvitationTimeoutInSeconds = options.InvitationTimeoutInSeconds;
}

request.CallbackUriOverride = options.CallbackUriOverride;
request.CustomContext = new CustomContextInternal(
options.ParticipantToAdd.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary<string, string>() : options.ParticipantToAdd.CustomContext.SipHeaders,
options.ParticipantToAdd.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary<string, string>() : options.ParticipantToAdd.CustomContext.VoipHeaders);
Expand Down Expand Up @@ -599,7 +599,7 @@ public virtual async Task<Response<RemoveParticipantResult>> RemoveParticipantAs
{
request.OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext;
}

request.CallbackUriOverride = options.CallbackUriOverride;
var response = await RestClient.RemoveParticipantAsync(
CallConnectionId,
request,
Expand Down Expand Up @@ -660,7 +660,7 @@ public virtual Response<RemoveParticipantResult> RemoveParticipant(RemovePartici
{
options.OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext;
}

request.CallbackUriOverride = options.CallbackUriOverride;
var response = RestClient.RemoveParticipant(
CallConnectionId,
request,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,10 @@ public AddParticipantOptions(CallInvite participantToAdd)
/// The maximum value is 180 seconds.
/// </summary>
public int? InvitationTimeoutInSeconds { get; set; }

/// <summary>
/// The callback URI override for this transfer call request.
/// </summary>
public string CallbackUriOverride { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@ public RemoveParticipantOptions(CommunicationIdentifier participantToRemove)
/// The operation context.
/// </summary>
public string OperationContext { get; set; }

/// <summary>
/// The callback URI override for this transfer call request.
/// </summary>
public string CallbackUriOverride { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@ public TransferToParticipantOptions(MicrosoftTeamsUserIdentifier targetIdentity)
/// The Custom Context which contains SIP and voip headers
/// </summary>
public CustomContext CustomContext { get; }

/// <summary>
/// The callback URI override for this transfer call request.
/// </summary>
public string CallbackUriOverride { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model-namespace: false
tag: package-2023-01-15-preview

require:
- https://github.com/williamzhao87/azure-rest-api-specs/blob/e8612807fcc6148904e2ee316a2086a1db74f71c/specification/communication/data-plane/CallAutomation/readme.md
- https://github.com/juntuchen-msft/azure-rest-api-specs/blob/502207255f635c3658b27fbea5f8c3748b273aff/specification/communication/data-plane/CallAutomation/readme.md

title: Azure Communication Services

Expand Down

0 comments on commit 0782ff3

Please sign in to comment.