Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update based on latest swagger #34197

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ private CreateCallRequestInternal CreateCallRequest(CreateCallOptions options)
? null
: new PhoneNumberIdentifierModel(options?.CallInvite?.SourceCallerIdNumber?.PhoneNumber),
SourceDisplayName = options?.CallInvite?.SourceDisplayName,
SourceIdentity = CommunicationIdentifierSerializer.Serialize(Source),
SourceIdentity = Source == null ? null : CommunicationIdentifierSerializer.Serialize(Source),
};
// Add custom cognitive service domain name
if (options.AzureCognitiveServicesEndpointUrl != null)
Expand Down Expand Up @@ -704,7 +704,7 @@ public virtual CallConnection GetCallConnection(string callConnectionId)
scope.Start();
try
{
return new CallConnection(callConnectionId, CallConnectionRestClient, CallMediaRestClient, _clientDiagnostics, EventProcessor, Source);
return new CallConnection(callConnectionId, CallConnectionRestClient, CallMediaRestClient, _clientDiagnostics, EventProcessor);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@ public class CallConnection
internal CallConnectionRestClient RestClient { get; }
internal CallMediaRestClient CallMediaRestClient { get; }
internal EventProcessor EventProcessor { get; }
internal CommunicationUserIdentifier Source { get; }

/// <summary>
/// The call connection id.
/// </summary>
public virtual string CallConnectionId { get; internal set; }

internal CallConnection(string callConnectionId, CallConnectionRestClient callConnectionRestClient, CallMediaRestClient callCallMediaRestClient, ClientDiagnostics clientDiagnostics, EventProcessor eventProcessor, CommunicationUserIdentifier source = null)
internal CallConnection(string callConnectionId, CallConnectionRestClient callConnectionRestClient, CallMediaRestClient callCallMediaRestClient, ClientDiagnostics clientDiagnostics, EventProcessor eventProcessor)
{
CallConnectionId = callConnectionId;
RestClient = callConnectionRestClient;
CallMediaRestClient = callCallMediaRestClient;
_clientDiagnostics = clientDiagnostics;
EventProcessor = eventProcessor;
Source = source;
}

/// <summary>Initializes a new instance of <see cref="CallConnection"/> for mocking.</summary>
Expand Down Expand Up @@ -416,7 +414,7 @@ public virtual Response<AddParticipantResult> AddParticipant(AddParticipantOptio
}
}

private AddParticipantRequestInternal CreateAddParticipantRequest(AddParticipantOptions options)
private static AddParticipantRequestInternal CreateAddParticipantRequest(AddParticipantOptions options)
{
// validate ParticipantToAdd is not null
Argument.AssertNotNull(options.ParticipantToAdd, nameof(options.ParticipantToAdd));
Expand All @@ -427,7 +425,6 @@ private AddParticipantRequestInternal CreateAddParticipantRequest(AddParticipant
? null
: new PhoneNumberIdentifierModel(options.ParticipantToAdd.SourceCallerIdNumber.PhoneNumber),
SourceDisplayName = options.ParticipantToAdd.SourceDisplayName,
SourceIdentity = Source == null ? null : CommunicationIdentifierSerializer.Serialize(Source),
OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext
};

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.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tag: package-2023-01-15-preview
model-namespace: false

require:
- https://github.com/williamzhao87/azure-rest-api-specs/blob/cb2cd38aa4a7258e59a912edbb21a21468fb9c6f/specification/communication/data-plane/CallAutomation/readme.md
- https://github.com/williamzhao87/azure-rest-api-specs/blob/0d0cd5af40aa17af76ce0307ac5512351c38e3bc/specification/communication/data-plane/CallAutomation/readme.md
title: Azure Communication Services

generation1-convenience-client: true
Expand Down