diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/Microsoft.VoiceServices.Provisioning.sln b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/Microsoft.VoiceServices.Provisioning.sln
new file mode 100644
index 000000000000..ea653dd6b539
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/Microsoft.VoiceServices.Provisioning.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VoiceServices.Provisioning", "src\Microsoft.VoiceServices.Provisioning.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VoiceServices.Provisioning.Tests", "tests\Microsoft.VoiceServices.Provisioning.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
+ {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/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountResource.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountResource.Serialization.cs
new file mode 100644
index 000000000000..7f8f899e06cc
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountResource.Serialization.cs
@@ -0,0 +1,208 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class AccountResource : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(AccountResource)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (options.Format != "W" && Optional.IsDefined(ServiceProvisioningStatus))
+ {
+ writer.WritePropertyName("serviceProvisioningStatus"u8);
+ writer.WriteStringValue(ServiceProvisioningStatus.Value.ToString());
+ }
+ if (options.Format != "W" && Optional.IsCollectionDefined(ServiceProvisioningErrors))
+ {
+ writer.WritePropertyName("serviceProvisioningErrors"u8);
+ writer.WriteStartArray();
+ foreach (var item in ServiceProvisioningErrors)
+ {
+ JsonSerializer.Serialize(writer, item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ if (Optional.IsDefined(CorrelationId))
+ {
+ writer.WritePropertyName("correlationId"u8);
+ writer.WriteStringValue(CorrelationId);
+ }
+ if (Optional.IsDefined(ServiceDetails))
+ {
+ writer.WritePropertyName("serviceDetails"u8);
+ writer.WriteObjectValue(ServiceDetails, options);
+ }
+ 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();
+ }
+
+ AccountResource 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(AccountResource)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAccountResource(document.RootElement, options);
+ }
+
+ internal static AccountResource DeserializeAccountResource(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ServiceProvisioningStatus? serviceProvisioningStatus = default;
+ IReadOnlyList serviceProvisioningErrors = default;
+ string name = default;
+ string correlationId = default;
+ AccountServiceDetails serviceDetails = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("serviceProvisioningStatus"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ serviceProvisioningStatus = new ServiceProvisioningStatus(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("serviceProvisioningErrors"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(JsonSerializer.Deserialize(item.GetRawText()));
+ }
+ serviceProvisioningErrors = array;
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("correlationId"u8))
+ {
+ correlationId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("serviceDetails"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ serviceDetails = AccountServiceDetails.DeserializeAccountServiceDetails(property.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AccountResource(
+ serviceProvisioningStatus,
+ serviceProvisioningErrors ?? new ChangeTrackingList(),
+ name,
+ correlationId,
+ serviceDetails,
+ 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(AccountResource)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AccountResource 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 DeserializeAccountResource(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AccountResource)} does not support reading '{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 AccountResource FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAccountResource(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountResource.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountResource.cs
new file mode 100644
index 000000000000..dddd960e8051
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountResource.cs
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// An account represents a group of numbers, typically associated with an enterprise.
+ public partial class AccountResource
+ {
+ ///
+ /// 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 .
+ /// Name of the account.
+ /// is null.
+ public AccountResource(string name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ ServiceProvisioningErrors = new ChangeTrackingList();
+ Name = name;
+ }
+
+ /// Initializes a new instance of .
+ /// The status of the provisioning action associated with this resource.
+ /// Any errors pertaining to the provisioning of this resource.
+ /// Name of the account.
+ /// A user defined identifier used for correlating with external systems.
+ /// The details of the account.
+ /// Keeps track of any properties unknown to the library.
+ internal AccountResource(ServiceProvisioningStatus? serviceProvisioningStatus, IReadOnlyList serviceProvisioningErrors, string name, string correlationId, AccountServiceDetails serviceDetails, IDictionary serializedAdditionalRawData)
+ {
+ ServiceProvisioningStatus = serviceProvisioningStatus;
+ ServiceProvisioningErrors = serviceProvisioningErrors;
+ Name = name;
+ CorrelationId = correlationId;
+ ServiceDetails = serviceDetails;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AccountResource()
+ {
+ }
+
+ /// The status of the provisioning action associated with this resource.
+ public ServiceProvisioningStatus? ServiceProvisioningStatus { get; }
+ /// Any errors pertaining to the provisioning of this resource.
+ public IReadOnlyList ServiceProvisioningErrors { get; }
+ /// Name of the account.
+ public string Name { get; set; }
+ /// A user defined identifier used for correlating with external systems.
+ public string CorrelationId { get; set; }
+ /// The details of the account.
+ public AccountServiceDetails ServiceDetails { get; set; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountServiceDetails.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountServiceDetails.Serialization.cs
new file mode 100644
index 000000000000..75ab8aa1bd65
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountServiceDetails.Serialization.cs
@@ -0,0 +1,221 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class AccountServiceDetails : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(AccountServiceDetails)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsDefined(TeamsTenantId))
+ {
+ writer.WritePropertyName("teamsTenantId"u8);
+ writer.WriteStringValue(TeamsTenantId);
+ }
+ if (Optional.IsDefined(TeamsOperatorConnect))
+ {
+ writer.WritePropertyName("teamsOperatorConnect"u8);
+ writer.WriteObjectValue(TeamsOperatorConnect, options);
+ }
+ if (Optional.IsDefined(TeamsDirectRouting))
+ {
+ writer.WritePropertyName("teamsDirectRouting"u8);
+ writer.WriteObjectValue(TeamsDirectRouting, options);
+ }
+ if (Optional.IsDefined(TeamsPhoneMobile))
+ {
+ writer.WritePropertyName("teamsPhoneMobile"u8);
+ writer.WriteObjectValue(TeamsPhoneMobile, options);
+ }
+ if (Optional.IsDefined(ZoomPhoneCloudPeering))
+ {
+ writer.WritePropertyName("zoomPhoneCloudPeering"u8);
+ writer.WriteObjectValue(ZoomPhoneCloudPeering, options);
+ }
+ if (Optional.IsDefined(AzureOperatorCallProtection))
+ {
+ writer.WritePropertyName("azureOperatorCallProtection"u8);
+ writer.WriteObjectValue(AzureOperatorCallProtection, options);
+ }
+ 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();
+ }
+
+ AccountServiceDetails 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(AccountServiceDetails)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAccountServiceDetails(document.RootElement, options);
+ }
+
+ internal static AccountServiceDetails DeserializeAccountServiceDetails(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string teamsTenantId = default;
+ TeamsOperatorConnectAccountDetails teamsOperatorConnect = default;
+ TeamsDirectRoutingAccountDetails teamsDirectRouting = default;
+ TeamsPhoneMobileAccountDetails teamsPhoneMobile = default;
+ ZoomPhoneCloudPeeringAccountDetails zoomPhoneCloudPeering = default;
+ AzureOperatorCallProtectionAccountDetails azureOperatorCallProtection = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("teamsTenantId"u8))
+ {
+ teamsTenantId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("teamsOperatorConnect"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ teamsOperatorConnect = TeamsOperatorConnectAccountDetails.DeserializeTeamsOperatorConnectAccountDetails(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("teamsDirectRouting"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ teamsDirectRouting = TeamsDirectRoutingAccountDetails.DeserializeTeamsDirectRoutingAccountDetails(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("teamsPhoneMobile"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ teamsPhoneMobile = TeamsPhoneMobileAccountDetails.DeserializeTeamsPhoneMobileAccountDetails(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("zoomPhoneCloudPeering"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ zoomPhoneCloudPeering = ZoomPhoneCloudPeeringAccountDetails.DeserializeZoomPhoneCloudPeeringAccountDetails(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("azureOperatorCallProtection"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ azureOperatorCallProtection = AzureOperatorCallProtectionAccountDetails.DeserializeAzureOperatorCallProtectionAccountDetails(property.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AccountServiceDetails(
+ teamsTenantId,
+ teamsOperatorConnect,
+ teamsDirectRouting,
+ teamsPhoneMobile,
+ zoomPhoneCloudPeering,
+ azureOperatorCallProtection,
+ 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(AccountServiceDetails)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AccountServiceDetails 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 DeserializeAccountServiceDetails(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AccountServiceDetails)} does not support reading '{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 AccountServiceDetails FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAccountServiceDetails(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountServiceDetails.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountServiceDetails.cs
new file mode 100644
index 000000000000..bb7b248c3374
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AccountServiceDetails.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// Details of the backend services associated with this Account.
+ public partial class AccountServiceDetails
+ {
+ ///
+ /// 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 AccountServiceDetails()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The Microsoft Teams Tenant ID of the Account. This can only be updated if no Operator Connect or Teams Phone Mobile numbers are configured in this account.
+ /// Details for the Teams Operator Connect service on this Account.
+ /// Details for the Teams Direct Routing service on this Account.
+ /// Details for the Teams Phone Mobile service on this Account.
+ /// Details for the Zoom Phone Cloud Peering service on this Account.
+ /// Details for the Azure Operator Call Protection service on this Account.
+ /// Keeps track of any properties unknown to the library.
+ internal AccountServiceDetails(string teamsTenantId, TeamsOperatorConnectAccountDetails teamsOperatorConnect, TeamsDirectRoutingAccountDetails teamsDirectRouting, TeamsPhoneMobileAccountDetails teamsPhoneMobile, ZoomPhoneCloudPeeringAccountDetails zoomPhoneCloudPeering, AzureOperatorCallProtectionAccountDetails azureOperatorCallProtection, IDictionary serializedAdditionalRawData)
+ {
+ TeamsTenantId = teamsTenantId;
+ TeamsOperatorConnect = teamsOperatorConnect;
+ TeamsDirectRouting = teamsDirectRouting;
+ TeamsPhoneMobile = teamsPhoneMobile;
+ ZoomPhoneCloudPeering = zoomPhoneCloudPeering;
+ AzureOperatorCallProtection = azureOperatorCallProtection;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The Microsoft Teams Tenant ID of the Account. This can only be updated if no Operator Connect or Teams Phone Mobile numbers are configured in this account.
+ public string TeamsTenantId { get; set; }
+ /// Details for the Teams Operator Connect service on this Account.
+ public TeamsOperatorConnectAccountDetails TeamsOperatorConnect { get; set; }
+ /// Details for the Teams Direct Routing service on this Account.
+ public TeamsDirectRoutingAccountDetails TeamsDirectRouting { get; set; }
+ /// Details for the Teams Phone Mobile service on this Account.
+ public TeamsPhoneMobileAccountDetails TeamsPhoneMobile { get; set; }
+ /// Details for the Zoom Phone Cloud Peering service on this Account.
+ public ZoomPhoneCloudPeeringAccountDetails ZoomPhoneCloudPeering { get; set; }
+ /// Details for the Azure Operator Call Protection service on this Account.
+ public AzureOperatorCallProtectionAccountDetails AzureOperatorCallProtection { get; set; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Accounts.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Accounts.cs
new file mode 100644
index 000000000000..902a7a63468b
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Accounts.cs
@@ -0,0 +1,2036 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ // Data plane generated sub-client.
+ /// The Accounts sub-client.
+ public partial class Accounts
+ {
+ private static readonly string[] AuthorizationScopes = new string[] { "https://func-voiceservice-rp-prod-eastuseuap.azurewebsites.net/.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 Accounts for mocking.
+ protected Accounts()
+ {
+ }
+
+ /// Initializes a new instance of Accounts.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// The token credential to copy.
+ /// The to use.
+ /// The API version to use for this operation.
+ internal Accounts(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion)
+ {
+ ClientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ _tokenCredential = tokenCredential;
+ _endpoint = endpoint;
+ _apiVersion = apiVersion;
+ }
+
+ /// Get Account.
+ /// Name of the account.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get details of a specific Account using its Name. An Account represents an Enterprise or collection of users.
+ ///
+ public virtual async Task> GetAccountResourceAsync(string accountName, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetAccountResourceAsync(accountName, requestConditions, context).ConfigureAwait(false);
+ return Response.FromValue(AccountResource.FromResponse(response), response);
+ }
+
+ /// Get Account.
+ /// Name of the account.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get details of a specific Account using its Name. An Account represents an Enterprise or collection of users.
+ ///
+ public virtual Response GetAccountResource(string accountName, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetAccountResource(accountName, requestConditions, context);
+ return Response.FromValue(AccountResource.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Get Account.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetAccountResourceAsync(string accountName, RequestConditions requestConditions, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetAccountResource");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetAccountResourceRequest(accountName, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Get Account.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetAccountResource(string accountName, RequestConditions requestConditions, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetAccountResource");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetAccountResourceRequest(accountName, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Create or Replace Account.
+ /// Name of the account.
+ /// The resource instance.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Create or replace the details of an Account.
+ ///
+ public virtual async Task> CreateOrReplaceAsync(string accountName, AccountResource resource, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(resource, nameof(resource));
+
+ using RequestContent content = resource.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await CreateOrReplaceAsync(accountName, content, requestConditions, context).ConfigureAwait(false);
+ return Response.FromValue(AccountResource.FromResponse(response), response);
+ }
+
+ /// Create or Replace Account.
+ /// Name of the account.
+ /// The resource instance.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Create or replace the details of an Account.
+ ///
+ public virtual Response CreateOrReplace(string accountName, AccountResource resource, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(resource, nameof(resource));
+
+ using RequestContent content = resource.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = CreateOrReplace(accountName, content, requestConditions, context);
+ return Response.FromValue(AccountResource.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Create or Replace Account.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The content to send as the body of the request.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task CreateOrReplaceAsync(string accountName, RequestContent content, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.CreateOrReplace");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrReplaceRequest(accountName, content, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Create or Replace Account.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The content to send as the body of the request.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response CreateOrReplace(string accountName, RequestContent content, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.CreateOrReplace");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrReplaceRequest(accountName, content, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method
+ ///
+ /// [Protocol Method] Delete Account.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Whether to delete the child Number resources of the Account, defaults to false.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task DeleteAsync(string accountName, bool? deleteNumbers = null, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.Delete");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteRequest(accountName, deleteNumbers, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method
+ ///
+ /// [Protocol Method] Delete Account.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Whether to delete the child Number resources of the Account, defaults to false.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response Delete(string accountName, bool? deleteNumbers = null, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.Delete");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteRequest(accountName, deleteNumbers, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Create or update Numbers.
+ /// Name of the account.
+ /// Batch of numbers to create or replace.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Create or update up to 100 Numbers on the specified account.
+ ///
+ public virtual async Task> CreateOrUpdateNumbersAsync(string accountName, BatchNumbers body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(body, nameof(body));
+
+ using RequestContent content = body.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await CreateOrUpdateNumbersAsync(accountName, content, context).ConfigureAwait(false);
+ return Response.FromValue(BatchNumbers.FromResponse(response), response);
+ }
+
+ /// Create or update Numbers.
+ /// Name of the account.
+ /// Batch of numbers to create or replace.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Create or update up to 100 Numbers on the specified account.
+ ///
+ public virtual Response CreateOrUpdateNumbers(string accountName, BatchNumbers body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(body, nameof(body));
+
+ using RequestContent content = body.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = CreateOrUpdateNumbers(accountName, content, context);
+ return Response.FromValue(BatchNumbers.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Create or update Numbers.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task CreateOrUpdateNumbersAsync(string accountName, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.CreateOrUpdateNumbers");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrUpdateNumbersRequest(accountName, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Create or update Numbers.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response CreateOrUpdateNumbers(string accountName, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.CreateOrUpdateNumbers");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrUpdateNumbersRequest(accountName, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Delete Numbers.
+ /// Name of the account.
+ /// Batch numbers to delete.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Delete up to 100 Numbers on the specified account.
+ ///
+ public virtual async Task DeleteNumbersAsync(string accountName, BatchNumbersDelete body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(body, nameof(body));
+
+ using RequestContent content = body.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await DeleteNumbersAsync(accountName, content, context).ConfigureAwait(false);
+ return response;
+ }
+
+ /// Delete Numbers.
+ /// Name of the account.
+ /// Batch numbers to delete.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Delete up to 100 Numbers on the specified account.
+ ///
+ public virtual Response DeleteNumbers(string accountName, BatchNumbersDelete body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(body, nameof(body));
+
+ using RequestContent content = body.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = DeleteNumbers(accountName, content, context);
+ return response;
+ }
+
+ ///
+ /// [Protocol Method] Delete Numbers.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task DeleteNumbersAsync(string accountName, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.DeleteNumbers");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteNumbersRequest(accountName, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Delete Numbers.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response DeleteNumbers(string accountName, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.DeleteNumbers");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteNumbersRequest(accountName, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Get Number.
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Get details of a specific Number using its telephone number.
+ ///
+ public virtual async Task> GetNumberAsync(string accountName, string telephoneNumber, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetNumberAsync(accountName, telephoneNumber, requestConditions, context).ConfigureAwait(false);
+ return Response.FromValue(NumberResource.FromResponse(response), response);
+ }
+
+ /// Get Number.
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Get details of a specific Number using its telephone number.
+ ///
+ public virtual Response GetNumber(string accountName, string telephoneNumber, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetNumber(accountName, telephoneNumber, requestConditions, context);
+ return Response.FromValue(NumberResource.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Get Number.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetNumberAsync(string accountName, string telephoneNumber, RequestConditions requestConditions, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetNumber");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetNumberRequest(accountName, telephoneNumber, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Get Number.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetNumber(string accountName, string telephoneNumber, RequestConditions requestConditions, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetNumber");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetNumberRequest(accountName, telephoneNumber, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Create or replace Number.
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The resource instance.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Create or replace the details of a Number.
+ ///
+ public virtual async Task> CreateOrReplaceNumberAsync(string accountName, string telephoneNumber, NumberResource resource, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+ Argument.AssertNotNull(resource, nameof(resource));
+
+ using RequestContent content = resource.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await CreateOrReplaceNumberAsync(accountName, telephoneNumber, content, requestConditions, context).ConfigureAwait(false);
+ return Response.FromValue(NumberResource.FromResponse(response), response);
+ }
+
+ /// Create or replace Number.
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The resource instance.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Create or replace the details of a Number.
+ ///
+ public virtual Response CreateOrReplaceNumber(string accountName, string telephoneNumber, NumberResource resource, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+ Argument.AssertNotNull(resource, nameof(resource));
+
+ using RequestContent content = resource.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = CreateOrReplaceNumber(accountName, telephoneNumber, content, requestConditions, context);
+ return Response.FromValue(NumberResource.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Create or replace Number.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the body of the request.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task CreateOrReplaceNumberAsync(string accountName, string telephoneNumber, RequestContent content, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.CreateOrReplaceNumber");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrReplaceNumberRequest(accountName, telephoneNumber, content, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Create or replace Number.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the body of the request.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response CreateOrReplaceNumber(string accountName, string telephoneNumber, RequestContent content, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.CreateOrReplaceNumber");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrReplaceNumberRequest(accountName, telephoneNumber, content, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method
+ ///
+ /// [Protocol Method] Delete Number.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task DeleteNumberAsync(string accountName, string telephoneNumber, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.DeleteNumber");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteNumberRequest(accountName, telephoneNumber, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method
+ ///
+ /// [Protocol Method] Delete Number.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// Telephone number in E.164 format.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response DeleteNumber(string accountName, string telephoneNumber, RequestConditions requestConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(telephoneNumber, nameof(telephoneNumber));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.DeleteNumber");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteNumberRequest(accountName, telephoneNumber, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Get Teams Usages.
+ /// Name of the account.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Teams capability plans on the specified account.
+ ///
+ public virtual async Task> GetTeamsCapabilityPlansAsync(string accountName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetTeamsCapabilityPlansAsync(accountName, context).ConfigureAwait(false);
+ return Response.FromValue(TeamsCapabilityPlans.FromResponse(response), response);
+ }
+
+ /// Get Teams Usages.
+ /// Name of the account.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Teams capability plans on the specified account.
+ ///
+ public virtual Response GetTeamsCapabilityPlans(string accountName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetTeamsCapabilityPlans(accountName, context);
+ return Response.FromValue(TeamsCapabilityPlans.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Usages.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetTeamsCapabilityPlansAsync(string accountName, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetTeamsCapabilityPlans");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetTeamsCapabilityPlansRequest(accountName, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Usages.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetTeamsCapabilityPlans(string accountName, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetTeamsCapabilityPlans");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetTeamsCapabilityPlansRequest(accountName, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Get Teams Available Capabilities.
+ /// Name of the account.
+ /// List identifiers for a Number resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Teams Available Capabilities on the specified account.
+ ///
+ public virtual async Task> GetTeamsAvailableCapabilitiesAsync(string accountName, NumberIdentifiers body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(body, nameof(body));
+
+ using RequestContent content = body.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetTeamsAvailableCapabilitiesAsync(accountName, content, context).ConfigureAwait(false);
+ return Response.FromValue(TeamsAvailableCapabilities.FromResponse(response), response);
+ }
+
+ /// Get Teams Available Capabilities.
+ /// Name of the account.
+ /// List identifiers for a Number resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Teams Available Capabilities on the specified account.
+ ///
+ public virtual Response GetTeamsAvailableCapabilities(string accountName, NumberIdentifiers body, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(body, nameof(body));
+
+ using RequestContent content = body.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetTeamsAvailableCapabilities(accountName, content, context);
+ return Response.FromValue(TeamsAvailableCapabilities.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Available Capabilities.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetTeamsAvailableCapabilitiesAsync(string accountName, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetTeamsAvailableCapabilities");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetTeamsAvailableCapabilitiesRequest(accountName, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Available Capabilities.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetTeamsAvailableCapabilities(string accountName, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetTeamsAvailableCapabilities");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetTeamsAvailableCapabilitiesRequest(accountName, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Get Teams Civic Address.
+ /// Name of the account.
+ /// The ID of the civic address.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Get details of a specific Teams Civic Address using its ID.
+ ///
+ public virtual async Task> GetTeamsCivicAddressAsync(string accountName, string civicAddressId, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(civicAddressId, nameof(civicAddressId));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetTeamsCivicAddressAsync(accountName, civicAddressId, requestConditions, context).ConfigureAwait(false);
+ return Response.FromValue(TeamsCivicAddressResource.FromResponse(response), response);
+ }
+
+ /// Get Teams Civic Address.
+ /// Name of the account.
+ /// The ID of the civic address.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Get details of a specific Teams Civic Address using its ID.
+ ///
+ public virtual Response GetTeamsCivicAddress(string accountName, string civicAddressId, RequestConditions requestConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(civicAddressId, nameof(civicAddressId));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetTeamsCivicAddress(accountName, civicAddressId, requestConditions, context);
+ return Response.FromValue(TeamsCivicAddressResource.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Civic Address.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The ID of the civic address.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetTeamsCivicAddressAsync(string accountName, string civicAddressId, RequestConditions requestConditions, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(civicAddressId, nameof(civicAddressId));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetTeamsCivicAddress");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetTeamsCivicAddressRequest(accountName, civicAddressId, requestConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Civic Address.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The ID of the civic address.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetTeamsCivicAddress(string accountName, string civicAddressId, RequestConditions requestConditions, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+ Argument.AssertNotNullOrEmpty(civicAddressId, nameof(civicAddressId));
+
+ using var scope = ClientDiagnostics.CreateScope("Accounts.GetTeamsCivicAddress");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetTeamsCivicAddressRequest(accountName, civicAddressId, requestConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Get list of Accounts.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The cancellation token to use.
+ /// Get list of Accounts with details. An Account represents an Enterprise or collection of users.
+ ///
+ public virtual AsyncPageable GetAccountResourcesAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, string filter = null, bool? countRecords = null, CancellationToken cancellationToken = default)
+ {
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccountResourcesRequest(maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccountResourcesNextPageRequest(nextLink, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AccountResource.DeserializeAccountResource(e), ClientDiagnostics, _pipeline, "Accounts.GetAccountResources", "value", "nextLink", context);
+ }
+
+ /// Get list of Accounts.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The cancellation token to use.
+ /// Get list of Accounts with details. An Account represents an Enterprise or collection of users.
+ ///
+ public virtual Pageable GetAccountResources(int? maxCount = null, int? skip = null, int? maxpagesize = null, string filter = null, bool? countRecords = null, CancellationToken cancellationToken = default)
+ {
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccountResourcesRequest(maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccountResourcesNextPageRequest(nextLink, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AccountResource.DeserializeAccountResource(e), ClientDiagnostics, _pipeline, "Accounts.GetAccountResources", "value", "nextLink", context);
+ }
+
+ ///
+ /// [Protocol Method] Get list of Accounts
+ ///
+ /// -
+ ///
+ /// 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 number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual AsyncPageable GetAccountResourcesAsync(int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccountResourcesRequest(maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccountResourcesNextPageRequest(nextLink, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Accounts.GetAccountResources", "value", "nextLink", context);
+ }
+
+ ///
+ /// [Protocol Method] Get list of Accounts
+ ///
+ /// -
+ ///
+ /// 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 number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual Pageable GetAccountResources(int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccountResourcesRequest(maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccountResourcesNextPageRequest(nextLink, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Accounts.GetAccountResources", "value", "nextLink", context);
+ }
+
+ /// Get Numbers.
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Numbers on the specified account.
+ ///
+ public virtual AsyncPageable GetNumbersAsync(string accountName, int? maxCount = null, int? skip = null, int? maxpagesize = null, string filter = null, bool? countRecords = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNumbersRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNumbersNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NumberResource.DeserializeNumberResource(e), ClientDiagnostics, _pipeline, "Accounts.GetNumbers", "value", "nextLink", context);
+ }
+
+ /// Get Numbers.
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Numbers on the specified account.
+ ///
+ public virtual Pageable GetNumbers(string accountName, int? maxCount = null, int? skip = null, int? maxpagesize = null, string filter = null, bool? countRecords = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNumbersRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNumbersNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NumberResource.DeserializeNumberResource(e), ClientDiagnostics, _pipeline, "Accounts.GetNumbers", "value", "nextLink", context);
+ }
+
+ ///
+ /// [Protocol Method] Get Numbers.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual AsyncPageable GetNumbersAsync(string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNumbersRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNumbersNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Accounts.GetNumbers", "value", "nextLink", context);
+ }
+
+ ///
+ /// [Protocol Method] Get Numbers.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual Pageable GetNumbers(string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNumbersRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNumbersNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Accounts.GetNumbers", "value", "nextLink", context);
+ }
+
+ /// Get Teams Civic Addresses.
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Teams Civic Addresses on the specified account.
+ ///
+ public virtual AsyncPageable GetTeamsCivicAddressesAsync(string accountName, int? maxCount = null, int? skip = null, int? maxpagesize = null, string filter = null, bool? countRecords = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTeamsCivicAddressesRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTeamsCivicAddressesNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => TeamsCivicAddressResource.DeserializeTeamsCivicAddressResource(e), ClientDiagnostics, _pipeline, "Accounts.GetTeamsCivicAddresses", "value", "nextLink", context);
+ }
+
+ /// Get Teams Civic Addresses.
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Get a list of Teams Civic Addresses on the specified account.
+ ///
+ public virtual Pageable GetTeamsCivicAddresses(string accountName, int? maxCount = null, int? skip = null, int? maxpagesize = null, string filter = null, bool? countRecords = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTeamsCivicAddressesRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTeamsCivicAddressesNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => TeamsCivicAddressResource.DeserializeTeamsCivicAddressResource(e), ClientDiagnostics, _pipeline, "Accounts.GetTeamsCivicAddresses", "value", "nextLink", context);
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Civic Addresses.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual AsyncPageable GetTeamsCivicAddressesAsync(string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTeamsCivicAddressesRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTeamsCivicAddressesNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Accounts.GetTeamsCivicAddresses", "value", "nextLink", context);
+ }
+
+ ///
+ /// [Protocol Method] Get Teams Civic Addresses.
+ ///
+ /// -
+ ///
+ /// 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.
+ ///
+ ///
+ ///
+ ///
+ /// Name of the account.
+ /// The number of result items to return.
+ /// The number of result items to skip.
+ /// The maximum number of result items per page.
+ /// Filter the result list using the given expression.
+ /// Whether to return a count of the total number of records available for this request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual Pageable GetTeamsCivicAddresses(string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(accountName, nameof(accountName));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTeamsCivicAddressesRequest(accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTeamsCivicAddressesNextPageRequest(nextLink, accountName, maxCount, skip, maxpagesize, filter, countRecords, context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Accounts.GetTeamsCivicAddresses", "value", "nextLink", context);
+ }
+
+ internal HttpMessage CreateGetAccountResourcesRequest(int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ if (maxCount != null)
+ {
+ uri.AppendQuery("top", maxCount.Value, true);
+ }
+ if (skip != null)
+ {
+ uri.AppendQuery("skip", skip.Value, true);
+ }
+ if (maxpagesize != null)
+ {
+ uri.AppendQuery("maxpagesize", maxpagesize.Value, true);
+ }
+ if (filter != null)
+ {
+ uri.AppendQuery("filter", filter, true);
+ }
+ if (countRecords != null)
+ {
+ uri.AppendQuery("countRecords", countRecords.Value, true);
+ }
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ internal HttpMessage CreateGetAccountResourceRequest(string accountName, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ return message;
+ }
+
+ internal HttpMessage CreateCreateOrReplaceRequest(string accountName, RequestContent content, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200201);
+ var request = message.Request;
+ request.Method = RequestMethod.Put;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateDeleteRequest(string accountName, bool? deleteNumbers, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier204);
+ var request = message.Request;
+ request.Method = RequestMethod.Delete;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ if (deleteNumbers != null)
+ {
+ uri.AppendQuery("deleteNumbers", deleteNumbers.Value, true);
+ }
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ return message;
+ }
+
+ internal HttpMessage CreateCreateOrUpdateNumbersRequest(string accountName, 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("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath(":createOrUpdateNumbers", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateDeleteNumbersRequest(string accountName, RequestContent content, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier204);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath(":deleteNumbers", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateGetNumbersRequest(string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath("/numbers", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ if (maxCount != null)
+ {
+ uri.AppendQuery("top", maxCount.Value, true);
+ }
+ if (skip != null)
+ {
+ uri.AppendQuery("skip", skip.Value, true);
+ }
+ if (maxpagesize != null)
+ {
+ uri.AppendQuery("maxpagesize", maxpagesize.Value, true);
+ }
+ if (filter != null)
+ {
+ uri.AppendQuery("filter", filter, true);
+ }
+ if (countRecords != null)
+ {
+ uri.AppendQuery("countRecords", countRecords.Value, true);
+ }
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ internal HttpMessage CreateGetNumberRequest(string accountName, string telephoneNumber, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath("/numbers/", false);
+ uri.AppendPath(telephoneNumber, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ return message;
+ }
+
+ internal HttpMessage CreateCreateOrReplaceNumberRequest(string accountName, string telephoneNumber, RequestContent content, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200201);
+ var request = message.Request;
+ request.Method = RequestMethod.Put;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath("/numbers/", false);
+ uri.AppendPath(telephoneNumber, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateDeleteNumberRequest(string accountName, string telephoneNumber, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier204);
+ var request = message.Request;
+ request.Method = RequestMethod.Delete;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath("/numbers/", false);
+ uri.AppendPath(telephoneNumber, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ return message;
+ }
+
+ internal HttpMessage CreateGetTeamsCapabilityPlansRequest(string accountName, 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("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath(":getTeamsCapabilityPlans", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ return message;
+ }
+
+ internal HttpMessage CreateGetTeamsAvailableCapabilitiesRequest(string accountName, 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("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath(":getTeamsAvailableCapabilities", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Repeatability-Request-ID", Guid.NewGuid());
+ request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateGetTeamsCivicAddressesRequest(string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath("/teamsCivicAddresses", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ if (maxCount != null)
+ {
+ uri.AppendQuery("top", maxCount.Value, true);
+ }
+ if (skip != null)
+ {
+ uri.AppendQuery("skip", skip.Value, true);
+ }
+ if (maxpagesize != null)
+ {
+ uri.AppendQuery("maxpagesize", maxpagesize.Value, true);
+ }
+ if (filter != null)
+ {
+ uri.AppendQuery("filter", filter, true);
+ }
+ if (countRecords != null)
+ {
+ uri.AppendQuery("countRecords", countRecords.Value, true);
+ }
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ internal HttpMessage CreateGetTeamsCivicAddressRequest(string accountName, string civicAddressId, RequestConditions requestConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/accounts/", false);
+ uri.AppendPath(accountName, true);
+ uri.AppendPath("/teamsCivicAddresses/", false);
+ uri.AppendPath(civicAddressId, true);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ if (requestConditions != null)
+ {
+ request.Headers.Add(requestConditions, "R");
+ }
+ return message;
+ }
+
+ internal HttpMessage CreateGetAccountResourcesNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendRawNextLink(nextLink, false);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ internal HttpMessage CreateGetNumbersNextPageRequest(string nextLink, string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendRawNextLink(nextLink, false);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ internal HttpMessage CreateGetTeamsCivicAddressesNextPageRequest(string nextLink, string accountName, int? maxCount, int? skip, int? maxpagesize, string filter, bool? countRecords, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendRawNextLink(nextLink, false);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ 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 });
+ private static ResponseClassifier _responseClassifier200201;
+ private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 });
+ private static ResponseClassifier _responseClassifier204;
+ private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 });
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionAccountDetails.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionAccountDetails.Serialization.cs
new file mode 100644
index 000000000000..23600447e65d
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionAccountDetails.Serialization.cs
@@ -0,0 +1,151 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class AzureOperatorCallProtectionAccountDetails : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(AzureOperatorCallProtectionAccountDetails)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("enabled"u8);
+ writer.WriteBooleanValue(Enabled);
+ if (options.Format != "W" && Optional.IsDefined(NumberCount))
+ {
+ writer.WritePropertyName("numberCount"u8);
+ writer.WriteNumberValue(NumberCount.Value);
+ }
+ 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();
+ }
+
+ AzureOperatorCallProtectionAccountDetails 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(AzureOperatorCallProtectionAccountDetails)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureOperatorCallProtectionAccountDetails(document.RootElement, options);
+ }
+
+ internal static AzureOperatorCallProtectionAccountDetails DeserializeAzureOperatorCallProtectionAccountDetails(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool enabled = default;
+ long? numberCount = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("enabled"u8))
+ {
+ enabled = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("numberCount"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ numberCount = property.Value.GetInt64();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureOperatorCallProtectionAccountDetails(enabled, numberCount, 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(AzureOperatorCallProtectionAccountDetails)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureOperatorCallProtectionAccountDetails 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 DeserializeAzureOperatorCallProtectionAccountDetails(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureOperatorCallProtectionAccountDetails)} does not support reading '{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 AzureOperatorCallProtectionAccountDetails FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAzureOperatorCallProtectionAccountDetails(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionAccountDetails.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionAccountDetails.cs
new file mode 100644
index 000000000000..ff69e1df2883
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionAccountDetails.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;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// Account details specific to Azure Operator Call Protection.
+ public partial class AzureOperatorCallProtectionAccountDetails
+ {
+ ///
+ /// 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 .
+ /// Boolean indicating if the service is enabled on this Account.
+ public AzureOperatorCallProtectionAccountDetails(bool enabled)
+ {
+ Enabled = enabled;
+ }
+
+ /// Initializes a new instance of .
+ /// Boolean indicating if the service is enabled on this Account.
+ /// The count of telephone numbers associated with this account that have this backend service enabled.
+ /// Keeps track of any properties unknown to the library.
+ internal AzureOperatorCallProtectionAccountDetails(bool enabled, long? numberCount, IDictionary serializedAdditionalRawData)
+ {
+ Enabled = enabled;
+ NumberCount = numberCount;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureOperatorCallProtectionAccountDetails()
+ {
+ }
+
+ /// Boolean indicating if the service is enabled on this Account.
+ public bool Enabled { get; set; }
+ /// The count of telephone numbers associated with this account that have this backend service enabled.
+ public long? NumberCount { get; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionNumberDetails.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionNumberDetails.Serialization.cs
new file mode 100644
index 000000000000..48a9cc10cb77
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionNumberDetails.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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class AzureOperatorCallProtectionNumberDetails : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(AzureOperatorCallProtectionNumberDetails)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("enabled"u8);
+ writer.WriteBooleanValue(Enabled);
+ 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();
+ }
+
+ AzureOperatorCallProtectionNumberDetails 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(AzureOperatorCallProtectionNumberDetails)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureOperatorCallProtectionNumberDetails(document.RootElement, options);
+ }
+
+ internal static AzureOperatorCallProtectionNumberDetails DeserializeAzureOperatorCallProtectionNumberDetails(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool enabled = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("enabled"u8))
+ {
+ enabled = property.Value.GetBoolean();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureOperatorCallProtectionNumberDetails(enabled, 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(AzureOperatorCallProtectionNumberDetails)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureOperatorCallProtectionNumberDetails 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 DeserializeAzureOperatorCallProtectionNumberDetails(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureOperatorCallProtectionNumberDetails)} does not support reading '{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 AzureOperatorCallProtectionNumberDetails FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeAzureOperatorCallProtectionNumberDetails(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionNumberDetails.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionNumberDetails.cs
new file mode 100644
index 000000000000..11c9d47dbe8a
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/AzureOperatorCallProtectionNumberDetails.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 Microsoft.VoiceServices.Provisioning
+{
+ /// Details for the Azure Operator Call Protection service on this Number.
+ public partial class AzureOperatorCallProtectionNumberDetails
+ {
+ ///
+ /// 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 .
+ /// Boolean indicating if the service is enabled on this Number.
+ public AzureOperatorCallProtectionNumberDetails(bool enabled)
+ {
+ Enabled = enabled;
+ }
+
+ /// Initializes a new instance of .
+ /// Boolean indicating if the service is enabled on this Number.
+ /// Keeps track of any properties unknown to the library.
+ internal AzureOperatorCallProtectionNumberDetails(bool enabled, IDictionary serializedAdditionalRawData)
+ {
+ Enabled = enabled;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureOperatorCallProtectionNumberDetails()
+ {
+ }
+
+ /// Boolean indicating if the service is enabled on this Number.
+ public bool Enabled { get; set; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbers.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbers.Serialization.cs
new file mode 100644
index 000000000000..e83dda55446e
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbers.Serialization.cs
@@ -0,0 +1,146 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class BatchNumbers : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(BatchNumbers)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("numbers"u8);
+ writer.WriteStartArray();
+ foreach (var item in Numbers)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ 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();
+ }
+
+ BatchNumbers 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(BatchNumbers)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBatchNumbers(document.RootElement, options);
+ }
+
+ internal static BatchNumbers DeserializeBatchNumbers(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IList numbers = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("numbers"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NumberResource.DeserializeNumberResource(item, options));
+ }
+ numbers = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BatchNumbers(numbers, 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(BatchNumbers)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BatchNumbers 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 DeserializeBatchNumbers(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BatchNumbers)} does not support reading '{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 BatchNumbers FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeBatchNumbers(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbers.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbers.cs
new file mode 100644
index 000000000000..2ccea9bd7181
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbers.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 System.Linq;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// List of telephone numbers to be uploaded to an account via a PUT request.
+ public partial class BatchNumbers
+ {
+ ///
+ /// 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 list of numbers to upload. At most 100 can be uploaded in one request.
+ /// is null.
+ public BatchNumbers(IEnumerable numbers)
+ {
+ Argument.AssertNotNull(numbers, nameof(numbers));
+
+ Numbers = numbers.ToList();
+ }
+
+ /// Initializes a new instance of .
+ /// The list of numbers to upload. At most 100 can be uploaded in one request.
+ /// Keeps track of any properties unknown to the library.
+ internal BatchNumbers(IList numbers, IDictionary serializedAdditionalRawData)
+ {
+ Numbers = numbers;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal BatchNumbers()
+ {
+ }
+
+ /// The list of numbers to upload. At most 100 can be uploaded in one request.
+ public IList Numbers { get; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbersDelete.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbersDelete.Serialization.cs
new file mode 100644
index 000000000000..7b2b00762c05
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbersDelete.Serialization.cs
@@ -0,0 +1,146 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class BatchNumbersDelete : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(BatchNumbersDelete)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("numbers"u8);
+ writer.WriteStartArray();
+ foreach (var item in Numbers)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ 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();
+ }
+
+ BatchNumbersDelete 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(BatchNumbersDelete)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBatchNumbersDelete(document.RootElement, options);
+ }
+
+ internal static BatchNumbersDelete DeserializeBatchNumbersDelete(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IList numbers = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("numbers"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NumberIdentifier.DeserializeNumberIdentifier(item, options));
+ }
+ numbers = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BatchNumbersDelete(numbers, 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(BatchNumbersDelete)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BatchNumbersDelete 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 DeserializeBatchNumbersDelete(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BatchNumbersDelete)} does not support reading '{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 BatchNumbersDelete FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeBatchNumbersDelete(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbersDelete.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbersDelete.cs
new file mode 100644
index 000000000000..f43d15b08138
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/BatchNumbersDelete.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 System.Linq;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// A list of telephone numbers to delete.
+ public partial class BatchNumbersDelete
+ {
+ ///
+ /// 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 list of number to delete. At most 100 can be deleted in one request.
+ /// is null.
+ public BatchNumbersDelete(IEnumerable numbers)
+ {
+ Argument.AssertNotNull(numbers, nameof(numbers));
+
+ Numbers = numbers.ToList();
+ }
+
+ /// Initializes a new instance of .
+ /// The list of number to delete. At most 100 can be deleted in one request.
+ /// Keeps track of any properties unknown to the library.
+ internal BatchNumbersDelete(IList numbers, IDictionary serializedAdditionalRawData)
+ {
+ Numbers = numbers;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal BatchNumbersDelete()
+ {
+ }
+
+ /// The list of number to delete. At most 100 can be deleted in one request.
+ public IList Numbers { get; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/ContactDetails.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/ContactDetails.Serialization.cs
new file mode 100644
index 000000000000..c80debdcf447
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/ContactDetails.Serialization.cs
@@ -0,0 +1,189 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class ContactDetails : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(ContactDetails)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("fullName"u8);
+ writer.WriteStringValue(FullName);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("email"u8);
+ writer.WriteStringValue(Email);
+ }
+ if (options.Format != "W" && Optional.IsDefined(TelephoneNumber))
+ {
+ writer.WritePropertyName("telephoneNumber"u8);
+ writer.WriteStringValue(TelephoneNumber);
+ }
+ if (options.Format != "W" && Optional.IsDefined(CompanyName))
+ {
+ writer.WritePropertyName("companyName"u8);
+ writer.WriteStringValue(CompanyName);
+ }
+ if (options.Format != "W" && Optional.IsDefined(CompanySize))
+ {
+ writer.WritePropertyName("companySize"u8);
+ writer.WriteStringValue(CompanySize);
+ }
+ 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();
+ }
+
+ ContactDetails 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(ContactDetails)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeContactDetails(document.RootElement, options);
+ }
+
+ internal static ContactDetails DeserializeContactDetails(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string fullName = default;
+ string email = default;
+ string telephoneNumber = default;
+ string companyName = default;
+ string companySize = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("fullName"u8))
+ {
+ fullName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("email"u8))
+ {
+ email = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("telephoneNumber"u8))
+ {
+ telephoneNumber = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("companyName"u8))
+ {
+ companyName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("companySize"u8))
+ {
+ companySize = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ContactDetails(
+ fullName,
+ email,
+ telephoneNumber,
+ companyName,
+ companySize,
+ 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(ContactDetails)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ContactDetails 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 DeserializeContactDetails(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ContactDetails)} does not support reading '{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 ContactDetails FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeContactDetails(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/ContactDetails.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/ContactDetails.cs
new file mode 100644
index 000000000000..237740f97fd7
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/ContactDetails.cs
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// Contact details for an individual.
+ public partial class ContactDetails
+ {
+ ///
+ /// 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 .
+ internal ContactDetails()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The full name of the contact detail.
+ /// The email of the contact detail.
+ /// The telephone number of the contact detail.
+ /// The company name of the contact detail.
+ /// The company size of the contact detail.
+ /// Keeps track of any properties unknown to the library.
+ internal ContactDetails(string fullName, string email, string telephoneNumber, string companyName, string companySize, IDictionary serializedAdditionalRawData)
+ {
+ FullName = fullName;
+ Email = email;
+ TelephoneNumber = telephoneNumber;
+ CompanyName = companyName;
+ CompanySize = companySize;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The full name of the contact detail.
+ public string FullName { get; }
+ /// The email of the contact detail.
+ public string Email { get; }
+ /// The telephone number of the contact detail.
+ public string TelephoneNumber { get; }
+ /// The company name of the contact detail.
+ public string CompanyName { get; }
+ /// The company size of the contact detail.
+ public string CompanySize { get; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/CustomerRelationship.Serialization.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/CustomerRelationship.Serialization.cs
new file mode 100644
index 000000000000..2b1c902dc0c8
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/CustomerRelationship.Serialization.cs
@@ -0,0 +1,165 @@
+// 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 Microsoft.VoiceServices.Provisioning
+{
+ public partial class CustomerRelationship : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ 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(CustomerRelationship)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Status))
+ {
+ writer.WritePropertyName("status"u8);
+ writer.WriteStringValue(Status);
+ }
+ if (options.Format != "W" && Optional.IsDefined(LastModifiedOn))
+ {
+ writer.WritePropertyName("lastModifiedOn"u8);
+ writer.WriteStringValue(LastModifiedOn.Value, "O");
+ }
+ if (Optional.IsDefined(Comment))
+ {
+ writer.WritePropertyName("comment"u8);
+ writer.WriteStringValue(Comment);
+ }
+ 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();
+ }
+
+ CustomerRelationship 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(CustomerRelationship)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCustomerRelationship(document.RootElement, options);
+ }
+
+ internal static CustomerRelationship DeserializeCustomerRelationship(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string status = default;
+ DateTimeOffset? lastModifiedOn = default;
+ string comment = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("status"u8))
+ {
+ status = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("lastModifiedOn"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ lastModifiedOn = property.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property.NameEquals("comment"u8))
+ {
+ comment = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new CustomerRelationship(status, lastModifiedOn, comment, 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(CustomerRelationship)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CustomerRelationship 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 DeserializeCustomerRelationship(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CustomerRelationship)} does not support reading '{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 CustomerRelationship FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content);
+ return DeserializeCustomerRelationship(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/CustomerRelationship.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/CustomerRelationship.cs
new file mode 100644
index 000000000000..69c90759873f
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/CustomerRelationship.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ /// Details of a customer relationship.
+ public partial class CustomerRelationship
+ {
+ ///
+ /// 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 CustomerRelationship()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The status of the customer relationship.
+ /// The time (ISO8601 format) when the customer relationship is last modified.
+ /// The comment of the customer relationship.
+ /// Keeps track of any properties unknown to the library.
+ internal CustomerRelationship(string status, DateTimeOffset? lastModifiedOn, string comment, IDictionary serializedAdditionalRawData)
+ {
+ Status = status;
+ LastModifiedOn = lastModifiedOn;
+ Comment = comment;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The status of the customer relationship.
+ public string Status { get; set; }
+ /// The time (ISO8601 format) when the customer relationship is last modified.
+ public DateTimeOffset? LastModifiedOn { get; }
+ /// The comment of the customer relationship.
+ public string Comment { get; set; }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/Accounts.xml b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/Accounts.xml
new file mode 100644
index 000000000000..003ba76aa560
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/Accounts.xml
@@ -0,0 +1,2507 @@
+
+
+
+
+
+This sample shows how to call GetAccountResourceAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetAccountResourceAsync("");
+]]>
+This sample shows how to call GetAccountResourceAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetAccountResourceAsync("", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetAccountResource.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetAccountResource("");
+]]>
+This sample shows how to call GetAccountResource with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetAccountResource("", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetAccountResourceAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetAccountResourceAsync("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("name").ToString());
+]]>
+This sample shows how to call GetAccountResourceAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetAccountResourceAsync("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("correlationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsTenantId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("callScreening").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomain").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region1Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region2Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("subdomainStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("numberCount").ToString());
+]]>
+
+
+
+This sample shows how to call GetAccountResource and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetAccountResource("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("name").ToString());
+]]>
+This sample shows how to call GetAccountResource with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetAccountResource("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("correlationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsTenantId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("callScreening").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomain").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region1Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region2Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("subdomainStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("numberCount").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrReplaceAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+AccountResource resource = new AccountResource("");
+Response response = await client.CreateOrReplaceAsync("", resource);
+]]>
+This sample shows how to call CreateOrReplaceAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+AccountResource resource = new AccountResource("")
+{
+ CorrelationId = "",
+ ServiceDetails = new AccountServiceDetails
+ {
+ TeamsTenantId = "",
+ TeamsOperatorConnect = new TeamsOperatorConnectAccountDetails(true, true),
+ TeamsDirectRouting = new TeamsDirectRoutingAccountDetails(true, true)
+ {
+ Configuration = new TeamsDirectRoutingAccountConfig(true, "", new TeamsDirectRoutingSubdomainTokens("", "")),
+ },
+ TeamsPhoneMobile = new TeamsPhoneMobileAccountDetails(true, true),
+ ZoomPhoneCloudPeering = new ZoomPhoneCloudPeeringAccountDetails(true, true),
+ AzureOperatorCallProtection = new AzureOperatorCallProtectionAccountDetails(true),
+ },
+};
+Response response = await client.CreateOrReplaceAsync("", resource, requestConditions: null);
+]]>
+
+
+
+This sample shows how to call CreateOrReplace.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+AccountResource resource = new AccountResource("");
+Response response = client.CreateOrReplace("", resource);
+]]>
+This sample shows how to call CreateOrReplace with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+AccountResource resource = new AccountResource("")
+{
+ CorrelationId = "",
+ ServiceDetails = new AccountServiceDetails
+ {
+ TeamsTenantId = "",
+ TeamsOperatorConnect = new TeamsOperatorConnectAccountDetails(true, true),
+ TeamsDirectRouting = new TeamsDirectRoutingAccountDetails(true, true)
+ {
+ Configuration = new TeamsDirectRoutingAccountConfig(true, "", new TeamsDirectRoutingSubdomainTokens("", "")),
+ },
+ TeamsPhoneMobile = new TeamsPhoneMobileAccountDetails(true, true),
+ ZoomPhoneCloudPeering = new ZoomPhoneCloudPeeringAccountDetails(true, true),
+ AzureOperatorCallProtection = new AzureOperatorCallProtectionAccountDetails(true),
+ },
+};
+Response response = client.CreateOrReplace("", resource, requestConditions: null);
+]]>
+
+
+
+This sample shows how to call CreateOrReplaceAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ name = "",
+});
+Response response = await client.CreateOrReplaceAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("name").ToString());
+]]>
+This sample shows how to call CreateOrReplaceAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ name = "",
+ correlationId = "",
+ serviceDetails = new
+ {
+ teamsTenantId = "",
+ teamsOperatorConnect = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ },
+ teamsDirectRouting = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ configuration = new
+ {
+ callScreening = true,
+ subdomain = "",
+ subdomainTokens = new
+ {
+ region1Token = "",
+ region2Token = "",
+ },
+ },
+ },
+ teamsPhoneMobile = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ },
+ zoomPhoneCloudPeering = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ },
+ azureOperatorCallProtection = new
+ {
+ enabled = true,
+ },
+ },
+});
+Response response = await client.CreateOrReplaceAsync("", content, requestConditions: null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("correlationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsTenantId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("callScreening").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomain").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region1Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region2Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("subdomainStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("numberCount").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrReplace and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ name = "",
+});
+Response response = client.CreateOrReplace("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("name").ToString());
+]]>
+This sample shows how to call CreateOrReplace with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ name = "",
+ correlationId = "",
+ serviceDetails = new
+ {
+ teamsTenantId = "",
+ teamsOperatorConnect = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ },
+ teamsDirectRouting = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ configuration = new
+ {
+ callScreening = true,
+ subdomain = "",
+ subdomainTokens = new
+ {
+ region1Token = "",
+ region2Token = "",
+ },
+ },
+ },
+ teamsPhoneMobile = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ },
+ zoomPhoneCloudPeering = new
+ {
+ syncEnabled = true,
+ enabled = true,
+ },
+ azureOperatorCallProtection = new
+ {
+ enabled = true,
+ },
+ },
+});
+Response response = client.CreateOrReplace("", content, requestConditions: null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("correlationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsTenantId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("callScreening").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomain").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region1Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region2Token").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("subdomainStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("syncEnabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("numberCount").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("numberCount").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.DeleteAsync("");
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.DeleteAsync("", deleteNumbers: true, requestConditions: null);
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call Delete.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.Delete("");
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call Delete with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.Delete("", deleteNumbers: true, requestConditions: null);
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateNumbersAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbers body = new BatchNumbers(new NumberResource[]
+{
+ new NumberResource("", "", new NumberServiceDetails())
+});
+Response response = await client.CreateOrUpdateNumbersAsync("", body);
+]]>
+This sample shows how to call CreateOrUpdateNumbersAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbers body = new BatchNumbers(new NumberResource[]
+{
+ new NumberResource("", "", new NumberServiceDetails
+ {
+ TeamsOperatorConnect = new TeamsOperatorConnectNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsOperatorConnectNumberConfig("", new string[]{""})
+ {
+ AdditionalUsages = {""},
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ TeamsDirectRouting = new TeamsDirectRoutingNumberDetails(true),
+ TeamsPhoneMobile = new TeamsPhoneMobileNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsPhoneMobileNumberConfig("", new string[]{""})
+ {
+ AdditionalUsages = {""},
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ ZoomPhoneCloudPeering = new ZoomPhoneCloudPeeringNumberDetails(true),
+ AzureOperatorCallProtection = new AzureOperatorCallProtectionNumberDetails(true),
+ })
+ {
+ Configuration = new NumberConfiguration
+ {
+ CustomSipHeader = "",
+ },
+ }
+});
+Response response = await client.CreateOrUpdateNumbersAsync("", body);
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateNumbers.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbers body = new BatchNumbers(new NumberResource[]
+{
+ new NumberResource("", "", new NumberServiceDetails())
+});
+Response response = client.CreateOrUpdateNumbers("", body);
+]]>
+This sample shows how to call CreateOrUpdateNumbers with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbers body = new BatchNumbers(new NumberResource[]
+{
+ new NumberResource("", "", new NumberServiceDetails
+ {
+ TeamsOperatorConnect = new TeamsOperatorConnectNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsOperatorConnectNumberConfig("", new string[]{""})
+ {
+ AdditionalUsages = {""},
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ TeamsDirectRouting = new TeamsDirectRoutingNumberDetails(true),
+ TeamsPhoneMobile = new TeamsPhoneMobileNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsPhoneMobileNumberConfig("", new string[]{""})
+ {
+ AdditionalUsages = {""},
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ ZoomPhoneCloudPeering = new ZoomPhoneCloudPeeringNumberDetails(true),
+ AzureOperatorCallProtection = new AzureOperatorCallProtectionNumberDetails(true),
+ })
+ {
+ Configuration = new NumberConfiguration
+ {
+ CustomSipHeader = "",
+ },
+ }
+});
+Response response = client.CreateOrUpdateNumbers("", body);
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateNumbersAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new object(),
+ }
+ },
+});
+Response response = await client.CreateOrUpdateNumbersAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call CreateOrUpdateNumbersAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new
+ {
+ teamsOperatorConnect = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ teamsDirectRouting = new
+ {
+ enabled = true,
+ },
+ teamsPhoneMobile = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ zoomPhoneCloudPeering = new
+ {
+ enabled = true,
+ },
+ azureOperatorCallProtection = new
+ {
+ enabled = true,
+ },
+ },
+ configuration = new
+ {
+ customSipHeader = "",
+ },
+ }
+ },
+});
+Response response = await client.CreateOrUpdateNumbersAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("configuration").GetProperty("customSipHeader").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateNumbers and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new object(),
+ }
+ },
+});
+Response response = client.CreateOrUpdateNumbers("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call CreateOrUpdateNumbers with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new
+ {
+ teamsOperatorConnect = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ teamsDirectRouting = new
+ {
+ enabled = true,
+ },
+ teamsPhoneMobile = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ zoomPhoneCloudPeering = new
+ {
+ enabled = true,
+ },
+ azureOperatorCallProtection = new
+ {
+ enabled = true,
+ },
+ },
+ configuration = new
+ {
+ customSipHeader = "",
+ },
+ }
+ },
+});
+Response response = client.CreateOrUpdateNumbers("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("numbers")[0].GetProperty("configuration").GetProperty("customSipHeader").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteNumbersAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbersDelete body = new BatchNumbersDelete(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = await client.DeleteNumbersAsync("", body);
+]]>
+This sample shows how to call DeleteNumbersAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbersDelete body = new BatchNumbersDelete(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = await client.DeleteNumbersAsync("", body);
+]]>
+
+
+
+This sample shows how to call DeleteNumbers.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbersDelete body = new BatchNumbersDelete(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = client.DeleteNumbers("", body);
+]]>
+This sample shows how to call DeleteNumbers with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+BatchNumbersDelete body = new BatchNumbersDelete(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = client.DeleteNumbers("", body);
+]]>
+
+
+
+This sample shows how to call DeleteNumbersAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = await client.DeleteNumbersAsync("", content);
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteNumbersAsync with all parameters and request content.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = await client.DeleteNumbersAsync("", content);
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteNumbers.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = client.DeleteNumbers("", content);
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteNumbers with all parameters and request content.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = client.DeleteNumbers("", content);
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetNumberAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetNumberAsync("", "");
+]]>
+This sample shows how to call GetNumberAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetNumberAsync("", "", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetNumber.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetNumber("", "");
+]]>
+This sample shows how to call GetNumber with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetNumber("", "", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetNumberAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetNumberAsync("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call GetNumberAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetNumberAsync("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("configuration").GetProperty("customSipHeader").ToString());
+]]>
+
+
+
+This sample shows how to call GetNumber and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetNumber("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call GetNumber with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetNumber("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("configuration").GetProperty("customSipHeader").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrReplaceNumberAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberResource resource = new NumberResource("", "", new NumberServiceDetails());
+Response response = await client.CreateOrReplaceNumberAsync("", "", resource);
+]]>
+This sample shows how to call CreateOrReplaceNumberAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberResource resource = new NumberResource("", "", new NumberServiceDetails
+{
+ TeamsOperatorConnect = new TeamsOperatorConnectNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsOperatorConnectNumberConfig("", new string[] { "" })
+ {
+ AdditionalUsages = { "" },
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ TeamsDirectRouting = new TeamsDirectRoutingNumberDetails(true),
+ TeamsPhoneMobile = new TeamsPhoneMobileNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsPhoneMobileNumberConfig("", new string[] { "" })
+ {
+ AdditionalUsages = { "" },
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ ZoomPhoneCloudPeering = new ZoomPhoneCloudPeeringNumberDetails(true),
+ AzureOperatorCallProtection = new AzureOperatorCallProtectionNumberDetails(true),
+})
+{
+ Configuration = new NumberConfiguration
+ {
+ CustomSipHeader = "",
+ },
+};
+Response response = await client.CreateOrReplaceNumberAsync("", "", resource, requestConditions: null);
+]]>
+
+
+
+This sample shows how to call CreateOrReplaceNumber.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberResource resource = new NumberResource("", "", new NumberServiceDetails());
+Response response = client.CreateOrReplaceNumber("", "", resource);
+]]>
+This sample shows how to call CreateOrReplaceNumber with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberResource resource = new NumberResource("", "", new NumberServiceDetails
+{
+ TeamsOperatorConnect = new TeamsOperatorConnectNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsOperatorConnectNumberConfig("", new string[] { "" })
+ {
+ AdditionalUsages = { "" },
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ TeamsDirectRouting = new TeamsDirectRoutingNumberDetails(true),
+ TeamsPhoneMobile = new TeamsPhoneMobileNumberDetails(true)
+ {
+ AssignmentStatus = TelephoneNumberAssignmentStatus.Assigned,
+ Configuration = new TeamsPhoneMobileNumberConfig("", new string[] { "" })
+ {
+ AdditionalUsages = { "" },
+ CivicAddressId = "",
+ LocationId = "",
+ AllowTenantAddressUpdate = true,
+ DisplayedCountryCode = "",
+ },
+ },
+ ZoomPhoneCloudPeering = new ZoomPhoneCloudPeeringNumberDetails(true),
+ AzureOperatorCallProtection = new AzureOperatorCallProtectionNumberDetails(true),
+})
+{
+ Configuration = new NumberConfiguration
+ {
+ CustomSipHeader = "",
+ },
+};
+Response response = client.CreateOrReplaceNumber("", "", resource, requestConditions: null);
+]]>
+
+
+
+This sample shows how to call CreateOrReplaceNumberAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new object(),
+});
+Response response = await client.CreateOrReplaceNumberAsync("", "", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call CreateOrReplaceNumberAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new
+ {
+ teamsOperatorConnect = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ teamsDirectRouting = new
+ {
+ enabled = true,
+ },
+ teamsPhoneMobile = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ zoomPhoneCloudPeering = new
+ {
+ enabled = true,
+ },
+ azureOperatorCallProtection = new
+ {
+ enabled = true,
+ },
+ },
+ configuration = new
+ {
+ customSipHeader = "",
+ },
+});
+Response response = await client.CreateOrReplaceNumberAsync("", "", content, requestConditions: null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("configuration").GetProperty("customSipHeader").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrReplaceNumber and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new object(),
+});
+Response response = client.CreateOrReplaceNumber("", "", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call CreateOrReplaceNumber with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ telephoneNumber = "",
+ accountName = "",
+ serviceDetails = new
+ {
+ teamsOperatorConnect = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ teamsDirectRouting = new
+ {
+ enabled = true,
+ },
+ teamsPhoneMobile = new
+ {
+ enabled = true,
+ assignmentStatus = "assigned",
+ configuration = new
+ {
+ usage = "",
+ choosableCapabilities = new object[]
+ {
+ ""
+ },
+ additionalUsages = new object[]
+ {
+ ""
+ },
+ civicAddressId = "",
+ locationId = "",
+ allowTenantAddressUpdate = true,
+ displayedCountryCode = "",
+ },
+ },
+ zoomPhoneCloudPeering = new
+ {
+ enabled = true,
+ },
+ azureOperatorCallProtection = new
+ {
+ enabled = true,
+ },
+ },
+ configuration = new
+ {
+ customSipHeader = "",
+ },
+});
+Response response = client.CreateOrReplaceNumber("", "", content, requestConditions: null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("configuration").GetProperty("customSipHeader").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteNumberAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.DeleteNumberAsync("", "");
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteNumberAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.DeleteNumberAsync("", "", requestConditions: null);
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteNumber.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.DeleteNumber("", "");
+
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call DeleteNumber with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.DeleteNumber("", "", requestConditions: null);
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetTeamsCapabilityPlansAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCapabilityPlansAsync("");
+]]>
+This sample shows how to call GetTeamsCapabilityPlansAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCapabilityPlansAsync("");
+]]>
+
+
+
+This sample shows how to call GetTeamsCapabilityPlans.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCapabilityPlans("");
+]]>
+This sample shows how to call GetTeamsCapabilityPlans with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCapabilityPlans("");
+]]>
+
+
+
+This sample shows how to call GetTeamsCapabilityPlansAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCapabilityPlansAsync("", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("supportsTollFree").ToString());
+]]>
+This sample shows how to call GetTeamsCapabilityPlansAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCapabilityPlansAsync("", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("offerTypes")[0].ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("mandatoryCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("supportsTollFree").ToString());
+]]>
+
+
+
+This sample shows how to call GetTeamsCapabilityPlans and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCapabilityPlans("", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("supportsTollFree").ToString());
+]]>
+This sample shows how to call GetTeamsCapabilityPlans with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCapabilityPlans("", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("name").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("offerTypes")[0].ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("mandatoryCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("capabilityPlans")[0].GetProperty("supportsTollFree").ToString());
+]]>
+
+
+
+This sample shows how to call GetTeamsAvailableCapabilitiesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberIdentifiers body = new NumberIdentifiers(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = await client.GetTeamsAvailableCapabilitiesAsync("", body);
+]]>
+This sample shows how to call GetTeamsAvailableCapabilitiesAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberIdentifiers body = new NumberIdentifiers(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = await client.GetTeamsAvailableCapabilitiesAsync("", body);
+]]>
+
+
+
+This sample shows how to call GetTeamsAvailableCapabilities.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberIdentifiers body = new NumberIdentifiers(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = client.GetTeamsAvailableCapabilities("", body);
+]]>
+This sample shows how to call GetTeamsAvailableCapabilities with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+NumberIdentifiers body = new NumberIdentifiers(new NumberIdentifier[]
+{
+ new NumberIdentifier("")
+});
+Response response = client.GetTeamsAvailableCapabilities("", body);
+]]>
+
+
+
+This sample shows how to call GetTeamsAvailableCapabilitiesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = await client.GetTeamsAvailableCapabilitiesAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("availableCapabilities")[0].ToString());
+]]>
+This sample shows how to call GetTeamsAvailableCapabilitiesAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = await client.GetTeamsAvailableCapabilitiesAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("availableCapabilities")[0].ToString());
+]]>
+
+
+
+This sample shows how to call GetTeamsAvailableCapabilities and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = client.GetTeamsAvailableCapabilities("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("availableCapabilities")[0].ToString());
+]]>
+This sample shows how to call GetTeamsAvailableCapabilities with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ numbers = new object[]
+ {
+ new
+ {
+ telephoneNumber = "",
+ }
+ },
+});
+Response response = client.GetTeamsAvailableCapabilities("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("availableCapabilities")[0].ToString());
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddressAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCivicAddressAsync("", "");
+]]>
+This sample shows how to call GetTeamsCivicAddressAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCivicAddressAsync("", "", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddress.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCivicAddress("", "");
+]]>
+This sample shows how to call GetTeamsCivicAddress with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCivicAddress("", "", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddressAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCivicAddressAsync("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+]]>
+This sample shows how to call GetTeamsCivicAddressAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = await client.GetTeamsCivicAddressAsync("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("country").ToString());
+Console.WriteLine(result.GetProperty("houseNumber").ToString());
+Console.WriteLine(result.GetProperty("houseNumberSuffix").ToString());
+Console.WriteLine(result.GetProperty("preDirectional").ToString());
+Console.WriteLine(result.GetProperty("streetName").ToString());
+Console.WriteLine(result.GetProperty("streetSuffix").ToString());
+Console.WriteLine(result.GetProperty("postDirectional").ToString());
+Console.WriteLine(result.GetProperty("stateOrProvince").ToString());
+Console.WriteLine(result.GetProperty("countyOrDistrict").ToString());
+Console.WriteLine(result.GetProperty("cityOrTown").ToString());
+Console.WriteLine(result.GetProperty("cityOrTownAlias").ToString());
+Console.WriteLine(result.GetProperty("postalOrZipCode").ToString());
+Console.WriteLine(result.GetProperty("description").ToString());
+Console.WriteLine(result.GetProperty("companyName").ToString());
+Console.WriteLine(result.GetProperty("companyId").ToString());
+Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+Console.WriteLine(result.GetProperty("validationStatus").ToString());
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+Console.WriteLine(result.GetProperty("partnerId").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("description").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("additionalInfo").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("isDefault").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("elin").ToString());
+Console.WriteLine(result.GetProperty("latitude").ToString());
+Console.WriteLine(result.GetProperty("longitude").ToString());
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddress and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCivicAddress("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+]]>
+This sample shows how to call GetTeamsCivicAddress with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+Response response = client.GetTeamsCivicAddress("", "", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("country").ToString());
+Console.WriteLine(result.GetProperty("houseNumber").ToString());
+Console.WriteLine(result.GetProperty("houseNumberSuffix").ToString());
+Console.WriteLine(result.GetProperty("preDirectional").ToString());
+Console.WriteLine(result.GetProperty("streetName").ToString());
+Console.WriteLine(result.GetProperty("streetSuffix").ToString());
+Console.WriteLine(result.GetProperty("postDirectional").ToString());
+Console.WriteLine(result.GetProperty("stateOrProvince").ToString());
+Console.WriteLine(result.GetProperty("countyOrDistrict").ToString());
+Console.WriteLine(result.GetProperty("cityOrTown").ToString());
+Console.WriteLine(result.GetProperty("cityOrTownAlias").ToString());
+Console.WriteLine(result.GetProperty("postalOrZipCode").ToString());
+Console.WriteLine(result.GetProperty("description").ToString());
+Console.WriteLine(result.GetProperty("companyName").ToString());
+Console.WriteLine(result.GetProperty("companyId").ToString());
+Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+Console.WriteLine(result.GetProperty("validationStatus").ToString());
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+Console.WriteLine(result.GetProperty("partnerId").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("description").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("additionalInfo").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("isDefault").ToString());
+Console.WriteLine(result.GetProperty("locations")[0].GetProperty("elin").ToString());
+Console.WriteLine(result.GetProperty("latitude").ToString());
+Console.WriteLine(result.GetProperty("longitude").ToString());
+]]>
+
+
+
+This sample shows how to call GetAccountResourcesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (AccountResource item in client.GetAccountResourcesAsync())
+{
+}
+]]>
+This sample shows how to call GetAccountResourcesAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (AccountResource item in client.GetAccountResourcesAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetAccountResources.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (AccountResource item in client.GetAccountResources())
+{
+}
+]]>
+This sample shows how to call GetAccountResources with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (AccountResource item in client.GetAccountResources(maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetAccountResourcesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (BinaryData item in client.GetAccountResourcesAsync(null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("name").ToString());
+}
+]]>
+This sample shows how to call GetAccountResourcesAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (BinaryData item in client.GetAccountResourcesAsync(1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("name").ToString());
+ Console.WriteLine(result.GetProperty("correlationId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsTenantId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("callScreening").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomain").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region1Token").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region2Token").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("subdomainStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("numberCount").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetAccountResources and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (BinaryData item in client.GetAccountResources(null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("name").ToString());
+}
+]]>
+This sample shows how to call GetAccountResources with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (BinaryData item in client.GetAccountResources(1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("name").ToString());
+ Console.WriteLine(result.GetProperty("correlationId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsTenantId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("callScreening").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomain").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region1Token").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("configuration").GetProperty("subdomainTokens").GetProperty("region2Token").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("subdomainStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("syncEnabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("numberCount").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("numberCount").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetNumbersAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (NumberResource item in client.GetNumbersAsync(""))
+{
+}
+]]>
+This sample shows how to call GetNumbersAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (NumberResource item in client.GetNumbersAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetNumbers.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (NumberResource item in client.GetNumbers(""))
+{
+}
+]]>
+This sample shows how to call GetNumbers with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (NumberResource item in client.GetNumbers("", maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetNumbersAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (BinaryData item in client.GetNumbersAsync("", null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+ Console.WriteLine(result.GetProperty("accountName").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").ToString());
+}
+]]>
+This sample shows how to call GetNumbersAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (BinaryData item in client.GetNumbersAsync("", 1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+ Console.WriteLine(result.GetProperty("accountName").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("configuration").GetProperty("customSipHeader").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetNumbers and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (BinaryData item in client.GetNumbers("", null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+ Console.WriteLine(result.GetProperty("accountName").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").ToString());
+}
+]]>
+This sample shows how to call GetNumbers with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (BinaryData item in client.GetNumbers("", 1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("telephoneNumber").ToString());
+ Console.WriteLine(result.GetProperty("accountName").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+ Console.WriteLine(result.GetProperty("configuration").GetProperty("customSipHeader").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddressesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (TeamsCivicAddressResource item in client.GetTeamsCivicAddressesAsync(""))
+{
+}
+]]>
+This sample shows how to call GetTeamsCivicAddressesAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (TeamsCivicAddressResource item in client.GetTeamsCivicAddressesAsync("", maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddresses.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (TeamsCivicAddressResource item in client.GetTeamsCivicAddresses(""))
+{
+}
+]]>
+This sample shows how to call GetTeamsCivicAddresses with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (TeamsCivicAddressResource item in client.GetTeamsCivicAddresses("", maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddressesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (BinaryData item in client.GetTeamsCivicAddressesAsync("", null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+}
+]]>
+This sample shows how to call GetTeamsCivicAddressesAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+await foreach (BinaryData item in client.GetTeamsCivicAddressesAsync("", 1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("country").ToString());
+ Console.WriteLine(result.GetProperty("houseNumber").ToString());
+ Console.WriteLine(result.GetProperty("houseNumberSuffix").ToString());
+ Console.WriteLine(result.GetProperty("preDirectional").ToString());
+ Console.WriteLine(result.GetProperty("streetName").ToString());
+ Console.WriteLine(result.GetProperty("streetSuffix").ToString());
+ Console.WriteLine(result.GetProperty("postDirectional").ToString());
+ Console.WriteLine(result.GetProperty("stateOrProvince").ToString());
+ Console.WriteLine(result.GetProperty("countyOrDistrict").ToString());
+ Console.WriteLine(result.GetProperty("cityOrTown").ToString());
+ Console.WriteLine(result.GetProperty("cityOrTownAlias").ToString());
+ Console.WriteLine(result.GetProperty("postalOrZipCode").ToString());
+ Console.WriteLine(result.GetProperty("description").ToString());
+ Console.WriteLine(result.GetProperty("companyName").ToString());
+ Console.WriteLine(result.GetProperty("companyId").ToString());
+ Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+ Console.WriteLine(result.GetProperty("validationStatus").ToString());
+ Console.WriteLine(result.GetProperty("tenantId").ToString());
+ Console.WriteLine(result.GetProperty("partnerId").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("civicAddressId").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("description").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("additionalInfo").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("isDefault").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("elin").ToString());
+ Console.WriteLine(result.GetProperty("latitude").ToString());
+ Console.WriteLine(result.GetProperty("longitude").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetTeamsCivicAddresses and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (BinaryData item in client.GetTeamsCivicAddresses("", null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+}
+]]>
+This sample shows how to call GetTeamsCivicAddresses with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+Accounts client = new VoiceServicesClient(endpoint, credential).GetAccountsClient();
+
+foreach (BinaryData item in client.GetTeamsCivicAddresses("", 1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("country").ToString());
+ Console.WriteLine(result.GetProperty("houseNumber").ToString());
+ Console.WriteLine(result.GetProperty("houseNumberSuffix").ToString());
+ Console.WriteLine(result.GetProperty("preDirectional").ToString());
+ Console.WriteLine(result.GetProperty("streetName").ToString());
+ Console.WriteLine(result.GetProperty("streetSuffix").ToString());
+ Console.WriteLine(result.GetProperty("postDirectional").ToString());
+ Console.WriteLine(result.GetProperty("stateOrProvince").ToString());
+ Console.WriteLine(result.GetProperty("countyOrDistrict").ToString());
+ Console.WriteLine(result.GetProperty("cityOrTown").ToString());
+ Console.WriteLine(result.GetProperty("cityOrTownAlias").ToString());
+ Console.WriteLine(result.GetProperty("postalOrZipCode").ToString());
+ Console.WriteLine(result.GetProperty("description").ToString());
+ Console.WriteLine(result.GetProperty("companyName").ToString());
+ Console.WriteLine(result.GetProperty("companyId").ToString());
+ Console.WriteLine(result.GetProperty("defaultLocationId").ToString());
+ Console.WriteLine(result.GetProperty("validationStatus").ToString());
+ Console.WriteLine(result.GetProperty("tenantId").ToString());
+ Console.WriteLine(result.GetProperty("partnerId").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("civicAddressId").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("description").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("additionalInfo").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("isDefault").ToString());
+ Console.WriteLine(result.GetProperty("locations")[0].GetProperty("elin").ToString());
+ Console.WriteLine(result.GetProperty("latitude").ToString());
+ Console.WriteLine(result.GetProperty("longitude").ToString());
+}
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/TeamsRequestsForInformation.xml b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/TeamsRequestsForInformation.xml
new file mode 100644
index 000000000000..0a6481c05eb9
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/TeamsRequestsForInformation.xml
@@ -0,0 +1,411 @@
+
+
+
+
+
+This sample shows how to call GetRequestForInformationAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = await client.GetRequestForInformationAsync("");
+]]>
+This sample shows how to call GetRequestForInformationAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = await client.GetRequestForInformationAsync("", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetRequestForInformation.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = client.GetRequestForInformation("");
+]]>
+This sample shows how to call GetRequestForInformation with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = client.GetRequestForInformation("", requestConditions: null);
+]]>
+
+
+
+This sample shows how to call GetRequestForInformationAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = await client.GetRequestForInformationAsync("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+]]>
+This sample shows how to call GetRequestForInformationAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = await client.GetRequestForInformationAsync("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("productContext").ToString());
+Console.WriteLine(result.GetProperty("operatorId").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("consentedOn").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("consentedCountries")[0].ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("fullName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("email").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companyName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companySize").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("comment").ToString());
+]]>
+
+
+
+This sample shows how to call GetRequestForInformation and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = client.GetRequestForInformation("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+]]>
+This sample shows how to call GetRequestForInformation with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+Response response = client.GetRequestForInformation("", null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("productContext").ToString());
+Console.WriteLine(result.GetProperty("operatorId").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("consentedOn").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("consentedCountries")[0].ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("fullName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("email").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companyName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companySize").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("comment").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateRequestForInformationAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+using RequestContent content = RequestContent.Create(new object());
+Response response = await client.CreateOrUpdateRequestForInformationAsync("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+]]>
+This sample shows how to call CreateOrUpdateRequestForInformationAsync with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ customerRelationship = new
+ {
+ status = "",
+ comment = "",
+ },
+});
+Response response = await client.CreateOrUpdateRequestForInformationAsync("", content, requestConditions: null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("productContext").ToString());
+Console.WriteLine(result.GetProperty("operatorId").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("consentedOn").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("consentedCountries")[0].ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("fullName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("email").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companyName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companySize").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("comment").ToString());
+]]>
+
+
+
+This sample shows how to call CreateOrUpdateRequestForInformation and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+using RequestContent content = RequestContent.Create(new object());
+Response response = client.CreateOrUpdateRequestForInformation("", content);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+]]>
+This sample shows how to call CreateOrUpdateRequestForInformation with all parameters and request content and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+using RequestContent content = RequestContent.Create(new
+{
+ customerRelationship = new
+ {
+ status = "",
+ comment = "",
+ },
+});
+Response response = client.CreateOrUpdateRequestForInformation("", content, requestConditions: null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+Console.WriteLine(result.GetProperty("tenantId").ToString());
+Console.WriteLine(result.GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("productContext").ToString());
+Console.WriteLine(result.GetProperty("operatorId").ToString());
+Console.WriteLine(result.GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("consentedOn").ToString());
+Console.WriteLine(result.GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("consentedCountries")[0].ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("fullName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("email").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companyName").ToString());
+Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companySize").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("status").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("lastModifiedOn").ToString());
+Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("comment").ToString());
+]]>
+
+
+
+This sample shows how to call GetRequestForInformationResourcesAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+await foreach (RequestForInformationResource item in client.GetRequestForInformationResourcesAsync())
+{
+}
+]]>
+This sample shows how to call GetRequestForInformationResourcesAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+await foreach (RequestForInformationResource item in client.GetRequestForInformationResourcesAsync(maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetRequestForInformationResources.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+foreach (RequestForInformationResource item in client.GetRequestForInformationResources())
+{
+}
+]]>
+This sample shows how to call GetRequestForInformationResources with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+foreach (RequestForInformationResource item in client.GetRequestForInformationResources(maxCount: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true))
+{
+}
+]]>
+
+
+
+This sample shows how to call GetRequestForInformationResourcesAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+await foreach (BinaryData item in client.GetRequestForInformationResourcesAsync(null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("tenantId").ToString());
+}
+]]>
+This sample shows how to call GetRequestForInformationResourcesAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+await foreach (BinaryData item in client.GetRequestForInformationResourcesAsync(1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("tenantId").ToString());
+ Console.WriteLine(result.GetProperty("accountName").ToString());
+ Console.WriteLine(result.GetProperty("productContext").ToString());
+ Console.WriteLine(result.GetProperty("operatorId").ToString());
+ Console.WriteLine(result.GetProperty("status").ToString());
+ Console.WriteLine(result.GetProperty("consentedOn").ToString());
+ Console.WriteLine(result.GetProperty("lastModifiedOn").ToString());
+ Console.WriteLine(result.GetProperty("consentedCountries")[0].ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("fullName").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("email").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("telephoneNumber").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companyName").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companySize").ToString());
+ Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("status").ToString());
+ Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("lastModifiedOn").ToString());
+ Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("comment").ToString());
+}
+]]>
+
+
+
+This sample shows how to call GetRequestForInformationResources and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+foreach (BinaryData item in client.GetRequestForInformationResources(null, null, null, null, null, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("tenantId").ToString());
+}
+]]>
+This sample shows how to call GetRequestForInformationResources with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+TeamsRequestsForInformation client = new VoiceServicesClient(endpoint, credential).GetTeamsRequestsForInformationClient();
+
+foreach (BinaryData item in client.GetRequestForInformationResources(1234, 1234, 1234, "", true, null))
+{
+ JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
+ Console.WriteLine(result.GetProperty("serviceProvisioningStatus").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ Console.WriteLine(result.GetProperty("tenantId").ToString());
+ Console.WriteLine(result.GetProperty("accountName").ToString());
+ Console.WriteLine(result.GetProperty("productContext").ToString());
+ Console.WriteLine(result.GetProperty("operatorId").ToString());
+ Console.WriteLine(result.GetProperty("status").ToString());
+ Console.WriteLine(result.GetProperty("consentedOn").ToString());
+ Console.WriteLine(result.GetProperty("lastModifiedOn").ToString());
+ Console.WriteLine(result.GetProperty("consentedCountries")[0].ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("fullName").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("email").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("telephoneNumber").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companyName").ToString());
+ Console.WriteLine(result.GetProperty("contacts")[0].GetProperty("companySize").ToString());
+ Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("status").ToString());
+ Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("lastModifiedOn").ToString());
+ Console.WriteLine(result.GetProperty("customerRelationship").GetProperty("comment").ToString());
+}
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/VoiceServicesClient.xml b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/VoiceServicesClient.xml
new file mode 100644
index 000000000000..5f9ee442c7d6
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Docs/VoiceServicesClient.xml
@@ -0,0 +1,171 @@
+
+
+
+
+
+This sample shows how to call GetNumbersAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = await client.GetNumbersAsync();
+]]>
+This sample shows how to call GetNumbersAsync with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = await client.GetNumbersAsync(top: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true);
+]]>
+
+
+
+This sample shows how to call GetNumbers.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = client.GetNumbers();
+]]>
+This sample shows how to call GetNumbers with all parameters.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = client.GetNumbers(top: 1234, skip: 1234, maxpagesize: 1234, filter: "", countRecords: true);
+]]>
+
+
+
+This sample shows how to call GetNumbersAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = await client.GetNumbersAsync(null, null, null, null, null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call GetNumbersAsync with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = await client.GetNumbersAsync(1234, 1234, 1234, "", true, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("configuration").GetProperty("customSipHeader").ToString());
+Console.WriteLine(result.GetProperty("nextLink").ToString());
+]]>
+
+
+
+This sample shows how to call GetNumbers and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = client.GetNumbers(null, null, null, null, null, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").ToString());
+]]>
+This sample shows how to call GetNumbers with all parameters and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+VoiceServicesClient client = new VoiceServicesClient(endpoint, credential);
+
+Response response = client.GetNumbers(1234, 1234, 1234, "", true, null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningStatus").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("message").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("target").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceProvisioningErrors")[0].GetProperty("innererror").GetProperty("code").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("telephoneNumber").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("accountName").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsOperatorConnect").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsDirectRouting").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("assignmentStatus").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("usage").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("choosableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("acquiredCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("availableCapabilities")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("additionalUsages")[0].ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("civicAddressId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("locationId").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("allowTenantAddressUpdate").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("teamsPhoneMobile").GetProperty("configuration").GetProperty("displayedCountryCode").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("zoomPhoneCloudPeering").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("serviceDetails").GetProperty("azureOperatorCallProtection").GetProperty("enabled").ToString());
+Console.WriteLine(result.GetProperty("value")[0].GetProperty("configuration").GetProperty("customSipHeader").ToString());
+Console.WriteLine(result.GetProperty("nextLink").ToString());
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/Argument.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..17d6ef6480c9
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..b48d55916b5b
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (IsUndefined)
+ {
+ value = default;
+ return false;
+ }
+ return EnsureDictionary().TryGetValue(key, out value);
+ }
+
+ public IDictionary EnsureDictionary()
+ {
+ return _innerDictionary ??= new Dictionary();
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ChangeTrackingList.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 000000000000..5758e18aa7f5
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ internal class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ public bool IsUndefined => _innerList == null;
+
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ public T this[int index]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return EnsureList()[index];
+ }
+ set
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList()[index] = value;
+ }
+ }
+
+ public void Reset()
+ {
+ _innerList = null;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureList().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList().RemoveAt(index);
+ }
+
+ public IList EnsureList()
+ {
+ return _innerList ??= new List();
+ }
+ }
+}
diff --git a/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..f824c3b6f6d6
--- /dev/null
+++ b/sdk/2024-02-29-preview/Microsoft.VoiceServices.Provisioning/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,398 @@
+// 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.Diagnostics;
+using System.Globalization;
+using System.Text.Json;
+using System.Xml;
+using Azure.Core;
+
+namespace Microsoft.VoiceServices.Provisioning
+{
+ internal static class ModelSerializationExtensions
+ {
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+
+ public static object GetObject(this JsonElement element)
+ {
+ switch (element.ValueKind)
+ {
+ case JsonValueKind.String:
+ return element.GetString();
+ case JsonValueKind.Number:
+ if (element.TryGetInt32(out int intValue))
+ {
+ return intValue;
+ }
+ if (element.TryGetInt64(out long longValue))
+ {
+ return longValue;
+ }
+ return element.GetDouble();
+ case JsonValueKind.True:
+ return true;
+ case JsonValueKind.False:
+ return false;
+ case JsonValueKind.Undefined:
+ case JsonValueKind.Null:
+ return null;
+ case JsonValueKind.Object:
+ var dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ var list = new List