diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Azure.Communication.ProgrammableConnectivity.sln b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Azure.Communication.ProgrammableConnectivity.sln
new file mode 100644
index 0000000000000..fc1ee5156b11c
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Azure.Communication.ProgrammableConnectivity.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Communication.ProgrammableConnectivity", "src\Azure.Communication.ProgrammableConnectivity.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Communication.ProgrammableConnectivity.Tests", "tests\Azure.Communication.ProgrammableConnectivity.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/CHANGELOG.md b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/CHANGELOG.md
new file mode 100644
index 0000000000000..13dd08af78abe
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Directory.Build.props b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Directory.Build.props
new file mode 100644
index 0000000000000..63bd836ad44b7
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.md b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.md
new file mode 100644
index 0000000000000..4800bd72defb9
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.md
@@ -0,0 +1,86 @@
+# Azure.Communication.ProgrammableConnectivity client library for .NET
+
+Azure.Communication.ProgrammableConnectivity is a managed service that helps developers get secret simply and securely.
+
+Use the client library for to:
+
+* [Get secret](https://docs.microsoft.com/azure)
+
+[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples]
+
+ [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure)
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository.
+
+Install the client library for .NET with [NuGet](https://www.nuget.org/ ):
+
+```dotnetcli
+dotnet add package Azure.Communication.ProgrammableConnectivity --prerelease
+```
+
+### Prerequisites
+
+Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of:
+
+### Thread safety
+
+We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
+
+### Additional concepts
+
+[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
+[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
+[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
+[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
+[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
+[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
+[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
+
+
+## Examples
+
+You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/samples).
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/README.png)
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs
new file mode 100644
index 0000000000000..4a281cd0e3eb9
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs
@@ -0,0 +1,241 @@
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public static partial class CommunicationProgrammableConnectivityModelFactory
+ {
+ public static Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationResult DeviceLocationVerificationResult(bool verificationResult = false) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.NetworkRetrievalResult NetworkRetrievalResult(string networkCode = null) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.NumberRetrievalResult NumberRetrievalResult(string phoneNumber = null) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.NumberVerificationContent NumberVerificationContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier = null, string phoneNumber = null, string hashedPhoneNumber = null) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.NumberVerificationResult NumberVerificationResult(bool verificationResult = false) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent SimSwapRetrievalContent(string phoneNumber = null, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier = null) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalResult SimSwapRetrievalResult(System.DateTimeOffset date = default(System.DateTimeOffset)) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent SimSwapVerificationContent(string phoneNumber = null, int? maxAgeHours = default(int?), Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier = null) { throw null; }
+ public static Azure.Communication.ProgrammableConnectivity.SimSwapVerificationResult SimSwapVerificationResult(bool verificationResult = false) { throw null; }
+ }
+ public partial class DeviceLocation
+ {
+ protected DeviceLocation() { }
+ public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
+ public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent deviceLocationVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent deviceLocationVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ }
+ public partial class DeviceLocationVerificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public DeviceLocationVerificationContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, double latitude, double longitude, int accuracy, Azure.Communication.ProgrammableConnectivity.LocationDevice locationDevice) { }
+ public int Accuracy { get { throw null; } }
+ public double Latitude { get { throw null; } }
+ public Azure.Communication.ProgrammableConnectivity.LocationDevice LocationDevice { get { throw null; } }
+ public double Longitude { get { throw null; } }
+ public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DeviceLocationVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal DeviceLocationVerificationResult() { }
+ public bool VerificationResult { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DeviceNetwork
+ {
+ protected DeviceNetwork() { }
+ public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
+ public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ }
+ public partial class Ipv4Address : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public Ipv4Address(string ipv4, int port) { }
+ public string Ipv4 { get { throw null; } }
+ public int Port { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.Ipv4Address System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.Ipv4Address System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class Ipv6Address : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public Ipv6Address(string ipv6, int port) { }
+ public string Ipv6 { get { throw null; } }
+ public int Port { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.Ipv6Address System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.Ipv6Address System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class LocationDevice : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public LocationDevice() { }
+ public Azure.Communication.ProgrammableConnectivity.Ipv4Address Ipv4Address { get { throw null; } set { } }
+ public Azure.Communication.ProgrammableConnectivity.Ipv6Address Ipv6Address { get { throw null; } set { } }
+ public string NetworkAccessIdentifier { get { throw null; } set { } }
+ public string PhoneNumber { get { throw null; } set { } }
+ Azure.Communication.ProgrammableConnectivity.LocationDevice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.LocationDevice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class NetworkIdentifier : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public NetworkIdentifier(string identifierType, string identifier) { }
+ public string Identifier { get { throw null; } }
+ public string IdentifierType { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.NetworkIdentifier System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.NetworkIdentifier System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class NetworkRetrievalResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal NetworkRetrievalResult() { }
+ public string NetworkCode { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.NetworkRetrievalResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.NetworkRetrievalResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class NumberRetrievalResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal NumberRetrievalResult() { }
+ public string PhoneNumber { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.NumberRetrievalResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.NumberRetrievalResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class NumberVerification
+ {
+ protected NumberVerification() { }
+ public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
+ public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationContent numberVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationContent numberVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ }
+ public partial class NumberVerificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public NumberVerificationContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier) { }
+ public string HashedPhoneNumber { get { throw null; } set { } }
+ public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } }
+ public string PhoneNumber { get { throw null; } set { } }
+ Azure.Communication.ProgrammableConnectivity.NumberVerificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.NumberVerificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class NumberVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal NumberVerificationResult() { }
+ public bool VerificationResult { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.NumberVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.NumberVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class ProgrammableConnectivityClient
+ {
+ protected ProgrammableConnectivityClient() { }
+ public ProgrammableConnectivityClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { }
+ public ProgrammableConnectivityClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Communication.ProgrammableConnectivity.ProgrammableConnectivityClientOptions options) { }
+ public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
+ public virtual Azure.Communication.ProgrammableConnectivity.DeviceLocation GetDeviceLocationClient(string apiVersion = "v2024_01_09_preview") { throw null; }
+ public virtual Azure.Communication.ProgrammableConnectivity.DeviceNetwork GetDeviceNetworkClient(string apiVersion = "v2024_01_09_preview") { throw null; }
+ public virtual Azure.Communication.ProgrammableConnectivity.NumberVerification GetNumberVerificationClient(string apiVersion = "v2024_01_09_preview") { throw null; }
+ public virtual Azure.Communication.ProgrammableConnectivity.SimSwap GetSimSwapClient(string apiVersion = "v2024_01_09_preview") { throw null; }
+ }
+ public partial class ProgrammableConnectivityClientOptions : Azure.Core.ClientOptions
+ {
+ public ProgrammableConnectivityClientOptions(Azure.Communication.ProgrammableConnectivity.ProgrammableConnectivityClientOptions.ServiceVersion version = Azure.Communication.ProgrammableConnectivity.ProgrammableConnectivityClientOptions.ServiceVersion.V2024_01_09_Preview) { }
+ public enum ServiceVersion
+ {
+ V2024_01_09_Preview = 1,
+ }
+ }
+ public partial class SimSwap
+ {
+ protected SimSwap() { }
+ public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
+ public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent simSwapRetrievalContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent simSwapRetrievalContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent simSwapVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent simSwapVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ }
+ public partial class SimSwapRetrievalContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public SimSwapRetrievalContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier) { }
+ public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } }
+ public string PhoneNumber { get { throw null; } set { } }
+ Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class SimSwapRetrievalResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal SimSwapRetrievalResult() { }
+ public System.DateTimeOffset Date { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class SimSwapVerificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public SimSwapVerificationContent(Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier) { }
+ public int? MaxAgeHours { get { throw null; } set { } }
+ public Azure.Communication.ProgrammableConnectivity.NetworkIdentifier NetworkIdentifier { get { throw null; } }
+ public string PhoneNumber { get { throw null; } set { } }
+ Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class SimSwapVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal SimSwapVerificationResult() { }
+ public bool VerificationResult { get { throw null; } }
+ Azure.Communication.ProgrammableConnectivity.SimSwapVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.Communication.ProgrammableConnectivity.SimSwapVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+}
+namespace Microsoft.Extensions.Azure
+{
+ public static partial class CommunicationProgrammableConnectivityClientBuilderExtensions
+ {
+ public static Azure.Core.Extensions.IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; }
+ public static Azure.Core.Extensions.IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Azure.Communication.ProgrammableConnectivity.csproj b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Azure.Communication.ProgrammableConnectivity.csproj
new file mode 100644
index 0000000000000..c3ece2ddf8eab
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Azure.Communication.ProgrammableConnectivity.csproj
@@ -0,0 +1,20 @@
+
+
+ This is the Azure.Communication.ProgrammableConnectivity client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.Communication.ProgrammableConnectivity for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.Communication.ProgrammableConnectivity
+ $(RequiredTargetFrameworks)
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityClientBuilderExtensions.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityClientBuilderExtensions.cs
new file mode 100644
index 0000000000000..e5e56416b03cc
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityClientBuilderExtensions.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Communication.ProgrammableConnectivity;
+using Azure.Core.Extensions;
+
+namespace Microsoft.Extensions.Azure
+{
+ /// Extension methods to add to client builder.
+ public static partial class CommunicationProgrammableConnectivityClientBuilderExtensions
+ {
+ /// Registers a instance.
+ /// The builder to register with.
+ /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com.
+ public static IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, Uri endpoint)
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
+ {
+ return builder.RegisterClientFactory((options, cred) => new ProgrammableConnectivityClient(endpoint, cred, options));
+ }
+
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The configuration values.
+ public static IAzureClientBuilder AddProgrammableConnectivityClient(this TBuilder builder, TConfiguration configuration)
+ where TBuilder : IAzureClientFactoryBuilderWithConfiguration
+ {
+ return builder.RegisterClientFactory(configuration);
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityModelFactory.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityModelFactory.cs
new file mode 100644
index 0000000000000..e758876193eda
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/CommunicationProgrammableConnectivityModelFactory.cs
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Azure;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// Model factory for models.
+ public static partial class CommunicationProgrammableConnectivityModelFactory
+ {
+ /// Initializes a new instance of .
+ /// True if the location is in the specified area, False otherwise.
+ /// A new instance for mocking.
+ public static DeviceLocationVerificationResult DeviceLocationVerificationResult(bool verificationResult = default)
+ {
+ return new DeviceLocationVerificationResult(verificationResult, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier for the network. This can be used as the networkIdentifier for the service APIs.
+ /// A new instance for mocking.
+ public static NetworkRetrievalResult NetworkRetrievalResult(string networkCode = null)
+ {
+ return new NetworkRetrievalResult(networkCode, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Identifier for the network to query for this device.
+ /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'.
+ /// Hashed phone number. SHA-256 (in hexadecimal representation) of the mobile phone number in **E.164 format (starting with country code)**. Optionally prefixed with '+'.
+ /// A new instance for mocking.
+ public static NumberVerificationContent NumberVerificationContent(NetworkIdentifier networkIdentifier = null, string phoneNumber = null, string hashedPhoneNumber = null)
+ {
+ return new NumberVerificationContent(networkIdentifier, phoneNumber, hashedPhoneNumber, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// True if number if the phone number matches the device, False otherwise.
+ /// A new instance for mocking.
+ public static NumberVerificationResult NumberVerificationResult(bool verificationResult = default)
+ {
+ return new NumberVerificationResult(verificationResult, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'.
+ /// A new instance for mocking.
+ public static NumberRetrievalResult NumberRetrievalResult(string phoneNumber = null)
+ {
+ return new NumberRetrievalResult(phoneNumber, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'.
+ /// Network to query for this device.
+ /// A new instance for mocking.
+ public static SimSwapRetrievalContent SimSwapRetrievalContent(string phoneNumber = null, NetworkIdentifier networkIdentifier = null)
+ {
+ return new SimSwapRetrievalContent(phoneNumber, networkIdentifier, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Datetime of most recent swap for SIM.
+ /// A new instance for mocking.
+ public static SimSwapRetrievalResult SimSwapRetrievalResult(DateTimeOffset date = default)
+ {
+ return new SimSwapRetrievalResult(date, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'.
+ /// Maximum lookback for SimSwap verification.
+ /// Identifier for the network to query for this device.
+ /// A new instance for mocking.
+ public static SimSwapVerificationContent SimSwapVerificationContent(string phoneNumber = null, int? maxAgeHours = null, NetworkIdentifier networkIdentifier = null)
+ {
+ return new SimSwapVerificationContent(phoneNumber, maxAgeHours, networkIdentifier, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// True if the SIM has swapped in the specified period, False otherwise.
+ /// A new instance for mocking.
+ public static SimSwapVerificationResult SimSwapVerificationResult(bool verificationResult = default)
+ {
+ return new SimSwapVerificationResult(verificationResult, serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs
new file mode 100644
index 0000000000000..3ecf3cc2d1062
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs
@@ -0,0 +1,200 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ // Data plane generated sub-client.
+ /// The DeviceLocation sub-client.
+ public partial class DeviceLocation
+ {
+ private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" };
+ private readonly TokenCredential _tokenCredential;
+ private readonly HttpPipeline _pipeline;
+ private readonly Uri _endpoint;
+ private readonly string _apiVersion;
+
+ /// The ClientDiagnostics is used to provide tracing support for the client library.
+ internal ClientDiagnostics ClientDiagnostics { get; }
+
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ public virtual HttpPipeline Pipeline => _pipeline;
+
+ /// Initializes a new instance of DeviceLocation for mocking.
+ protected DeviceLocation()
+ {
+ }
+
+ /// Initializes a new instance of DeviceLocation.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// The token credential to copy.
+ /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com.
+ /// The API version to use for this operation.
+ internal DeviceLocation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion)
+ {
+ ClientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ _tokenCredential = tokenCredential;
+ _endpoint = endpoint;
+ _apiVersion = apiVersion;
+ }
+
+ /// Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude.
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// Request to verify Location.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual async Task> VerifyAsync(string apcGatewayId, DeviceLocationVerificationContent deviceLocationVerificationContent, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(deviceLocationVerificationContent, nameof(deviceLocationVerificationContent));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ using RequestContent content = deviceLocationVerificationContent.ToRequestContent();
+ Response response = await VerifyAsync(apcGatewayId, content, context).ConfigureAwait(false);
+ return Response.FromValue(DeviceLocationVerificationResult.FromResponse(response), response);
+ }
+
+ /// Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude.
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// Request to verify Location.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual Response Verify(string apcGatewayId, DeviceLocationVerificationContent deviceLocationVerificationContent, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(deviceLocationVerificationContent, nameof(deviceLocationVerificationContent));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ using RequestContent content = deviceLocationVerificationContent.ToRequestContent();
+ Response response = Verify(apcGatewayId, content, context);
+ return Response.FromValue(DeviceLocationVerificationResult.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task VerifyAsync(string apcGatewayId, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("DeviceLocation.Verify");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateVerifyRequest(apcGatewayId, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response Verify(string apcGatewayId, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("DeviceLocation.Verify");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateVerifyRequest(apcGatewayId, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ internal HttpMessage CreateVerifyRequest(string apcGatewayId, RequestContent content, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/device-location/location:verify", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("apc-gateway-id", apcGatewayId);
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ private static RequestContext DefaultRequestContext = new RequestContext();
+ internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default)
+ {
+ if (!cancellationToken.CanBeCanceled)
+ {
+ return DefaultRequestContext;
+ }
+
+ return new RequestContext() { CancellationToken = cancellationToken };
+ }
+
+ private static ResponseClassifier _responseClassifier200;
+ private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 });
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.Serialization.cs
new file mode 100644
index 0000000000000..65ea446c5a899
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.Serialization.cs
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class DeviceLocationVerificationContent : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("networkIdentifier"u8);
+ writer.WriteObjectValue(NetworkIdentifier);
+ writer.WritePropertyName("latitude"u8);
+ writer.WriteNumberValue(Latitude);
+ writer.WritePropertyName("longitude"u8);
+ writer.WriteNumberValue(Longitude);
+ writer.WritePropertyName("accuracy"u8);
+ writer.WriteNumberValue(Accuracy);
+ writer.WritePropertyName("locationDevice"u8);
+ writer.WriteObjectValue(LocationDevice);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ DeviceLocationVerificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeDeviceLocationVerificationContent(document.RootElement, options);
+ }
+
+ internal static DeviceLocationVerificationContent DeserializeDeviceLocationVerificationContent(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ NetworkIdentifier networkIdentifier = default;
+ double latitude = default;
+ double longitude = default;
+ int accuracy = default;
+ LocationDevice locationDevice = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("networkIdentifier"u8))
+ {
+ networkIdentifier = NetworkIdentifier.DeserializeNetworkIdentifier(property.Value);
+ continue;
+ }
+ if (property.NameEquals("latitude"u8))
+ {
+ latitude = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("longitude"u8))
+ {
+ longitude = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("accuracy"u8))
+ {
+ accuracy = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("locationDevice"u8))
+ {
+ locationDevice = LocationDevice.DeserializeLocationDevice(property.Value);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new DeviceLocationVerificationContent(networkIdentifier, latitude, longitude, accuracy, locationDevice, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support '{options.Format}' format.");
+ }
+ }
+
+ DeviceLocationVerificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeDeviceLocationVerificationContent(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationContent)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static DeviceLocationVerificationContent FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeDeviceLocationVerificationContent(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.cs
new file mode 100644
index 0000000000000..1351bfc3a991e
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationContent.cs
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// Request to verify Location.
+ public partial class DeviceLocationVerificationContent
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// Network to query for this device, or device information to enable network routing.
+ /// Latitude of location to be verified.
+ /// Longitude of location to be verified.
+ /// Accuracy expected for location verification in kilometers.
+ /// The device to find the location for.
+ /// or is null.
+ public DeviceLocationVerificationContent(NetworkIdentifier networkIdentifier, double latitude, double longitude, int accuracy, LocationDevice locationDevice)
+ {
+ Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier));
+ Argument.AssertNotNull(locationDevice, nameof(locationDevice));
+
+ NetworkIdentifier = networkIdentifier;
+ Latitude = latitude;
+ Longitude = longitude;
+ Accuracy = accuracy;
+ LocationDevice = locationDevice;
+ }
+
+ /// Initializes a new instance of .
+ /// Network to query for this device, or device information to enable network routing.
+ /// Latitude of location to be verified.
+ /// Longitude of location to be verified.
+ /// Accuracy expected for location verification in kilometers.
+ /// The device to find the location for.
+ /// Keeps track of any properties unknown to the library.
+ internal DeviceLocationVerificationContent(NetworkIdentifier networkIdentifier, double latitude, double longitude, int accuracy, LocationDevice locationDevice, IDictionary serializedAdditionalRawData)
+ {
+ NetworkIdentifier = networkIdentifier;
+ Latitude = latitude;
+ Longitude = longitude;
+ Accuracy = accuracy;
+ LocationDevice = locationDevice;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal DeviceLocationVerificationContent()
+ {
+ }
+
+ /// Network to query for this device, or device information to enable network routing.
+ public NetworkIdentifier NetworkIdentifier { get; }
+ /// Latitude of location to be verified.
+ public double Latitude { get; }
+ /// Longitude of location to be verified.
+ public double Longitude { get; }
+ /// Accuracy expected for location verification in kilometers.
+ public int Accuracy { get; }
+ /// The device to find the location for.
+ public LocationDevice LocationDevice { get; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.Serialization.cs
new file mode 100644
index 0000000000000..f8ff5235f76ba
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.Serialization.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class DeviceLocationVerificationResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("verificationResult"u8);
+ writer.WriteBooleanValue(VerificationResult);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ DeviceLocationVerificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeDeviceLocationVerificationResult(document.RootElement, options);
+ }
+
+ internal static DeviceLocationVerificationResult DeserializeDeviceLocationVerificationResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool verificationResult = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("verificationResult"u8))
+ {
+ verificationResult = property.Value.GetBoolean();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new DeviceLocationVerificationResult(verificationResult, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support '{options.Format}' format.");
+ }
+ }
+
+ DeviceLocationVerificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeDeviceLocationVerificationResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(DeviceLocationVerificationResult)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static DeviceLocationVerificationResult FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeDeviceLocationVerificationResult(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.cs
new file mode 100644
index 0000000000000..dff7039b7fff7
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocationVerificationResult.cs
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// Response verifying location.
+ public partial class DeviceLocationVerificationResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// True if the location is in the specified area, False otherwise.
+ internal DeviceLocationVerificationResult(bool verificationResult)
+ {
+ VerificationResult = verificationResult;
+ }
+
+ /// Initializes a new instance of .
+ /// True if the location is in the specified area, False otherwise.
+ /// Keeps track of any properties unknown to the library.
+ internal DeviceLocationVerificationResult(bool verificationResult, IDictionary serializedAdditionalRawData)
+ {
+ VerificationResult = verificationResult;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal DeviceLocationVerificationResult()
+ {
+ }
+
+ /// True if the location is in the specified area, False otherwise.
+ public bool VerificationResult { get; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs
new file mode 100644
index 0000000000000..6c6d88634e8ea
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs
@@ -0,0 +1,200 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ // Data plane generated sub-client.
+ /// The DeviceNetwork sub-client.
+ public partial class DeviceNetwork
+ {
+ private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com//.default" };
+ private readonly TokenCredential _tokenCredential;
+ private readonly HttpPipeline _pipeline;
+ private readonly Uri _endpoint;
+ private readonly string _apiVersion;
+
+ /// The ClientDiagnostics is used to provide tracing support for the client library.
+ internal ClientDiagnostics ClientDiagnostics { get; }
+
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ public virtual HttpPipeline Pipeline => _pipeline;
+
+ /// Initializes a new instance of DeviceNetwork for mocking.
+ protected DeviceNetwork()
+ {
+ }
+
+ /// Initializes a new instance of DeviceNetwork.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// The token credential to copy.
+ /// An Azure Programmable Connectivity Endpoint providing access to Network APIs, for example https://{region}.apcgatewayapi.azure.com.
+ /// The API version to use for this operation.
+ internal DeviceNetwork(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion)
+ {
+ ClientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ _tokenCredential = tokenCredential;
+ _endpoint = endpoint;
+ _apiVersion = apiVersion;
+ }
+
+ /// Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs.
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// Identifier for the network to be queried.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual async Task> RetrieveAsync(string apcGatewayId, NetworkIdentifier networkIdentifier, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ using RequestContent content = networkIdentifier.ToRequestContent();
+ Response response = await RetrieveAsync(apcGatewayId, content, context).ConfigureAwait(false);
+ return Response.FromValue(NetworkRetrievalResult.FromResponse(response), response);
+ }
+
+ /// Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs.
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// Identifier for the network to be queried.
+ /// The cancellation token to use.
+ /// or is null.
+ ///
+ public virtual Response Retrieve(string apcGatewayId, NetworkIdentifier networkIdentifier, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ using RequestContent content = networkIdentifier.ToRequestContent();
+ Response response = Retrieve(apcGatewayId, content, context);
+ return Response.FromValue(NetworkRetrievalResult.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task RetrieveAsync(string apcGatewayId, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("DeviceNetwork.Retrieve");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateRetrieveRequest(apcGatewayId, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The identifier of the APC Gateway resource which should handle this request.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response Retrieve(string apcGatewayId, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("DeviceNetwork.Retrieve");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateRetrieveRequest(apcGatewayId, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ internal HttpMessage CreateRetrieveRequest(string apcGatewayId, RequestContent content, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/device-network/network:retrieve", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("apc-gateway-id", apcGatewayId);
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ private static RequestContext DefaultRequestContext = new RequestContext();
+ internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default)
+ {
+ if (!cancellationToken.CanBeCanceled)
+ {
+ return DefaultRequestContext;
+ }
+
+ return new RequestContext() { CancellationToken = cancellationToken };
+ }
+
+ private static ResponseClassifier _responseClassifier200;
+ private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 });
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml
new file mode 100644
index 0000000000000..51b5bf01ee35b
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml
@@ -0,0 +1,185 @@
+
+
+
+
+
+This sample shows how to call VerifyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice());
+Response response = await client.VerifyAsync("", deviceLocationVerificationContent);
+]]>
+This sample shows how to call VerifyAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice
+{
+ NetworkAccessIdentifier = "",
+ PhoneNumber = "",
+ Ipv4Address = new Ipv4Address("", 1234),
+ Ipv6Address = new Ipv6Address("", 1234),
+});
+Response response = await client.VerifyAsync("", deviceLocationVerificationContent);
+]]>
+
+
+
+This sample shows how to call Verify.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice());
+Response response = client.Verify("", deviceLocationVerificationContent);
+]]>
+This sample shows how to call Verify with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice
+{
+ NetworkAccessIdentifier = "",
+ PhoneNumber = "",
+ Ipv4Address = new Ipv4Address("", 1234),
+ Ipv6Address = new Ipv6Address("", 1234),
+});
+Response response = client.Verify("", deviceLocationVerificationContent);
+]]>
+
+
+
+This sample shows how to call VerifyAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+ latitude = 123.45,
+ longitude = 123.45,
+ accuracy = 1234,
+ locationDevice = new object(),
+});
+Response response = await client.VerifyAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+This sample shows how to call VerifyAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+ latitude = 123.45,
+ longitude = 123.45,
+ accuracy = 1234,
+ locationDevice = new
+ {
+ networkAccessIdentifier = "",
+ phoneNumber = "",
+ ipv4Address = new
+ {
+ ipv4 = "",
+ port = 1234,
+ },
+ ipv6Address = new
+ {
+ ipv6 = "",
+ port = 1234,
+ },
+ },
+});
+Response response = await client.VerifyAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+
+
+
+This sample shows how to call Verify and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+ latitude = 123.45,
+ longitude = 123.45,
+ accuracy = 1234,
+ locationDevice = new object(),
+});
+Response response = client.Verify("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+This sample shows how to call Verify with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+ latitude = 123.45,
+ longitude = 123.45,
+ accuracy = 1234,
+ locationDevice = new
+ {
+ networkAccessIdentifier = "",
+ phoneNumber = "",
+ ipv4Address = new
+ {
+ ipv4 = "",
+ port = 1234,
+ },
+ ipv6Address = new
+ {
+ ipv6 = "",
+ port = 1234,
+ },
+ },
+});
+Response response = client.Verify("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml
new file mode 100644
index 0000000000000..86e2a3a5d0804
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+This sample shows how to call RetrieveAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = await client.RetrieveAsync("", networkIdentifier);
+]]>
+This sample shows how to call RetrieveAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = await client.RetrieveAsync("", networkIdentifier);
+]]>
+
+
+
+This sample shows how to call Retrieve.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = client.Retrieve("", networkIdentifier);
+]]>
+This sample shows how to call Retrieve with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = client.Retrieve("", networkIdentifier);
+]]>
+
+
+
+This sample shows how to call RetrieveAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = await client.RetrieveAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("networkCode").ToString());
+]]>
+This sample shows how to call RetrieveAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = await client.RetrieveAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("networkCode").ToString());
+]]>
+
+
+
+This sample shows how to call Retrieve and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = client.Retrieve("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("networkCode").ToString());
+]]>
+This sample shows how to call Retrieve with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = client.Retrieve("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("networkCode").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml
new file mode 100644
index 0000000000000..a43956d12cc75
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml
@@ -0,0 +1,253 @@
+
+
+
+
+
+This sample shows how to call VerifyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NumberVerificationContent numberVerificationContent = new NumberVerificationContent(new NetworkIdentifier("", ""));
+Response response = await client.VerifyAsync("", numberVerificationContent);
+]]>
+This sample shows how to call VerifyAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NumberVerificationContent numberVerificationContent = new NumberVerificationContent(new NetworkIdentifier("", ""))
+{
+ PhoneNumber = "",
+ HashedPhoneNumber = "",
+};
+Response response = await client.VerifyAsync("", numberVerificationContent);
+]]>
+
+
+
+This sample shows how to call Verify.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NumberVerificationContent numberVerificationContent = new NumberVerificationContent(new NetworkIdentifier("", ""));
+Response response = client.Verify("", numberVerificationContent);
+]]>
+This sample shows how to call Verify with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NumberVerificationContent numberVerificationContent = new NumberVerificationContent(new NetworkIdentifier("", ""))
+{
+ PhoneNumber = "",
+ HashedPhoneNumber = "",
+};
+Response response = client.Verify("", numberVerificationContent);
+]]>
+
+
+
+This sample shows how to call VerifyAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = await client.VerifyAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+This sample shows how to call VerifyAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+ phoneNumber = "",
+ hashedPhoneNumber = "",
+});
+Response response = await client.VerifyAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+
+
+
+This sample shows how to call Verify and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = client.Verify("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+This sample shows how to call Verify with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+ phoneNumber = "",
+ hashedPhoneNumber = "",
+});
+Response response = client.Verify("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+
+
+
+This sample shows how to call RetrieveAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = await client.RetrieveAsync("", networkIdentifier);
+]]>
+This sample shows how to call RetrieveAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = await client.RetrieveAsync("", networkIdentifier);
+]]>
+
+
+
+This sample shows how to call Retrieve.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = client.Retrieve("", networkIdentifier);
+]]>
+This sample shows how to call Retrieve with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+NetworkIdentifier networkIdentifier = new NetworkIdentifier("", "");
+Response response = client.Retrieve("", networkIdentifier);
+]]>
+
+
+
+This sample shows how to call RetrieveAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = await client.RetrieveAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("phoneNumber").ToString());
+]]>
+This sample shows how to call RetrieveAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = await client.RetrieveAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("phoneNumber").ToString());
+]]>
+
+
+
+This sample shows how to call Retrieve and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = client.Retrieve("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("phoneNumber").ToString());
+]]>
+This sample shows how to call Retrieve with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ identifierType = "",
+ identifier = "",
+});
+Response response = client.Retrieve("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("phoneNumber").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml
new file mode 100644
index 0000000000000..b5a5fe09e5e1e
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml
@@ -0,0 +1,273 @@
+
+
+
+
+
+This sample shows how to call RetrieveAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", ""));
+Response response = await client.RetrieveAsync("", simSwapRetrievalContent);
+]]>
+This sample shows how to call RetrieveAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", ""))
+{
+ PhoneNumber = "",
+};
+Response response = await client.RetrieveAsync("", simSwapRetrievalContent);
+]]>
+
+
+
+This sample shows how to call Retrieve.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", ""));
+Response response = client.Retrieve("", simSwapRetrievalContent);
+]]>
+This sample shows how to call Retrieve with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", ""))
+{
+ PhoneNumber = "",
+};
+Response response = client.Retrieve("", simSwapRetrievalContent);
+]]>
+
+
+
+This sample shows how to call RetrieveAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = await client.RetrieveAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("date").ToString());
+]]>
+This sample shows how to call RetrieveAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ phoneNumber = "",
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = await client.RetrieveAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("date").ToString());
+]]>
+
+
+
+This sample shows how to call Retrieve and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = client.Retrieve("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("date").ToString());
+]]>
+This sample shows how to call Retrieve with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ phoneNumber = "",
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = client.Retrieve("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("date").ToString());
+]]>
+
+
+
+This sample shows how to call VerifyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", ""));
+Response response = await client.VerifyAsync("", simSwapVerificationContent);
+]]>
+This sample shows how to call VerifyAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", ""))
+{
+ PhoneNumber = "",
+ MaxAgeHours = 1234,
+};
+Response response = await client.VerifyAsync("", simSwapVerificationContent);
+]]>
+
+
+
+This sample shows how to call Verify.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", ""));
+Response response = client.Verify("", simSwapVerificationContent);
+]]>
+This sample shows how to call Verify with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", ""))
+{
+ PhoneNumber = "",
+ MaxAgeHours = 1234,
+};
+Response response = client.Verify("", simSwapVerificationContent);
+]]>
+
+
+
+This sample shows how to call VerifyAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = await client.VerifyAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+This sample shows how to call VerifyAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ phoneNumber = "",
+ maxAgeHours = 1234,
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = await client.VerifyAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+
+
+
+This sample shows how to call Verify and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = client.Verify("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+This sample shows how to call Verify with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "v2024_01_09_preview");
+
+using RequestContent content = RequestContent.Create(new
+{
+ phoneNumber = "",
+ maxAgeHours = 1234,
+ networkIdentifier = new
+ {
+ identifierType = "",
+ identifier = "",
+ },
+});
+Response response = client.Verify("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("verificationResult").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.Serialization.cs
new file mode 100644
index 0000000000000..1af95fe2df7a1
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.Serialization.cs
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class Ipv4Address : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(Ipv4Address)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("ipv4"u8);
+ writer.WriteStringValue(Ipv4);
+ writer.WritePropertyName("port"u8);
+ writer.WriteNumberValue(Port);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ Ipv4Address IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(Ipv4Address)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeIpv4Address(document.RootElement, options);
+ }
+
+ internal static Ipv4Address DeserializeIpv4Address(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string ipv4 = default;
+ int port = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("ipv4"u8))
+ {
+ ipv4 = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("port"u8))
+ {
+ port = property.Value.GetInt32();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new Ipv4Address(ipv4, port, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(Ipv4Address)} does not support '{options.Format}' format.");
+ }
+ }
+
+ Ipv4Address IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeIpv4Address(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(Ipv4Address)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static Ipv4Address FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeIpv4Address(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.cs
new file mode 100644
index 0000000000000..588754fae7e2e
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv4Address.cs
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// IPv4 device indicator.
+ public partial class Ipv4Address
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ ///
+ /// IPv4 address may be specified in form <address/mask> as:
+ /// - address - an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule.
+ /// - address/mask - an IP number as above with a mask width of the form 1.2.3.4/24.
+ /// In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version.
+ ///
+ /// User equipment port.
+ /// is null.
+ public Ipv4Address(string ipv4, int port)
+ {
+ Argument.AssertNotNull(ipv4, nameof(ipv4));
+
+ Ipv4 = ipv4;
+ Port = port;
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// IPv4 address may be specified in form <address/mask> as:
+ /// - address - an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule.
+ /// - address/mask - an IP number as above with a mask width of the form 1.2.3.4/24.
+ /// In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version.
+ ///
+ /// User equipment port.
+ /// Keeps track of any properties unknown to the library.
+ internal Ipv4Address(string ipv4, int port, IDictionary serializedAdditionalRawData)
+ {
+ Ipv4 = ipv4;
+ Port = port;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal Ipv4Address()
+ {
+ }
+
+ ///
+ /// IPv4 address may be specified in form <address/mask> as:
+ /// - address - an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule.
+ /// - address/mask - an IP number as above with a mask width of the form 1.2.3.4/24.
+ /// In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version.
+ ///
+ public string Ipv4 { get; }
+ /// User equipment port.
+ public int Port { get; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.Serialization.cs
new file mode 100644
index 0000000000000..0321238f78916
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.Serialization.cs
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class Ipv6Address : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(Ipv6Address)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("ipv6"u8);
+ writer.WriteStringValue(Ipv6);
+ writer.WritePropertyName("port"u8);
+ writer.WriteNumberValue(Port);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ Ipv6Address IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(Ipv6Address)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeIpv6Address(document.RootElement, options);
+ }
+
+ internal static Ipv6Address DeserializeIpv6Address(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string ipv6 = default;
+ int port = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("ipv6"u8))
+ {
+ ipv6 = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("port"u8))
+ {
+ port = property.Value.GetInt32();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new Ipv6Address(ipv6, port, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(Ipv6Address)} does not support '{options.Format}' format.");
+ }
+ }
+
+ Ipv6Address IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeIpv6Address(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(Ipv6Address)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static Ipv6Address FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeIpv6Address(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.cs
new file mode 100644
index 0000000000000..a4bdf322aca45
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/Ipv6Address.cs
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// IPv6 device indicator.
+ public partial class Ipv6Address
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ ///
+ /// IPv6 address, following IETF 5952 format, may be specified in form <address/mask> as:
+ /// - address - The /128 subnet is optional for single addresses:
+ /// - 2001:db8:85a3:8d3:1319:8a2e:370:7344
+ /// - 2001:db8:85a3:8d3:1319:8a2e:370:7344/128
+ /// - address/mask - an IP v6 number with a mask:
+ /// - 2001:db8:85a3:8d3::0/64
+ /// - 2001:db8:85a3:8d3::/64
+ ///
+ /// User equipment port.
+ /// is null.
+ public Ipv6Address(string ipv6, int port)
+ {
+ Argument.AssertNotNull(ipv6, nameof(ipv6));
+
+ Ipv6 = ipv6;
+ Port = port;
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// IPv6 address, following IETF 5952 format, may be specified in form <address/mask> as:
+ /// - address - The /128 subnet is optional for single addresses:
+ /// - 2001:db8:85a3:8d3:1319:8a2e:370:7344
+ /// - 2001:db8:85a3:8d3:1319:8a2e:370:7344/128
+ /// - address/mask - an IP v6 number with a mask:
+ /// - 2001:db8:85a3:8d3::0/64
+ /// - 2001:db8:85a3:8d3::/64
+ ///
+ /// User equipment port.
+ /// Keeps track of any properties unknown to the library.
+ internal Ipv6Address(string ipv6, int port, IDictionary serializedAdditionalRawData)
+ {
+ Ipv6 = ipv6;
+ Port = port;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal Ipv6Address()
+ {
+ }
+
+ ///
+ /// IPv6 address, following IETF 5952 format, may be specified in form <address/mask> as:
+ /// - address - The /128 subnet is optional for single addresses:
+ /// - 2001:db8:85a3:8d3:1319:8a2e:370:7344
+ /// - 2001:db8:85a3:8d3:1319:8a2e:370:7344/128
+ /// - address/mask - an IP v6 number with a mask:
+ /// - 2001:db8:85a3:8d3::0/64
+ /// - 2001:db8:85a3:8d3::/64
+ ///
+ public string Ipv6 { get; }
+ /// User equipment port.
+ public int Port { get; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.Serialization.cs
new file mode 100644
index 0000000000000..4e039ee13f39e
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.Serialization.cs
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class LocationDevice : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(LocationDevice)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsDefined(NetworkAccessIdentifier))
+ {
+ writer.WritePropertyName("networkAccessIdentifier"u8);
+ writer.WriteStringValue(NetworkAccessIdentifier);
+ }
+ if (Optional.IsDefined(PhoneNumber))
+ {
+ writer.WritePropertyName("phoneNumber"u8);
+ writer.WriteStringValue(PhoneNumber);
+ }
+ if (Optional.IsDefined(Ipv4Address))
+ {
+ writer.WritePropertyName("ipv4Address"u8);
+ writer.WriteObjectValue(Ipv4Address);
+ }
+ if (Optional.IsDefined(Ipv6Address))
+ {
+ writer.WritePropertyName("ipv6Address"u8);
+ writer.WriteObjectValue(Ipv6Address);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ LocationDevice IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(LocationDevice)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeLocationDevice(document.RootElement, options);
+ }
+
+ internal static LocationDevice DeserializeLocationDevice(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional networkAccessIdentifier = default;
+ Optional phoneNumber = default;
+ Optional ipv4Address = default;
+ Optional ipv6Address = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("networkAccessIdentifier"u8))
+ {
+ networkAccessIdentifier = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("phoneNumber"u8))
+ {
+ phoneNumber = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("ipv4Address"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ ipv4Address = Ipv4Address.DeserializeIpv4Address(property.Value);
+ continue;
+ }
+ if (property.NameEquals("ipv6Address"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ ipv6Address = Ipv6Address.DeserializeIpv6Address(property.Value);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new LocationDevice(networkAccessIdentifier.Value, phoneNumber.Value, ipv4Address.Value, ipv6Address.Value, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(LocationDevice)} does not support '{options.Format}' format.");
+ }
+ }
+
+ LocationDevice IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeLocationDevice(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(LocationDevice)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static LocationDevice FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeLocationDevice(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.cs
new file mode 100644
index 0000000000000..6748649f211bc
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/LocationDevice.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// Device information needed by operator to provide location information. Include exactly one of these properties to identify your device.
+ public partial class LocationDevice
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public LocationDevice()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// External identifier or network access identifier of the device.
+ /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'.
+ /// The Ipv4 address.
+ /// The Ipv6 address.
+ /// Keeps track of any properties unknown to the library.
+ internal LocationDevice(string networkAccessIdentifier, string phoneNumber, Ipv4Address ipv4Address, Ipv6Address ipv6Address, IDictionary serializedAdditionalRawData)
+ {
+ NetworkAccessIdentifier = networkAccessIdentifier;
+ PhoneNumber = phoneNumber;
+ Ipv4Address = ipv4Address;
+ Ipv6Address = ipv6Address;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// External identifier or network access identifier of the device.
+ public string NetworkAccessIdentifier { get; set; }
+ /// Phone number in E.164 format (starting with country code), and optionally prefixed with '+'.
+ public string PhoneNumber { get; set; }
+ /// The Ipv4 address.
+ public Ipv4Address Ipv4Address { get; set; }
+ /// The Ipv6 address.
+ public Ipv6Address Ipv6Address { get; set; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.Serialization.cs
new file mode 100644
index 0000000000000..fffed005d68f9
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.Serialization.cs
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class NetworkIdentifier : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("identifierType"u8);
+ writer.WriteStringValue(IdentifierType);
+ writer.WritePropertyName("identifier"u8);
+ writer.WriteStringValue(Identifier);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ NetworkIdentifier IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNetworkIdentifier(document.RootElement, options);
+ }
+
+ internal static NetworkIdentifier DeserializeNetworkIdentifier(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string identifierType = default;
+ string identifier = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("identifierType"u8))
+ {
+ identifierType = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("identifier"u8))
+ {
+ identifier = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new NetworkIdentifier(identifierType, identifier, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support '{options.Format}' format.");
+ }
+ }
+
+ NetworkIdentifier IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNetworkIdentifier(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NetworkIdentifier)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static NetworkIdentifier FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeNetworkIdentifier(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.cs
new file mode 100644
index 0000000000000..775ef4e2ebb10
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkIdentifier.cs
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// Identifier for the network to be queried.
+ public partial class NetworkIdentifier
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'.
+ ///
+ /// The network identifier in a format matching the type above:
+ /// - IPv4 of a device in dotted-quad form 1.2.3.4.
+ /// - IPv6 of a device in IETF 5952 format.
+ /// - NetworkCode matching our documentation or an output from /Network:retrieve."
+ ///
+ /// or is null.
+ public NetworkIdentifier(string identifierType, string identifier)
+ {
+ Argument.AssertNotNull(identifierType, nameof(identifierType));
+ Argument.AssertNotNull(identifier, nameof(identifier));
+
+ IdentifierType = identifierType;
+ Identifier = identifier;
+ }
+
+ /// Initializes a new instance of .
+ /// The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'.
+ ///
+ /// The network identifier in a format matching the type above:
+ /// - IPv4 of a device in dotted-quad form 1.2.3.4.
+ /// - IPv6 of a device in IETF 5952 format.
+ /// - NetworkCode matching our documentation or an output from /Network:retrieve."
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal NetworkIdentifier(string identifierType, string identifier, IDictionary serializedAdditionalRawData)
+ {
+ IdentifierType = identifierType;
+ Identifier = identifier;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal NetworkIdentifier()
+ {
+ }
+
+ /// The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'.
+ public string IdentifierType { get; }
+ ///
+ /// The network identifier in a format matching the type above:
+ /// - IPv4 of a device in dotted-quad form 1.2.3.4.
+ /// - IPv6 of a device in IETF 5952 format.
+ /// - NetworkCode matching our documentation or an output from /Network:retrieve."
+ ///
+ public string Identifier { get; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.Serialization.cs
new file mode 100644
index 0000000000000..4d913ed13af46
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.Serialization.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class NetworkRetrievalResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("networkCode"u8);
+ writer.WriteStringValue(NetworkCode);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ NetworkRetrievalResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeNetworkRetrievalResult(document.RootElement, options);
+ }
+
+ internal static NetworkRetrievalResult DeserializeNetworkRetrievalResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= new ModelReaderWriterOptions("W");
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string networkCode = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary additionalPropertiesDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("networkCode"u8))
+ {
+ networkCode = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = additionalPropertiesDictionary;
+ return new NetworkRetrievalResult(networkCode, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support '{options.Format}' format.");
+ }
+ }
+
+ NetworkRetrievalResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeNetworkRetrievalResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(NetworkRetrievalResult)} does not support '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static NetworkRetrievalResult FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeNetworkRetrievalResult(document.RootElement);
+ }
+
+ /// Convert into a Utf8JsonRequestContent.
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this);
+ return content;
+ }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.cs
new file mode 100644
index 0000000000000..71696d2a447d5
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NetworkRetrievalResult.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ /// The network that the device is on.
+ public partial class NetworkRetrievalResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The identifier for the network. This can be used as the networkIdentifier for the service APIs.
+ /// is null.
+ internal NetworkRetrievalResult(string networkCode)
+ {
+ Argument.AssertNotNull(networkCode, nameof(networkCode));
+
+ NetworkCode = networkCode;
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier for the network. This can be used as the networkIdentifier for the service APIs.
+ /// Keeps track of any properties unknown to the library.
+ internal NetworkRetrievalResult(string networkCode, IDictionary serializedAdditionalRawData)
+ {
+ NetworkCode = networkCode;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal NetworkRetrievalResult()
+ {
+ }
+
+ /// The identifier for the network. This can be used as the networkIdentifier for the service APIs.
+ public string NetworkCode { get; }
+ }
+}
diff --git a/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberRetrievalResult.Serialization.cs b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberRetrievalResult.Serialization.cs
new file mode 100644
index 0000000000000..ed98622f3ca26
--- /dev/null
+++ b/sdk/programmableconnectivity/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberRetrievalResult.Serialization.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure;
+using Azure.Core;
+
+namespace Azure.Communication.ProgrammableConnectivity
+{
+ public partial class NumberRetrievalResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W"));
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(NumberRetrievalResult)} does not support '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("phoneNumber"u8);
+ writer.WriteStringValue(PhoneNumber);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ NumberRetrievalResult IJsonModel