Skip to content

Commit 48647f1

Browse files
add kind property to deserializer logic (Azure#31627)
* add kind property to deserialiser logic and tests
1 parent c3a94f5 commit 48647f1

17 files changed

+291
-77
lines changed

sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CommunicationIdentifierModel.Serialization.cs

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CommunicationIdentifierModel.cs

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
using Azure.Core;
55

6-
namespace Azure.Communication.CallingServer
6+
namespace Azure.Communication
77
{
88
[CodeGenModel("CommunicationIdentifierModelKind")]
9-
internal readonly partial struct CommunicationIdentifierModelKindInternal
9+
internal readonly partial struct CommunicationIdentifierModelKind
1010
{
1111
}
1212
}

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/CommunicationIdentifierModel.Serialization.cs

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/CommunicationIdentifierModel.cs

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
using Azure.Core;
55

6-
namespace Azure.Communication.CallAutomation
6+
namespace Azure.Communication
77
{
88
[CodeGenModel("CommunicationIdentifierModelKind")]
9-
internal readonly partial struct CommunicationIdentifierModelKindInternal
9+
internal readonly partial struct CommunicationIdentifierModelKind
1010
{
1111
}
1212
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4+
// This is a temporary solution.
5+
// Please remove this code when swagger is updated to support `kind` property: https://github.com/Azure/azure-rest-api-specs/pull/19675
46
using Azure.Core;
57

68
namespace Azure.Communication
79
{
810
[CodeGenModel("CommunicationIdentifierModel")]
911
internal partial class CommunicationIdentifierModel
1012
{
13+
/// <summary> Type of CommunicationIdentifierModel. </summary>
14+
public CommunicationIdentifierModelKind? Kind { get; set; }
15+
16+
public CommunicationIdentifierModel(string rawId, CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, CommunicationIdentifierModelKind? kind)
17+
: this(rawId, communicationUser, phoneNumber, microsoftTeamsUser)
18+
{
19+
Kind = kind;
20+
}
1121
}
1222
}

0 commit comments

Comments
 (0)