diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index d8bf790b5988..f28c28a5d39c 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -79,7 +79,6 @@ trigger: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -108,6 +107,7 @@ trigger: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto @@ -285,7 +285,6 @@ pr: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -314,6 +313,7 @@ pr: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.net8.0.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.net8.0.cs index e1e40e5566db..26d1ec08f4c1 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.net8.0.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.net8.0.cs @@ -20,8 +20,9 @@ protected ApplicationGatewayForContainersSecurityPolicyCollection() { } public partial class ApplicationGatewayForContainersSecurityPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApplicationGatewayForContainersSecurityPolicyData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.ServiceNetworking.Models.PolicyType? PolicyType { get { throw null; } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType? PolicyType { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Rules { get { throw null; } } public Azure.Core.ResourceIdentifier WafPolicyId { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -55,126 +56,72 @@ protected ApplicationGatewayForContainersSecurityPolicyResource() { } public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class AssociationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public static partial class ServiceNetworkingExtensions { - protected AssociationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.AssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.AssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetTrafficController(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationResource GetTrafficControllerAssociationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static System.Threading.Tasks.Task> GetTrafficControllerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendResource GetTrafficControllerFrontendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerResource GetTrafficControllerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerCollection GetTrafficControllers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetTrafficControllers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetTrafficControllersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TrafficControllerAssociationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TrafficControllerAssociationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class AssociationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class TrafficControllerAssociationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AssociationData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.ServiceNetworking.Models.AssociationType? AssociationType { get { throw null; } set { } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public TrafficControllerAssociationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType? AssociationType { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AssociationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class TrafficControllerAssociationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected AssociationResource() { } - public virtual Azure.ResourceManager.ServiceNetworking.AssociationData Data { get { throw null; } } + protected TrafficControllerAssociationResource() { } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class FrontendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected FrontendCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.FrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.FrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class FrontendData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FrontendData(Azure.Core.AzureLocation location) { } - public string Fqdn { get { throw null; } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class FrontendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected FrontendResource() { } - public virtual Azure.ResourceManager.ServiceNetworking.FrontendData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public static partial class ServiceNetworkingExtensions - { - public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.AssociationResource GetAssociationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.FrontendResource GetFrontendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetTrafficController(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetTrafficControllerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerResource GetTrafficControllerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerCollection GetTrafficControllers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetTrafficControllers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetTrafficControllersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class TrafficControllerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -199,9 +146,9 @@ public TrafficControllerData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList Associations { get { throw null; } } public System.Collections.Generic.IReadOnlyList ConfigurationEndpoints { get { throw null; } } public System.Collections.Generic.IReadOnlyList Frontends { get { throw null; } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityPolicies { get { throw null; } } - public Azure.Core.ResourceIdentifier WafSecurityPolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations SecurityPolicyConfigurations { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? TrafficControllerProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.TrafficControllerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -209,6 +156,61 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TrafficControllerFrontendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TrafficControllerFrontendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class TrafficControllerFrontendData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrafficControllerFrontendData(Azure.Core.AzureLocation location) { } + public string Fqdn { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations SecurityPolicyConfigurations { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrafficControllerFrontendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TrafficControllerFrontendResource() { } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class TrafficControllerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -224,13 +226,13 @@ protected TrafficControllerResource() { } public virtual Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyCollection GetApplicationGatewayForContainersSecurityPolicies() { throw null; } public virtual Azure.Response GetApplicationGatewayForContainersSecurityPolicy(string securityPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApplicationGatewayForContainersSecurityPolicyAsync(string securityPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAssociation(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAssociationAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.AssociationCollection GetAssociations() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFrontend(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetFrontendAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.FrontendCollection GetFrontends() { throw null; } + public virtual Azure.Response GetTrafficControllerAssociation(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrafficControllerAssociationAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationCollection GetTrafficControllerAssociations() { throw null; } + public virtual Azure.Response GetTrafficControllerFrontend(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrafficControllerFrontendAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendCollection GetTrafficControllerFrontends() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -250,8 +252,8 @@ public partial class MockableServiceNetworkingArmClient : Azure.ResourceManager. { protected MockableServiceNetworkingArmClient() { } public virtual Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.AssociationResource GetAssociationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.FrontendResource GetFrontendResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationResource GetTrafficControllerAssociationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendResource GetTrafficControllerFrontendResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerResource GetTrafficControllerResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableServiceNetworkingResourceGroupResource : Azure.ResourceManager.ArmResource @@ -273,8 +275,8 @@ namespace Azure.ResourceManager.ServiceNetworking.Models public partial class ApplicationGatewayForContainersSecurityPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApplicationGatewayForContainersSecurityPolicyPatch() { } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyUpdateProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.Core.ResourceIdentifier WafPolicyId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -282,101 +284,157 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public static partial class ArmServiceNetworkingModelFactory + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationGatewayForContainersSecurityPolicyType : System.IEquatable { - public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyData ApplicationGatewayForContainersSecurityPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.PolicyType? policyType = default(Azure.ResourceManager.ServiceNetworking.Models.PolicyType?), Azure.Core.ResourceIdentifier wafPolicyId = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.AssociationData AssociationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.AssociationType? associationType = default(Azure.ResourceManager.ServiceNetworking.Models.AssociationType?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.FrontendData FrontendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string fqdn = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerData TrafficControllerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable configurationEndpoints = null, System.Collections.Generic.IEnumerable frontends = null, System.Collections.Generic.IEnumerable associations = null, System.Collections.Generic.IEnumerable securityPolicies = null, Azure.Core.ResourceIdentifier wafSecurityPolicyId = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationGatewayForContainersSecurityPolicyType(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType IPAccessRules { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType WAF { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerData TrafficControllerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable configurationEndpoints, System.Collections.Generic.IEnumerable frontends, System.Collections.Generic.IEnumerable associations, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState) { throw null; } + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType left, Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType left, Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType right) { throw null; } + public override string ToString() { throw null; } } - public partial class AssociationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public static partial class ArmServiceNetworkingModelFactory { - public AssociationPatch() { } - public Azure.ResourceManager.ServiceNetworking.Models.AssociationType? AssociationType { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyData ApplicationGatewayForContainersSecurityPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType? policyType = default(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType?), Azure.Core.ResourceIdentifier wafPolicyId = null, System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData TrafficControllerAssociationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType? associationType = default(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerData TrafficControllerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable configurationEndpoints = null, System.Collections.Generic.IEnumerable frontends = null, System.Collections.Generic.IEnumerable associations = null, System.Collections.Generic.IEnumerable securityPolicies = null, Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations securityPolicyConfigurations = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? trafficControllerProvisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData TrafficControllerFrontendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string fqdn = null, Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations securityPolicyConfigurations = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + } + public partial class IPAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IPAccessRule(string name, int priority, System.Collections.Generic.IEnumerable sourceAddressPrefixes, Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction action) { } + public Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction Action { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public int Priority { get { throw null; } set { } } + public System.Collections.Generic.IList SourceAddressPrefixes { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.ServiceNetworking.Models.IPAccessRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.IPAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AssociationType : System.IEquatable + public readonly partial struct IPAccessRuleAction : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AssociationType(string value) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.Models.AssociationType Subnets { get { throw null; } } - public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.AssociationType other) { throw null; } + public IPAccessRuleAction(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction Allow { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.AssociationType left, Azure.ResourceManager.ServiceNetworking.Models.AssociationType right) { throw null; } - public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.AssociationType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.AssociationType left, Azure.ResourceManager.ServiceNetworking.Models.AssociationType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction left, Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction left, Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction right) { throw null; } public override string ToString() { throw null; } } - public partial class FrontendPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SecurityPolicyConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FrontendPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public SecurityPolicyConfigurations() { } + public Azure.Core.ResourceIdentifier IPAccessRulesSecurityPolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier WafSecurityPolicyId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecurityPolicyUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecurityPolicyUpdateProperties() { } + public System.Collections.Generic.IList Rules { get { throw null; } } + public Azure.Core.ResourceIdentifier WafPolicyId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PolicyType : System.IEquatable + public readonly partial struct ServiceNetworkingProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PolicyType(string value) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.Models.PolicyType WAF { get { throw null; } } - public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.PolicyType other) { throw null; } + public ServiceNetworkingProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.PolicyType left, Azure.ResourceManager.ServiceNetworking.Models.PolicyType right) { throw null; } - public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.PolicyType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.PolicyType left, Azure.ResourceManager.ServiceNetworking.Models.PolicyType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class TrafficControllerAssociationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrafficControllerAssociationPatch() { } + public Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType? AssociationType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public readonly partial struct TrafficControllerAssociationType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Provisioning { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState other) { throw null; } + public TrafficControllerAssociationType(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType Subnets { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType left, Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType left, Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType right) { throw null; } public override string ToString() { throw null; } } + public partial class TrafficControllerFrontendPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrafficControllerFrontendPatch() { } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations FrontendUpdateSecurityPolicyConfigurations { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class TrafficControllerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TrafficControllerPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.Core.ResourceIdentifier WafSecurityPolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations TrafficControllerUpdateSecurityPolicyConfigurations { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.netstandard2.0.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.netstandard2.0.cs index e1e40e5566db..26d1ec08f4c1 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.netstandard2.0.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/api/Azure.ResourceManager.ServiceNetworking.netstandard2.0.cs @@ -20,8 +20,9 @@ protected ApplicationGatewayForContainersSecurityPolicyCollection() { } public partial class ApplicationGatewayForContainersSecurityPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApplicationGatewayForContainersSecurityPolicyData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.ServiceNetworking.Models.PolicyType? PolicyType { get { throw null; } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType? PolicyType { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Rules { get { throw null; } } public Azure.Core.ResourceIdentifier WafPolicyId { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -55,126 +56,72 @@ protected ApplicationGatewayForContainersSecurityPolicyResource() { } public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class AssociationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public static partial class ServiceNetworkingExtensions { - protected AssociationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.AssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.AssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetTrafficController(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationResource GetTrafficControllerAssociationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static System.Threading.Tasks.Task> GetTrafficControllerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendResource GetTrafficControllerFrontendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerResource GetTrafficControllerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerCollection GetTrafficControllers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetTrafficControllers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetTrafficControllersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class TrafficControllerAssociationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TrafficControllerAssociationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string associationName, Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class AssociationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class TrafficControllerAssociationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AssociationData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.ServiceNetworking.Models.AssociationType? AssociationType { get { throw null; } set { } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public TrafficControllerAssociationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType? AssociationType { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AssociationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class TrafficControllerAssociationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected AssociationResource() { } - public virtual Azure.ResourceManager.ServiceNetworking.AssociationData Data { get { throw null; } } + protected TrafficControllerAssociationResource() { } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.AssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class FrontendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected FrontendCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.FrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.FrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class FrontendData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FrontendData(Azure.Core.AzureLocation location) { } - public string Fqdn { get { throw null; } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class FrontendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected FrontendResource() { } - public virtual Azure.ResourceManager.ServiceNetworking.FrontendData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.FrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public static partial class ServiceNetworkingExtensions - { - public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.AssociationResource GetAssociationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.FrontendResource GetFrontendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetTrafficController(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetTrafficControllerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string trafficControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerResource GetTrafficControllerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerCollection GetTrafficControllers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetTrafficControllers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetTrafficControllersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class TrafficControllerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -199,9 +146,9 @@ public TrafficControllerData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList Associations { get { throw null; } } public System.Collections.Generic.IReadOnlyList ConfigurationEndpoints { get { throw null; } } public System.Collections.Generic.IReadOnlyList Frontends { get { throw null; } } - public Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecurityPolicies { get { throw null; } } - public Azure.Core.ResourceIdentifier WafSecurityPolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations SecurityPolicyConfigurations { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? TrafficControllerProvisioningState { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.TrafficControllerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -209,6 +156,61 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TrafficControllerFrontendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected TrafficControllerFrontendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string frontendName, Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class TrafficControllerFrontendData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrafficControllerFrontendData(Azure.Core.AzureLocation location) { } + public string Fqdn { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations SecurityPolicyConfigurations { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TrafficControllerFrontendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected TrafficControllerFrontendResource() { } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class TrafficControllerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -224,13 +226,13 @@ protected TrafficControllerResource() { } public virtual Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyCollection GetApplicationGatewayForContainersSecurityPolicies() { throw null; } public virtual Azure.Response GetApplicationGatewayForContainersSecurityPolicy(string securityPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApplicationGatewayForContainersSecurityPolicyAsync(string securityPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAssociation(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAssociationAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.AssociationCollection GetAssociations() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFrontend(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetFrontendAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.FrontendCollection GetFrontends() { throw null; } + public virtual Azure.Response GetTrafficControllerAssociation(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrafficControllerAssociationAsync(string associationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationCollection GetTrafficControllerAssociations() { throw null; } + public virtual Azure.Response GetTrafficControllerFrontend(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTrafficControllerFrontendAsync(string frontendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendCollection GetTrafficControllerFrontends() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -250,8 +252,8 @@ public partial class MockableServiceNetworkingArmClient : Azure.ResourceManager. { protected MockableServiceNetworkingArmClient() { } public virtual Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.AssociationResource GetAssociationResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.ServiceNetworking.FrontendResource GetFrontendResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationResource GetTrafficControllerAssociationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendResource GetTrafficControllerFrontendResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ServiceNetworking.TrafficControllerResource GetTrafficControllerResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableServiceNetworkingResourceGroupResource : Azure.ResourceManager.ArmResource @@ -273,8 +275,8 @@ namespace Azure.ResourceManager.ServiceNetworking.Models public partial class ApplicationGatewayForContainersSecurityPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApplicationGatewayForContainersSecurityPolicyPatch() { } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyUpdateProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.Core.ResourceIdentifier WafPolicyId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -282,101 +284,157 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public static partial class ArmServiceNetworkingModelFactory + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationGatewayForContainersSecurityPolicyType : System.IEquatable { - public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyData ApplicationGatewayForContainersSecurityPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.PolicyType? policyType = default(Azure.ResourceManager.ServiceNetworking.Models.PolicyType?), Azure.Core.ResourceIdentifier wafPolicyId = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.AssociationData AssociationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.AssociationType? associationType = default(Azure.ResourceManager.ServiceNetworking.Models.AssociationType?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.FrontendData FrontendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string fqdn = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerData TrafficControllerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable configurationEndpoints = null, System.Collections.Generic.IEnumerable frontends = null, System.Collections.Generic.IEnumerable associations = null, System.Collections.Generic.IEnumerable securityPolicies = null, Azure.Core.ResourceIdentifier wafSecurityPolicyId = null, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState?)) { throw null; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationGatewayForContainersSecurityPolicyType(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType IPAccessRules { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType WAF { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public static Azure.ResourceManager.ServiceNetworking.TrafficControllerData TrafficControllerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable configurationEndpoints, System.Collections.Generic.IEnumerable frontends, System.Collections.Generic.IEnumerable associations, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState? provisioningState) { throw null; } + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType left, Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType left, Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType right) { throw null; } + public override string ToString() { throw null; } } - public partial class AssociationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public static partial class ArmServiceNetworkingModelFactory { - public AssociationPatch() { } - public Azure.ResourceManager.ServiceNetworking.Models.AssociationType? AssociationType { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.ApplicationGatewayForContainersSecurityPolicyData ApplicationGatewayForContainersSecurityPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType? policyType = default(Azure.ResourceManager.ServiceNetworking.Models.ApplicationGatewayForContainersSecurityPolicyType?), Azure.Core.ResourceIdentifier wafPolicyId = null, System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerAssociationData TrafficControllerAssociationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType? associationType = default(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerData TrafficControllerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable configurationEndpoints = null, System.Collections.Generic.IEnumerable frontends = null, System.Collections.Generic.IEnumerable associations = null, System.Collections.Generic.IEnumerable securityPolicies = null, Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations securityPolicyConfigurations = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? trafficControllerProvisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.TrafficControllerFrontendData TrafficControllerFrontendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string fqdn = null, Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations securityPolicyConfigurations = null, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState? provisioningState = default(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState?)) { throw null; } + } + public partial class IPAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IPAccessRule(string name, int priority, System.Collections.Generic.IEnumerable sourceAddressPrefixes, Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction action) { } + public Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction Action { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public int Priority { get { throw null; } set { } } + public System.Collections.Generic.IList SourceAddressPrefixes { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.AssociationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.ServiceNetworking.Models.IPAccessRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.IPAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AssociationType : System.IEquatable + public readonly partial struct IPAccessRuleAction : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AssociationType(string value) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.Models.AssociationType Subnets { get { throw null; } } - public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.AssociationType other) { throw null; } + public IPAccessRuleAction(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction Allow { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.AssociationType left, Azure.ResourceManager.ServiceNetworking.Models.AssociationType right) { throw null; } - public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.AssociationType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.AssociationType left, Azure.ResourceManager.ServiceNetworking.Models.AssociationType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction left, Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction left, Azure.ResourceManager.ServiceNetworking.Models.IPAccessRuleAction right) { throw null; } public override string ToString() { throw null; } } - public partial class FrontendPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SecurityPolicyConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FrontendPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public SecurityPolicyConfigurations() { } + public Azure.Core.ResourceIdentifier IPAccessRulesSecurityPolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier WafSecurityPolicyId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecurityPolicyUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecurityPolicyUpdateProperties() { } + public System.Collections.Generic.IList Rules { get { throw null; } } + public Azure.Core.ResourceIdentifier WafPolicyId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.ServiceNetworking.Models.FrontendPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PolicyType : System.IEquatable + public readonly partial struct ServiceNetworkingProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PolicyType(string value) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.Models.PolicyType WAF { get { throw null; } } - public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.PolicyType other) { throw null; } + public ServiceNetworkingProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.PolicyType left, Azure.ResourceManager.ServiceNetworking.Models.PolicyType right) { throw null; } - public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.PolicyType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.PolicyType left, Azure.ResourceManager.ServiceNetworking.Models.PolicyType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ServiceNetworkingProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class TrafficControllerAssociationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrafficControllerAssociationPatch() { } + public Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType? AssociationType { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public readonly partial struct TrafficControllerAssociationType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Provisioning { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState other) { throw null; } + public TrafficControllerAssociationType(string value) { throw null; } + public static Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType Subnets { get { throw null; } } + public bool Equals(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState left, Azure.ResourceManager.ServiceNetworking.Models.ProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType left, Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType left, Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerAssociationType right) { throw null; } public override string ToString() { throw null; } } + public partial class TrafficControllerFrontendPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TrafficControllerFrontendPatch() { } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations FrontendUpdateSecurityPolicyConfigurations { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerFrontendPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class TrafficControllerPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TrafficControllerPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.Core.ResourceIdentifier WafSecurityPolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ServiceNetworking.Models.SecurityPolicyConfigurations TrafficControllerUpdateSecurityPolicyConfigurations { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ServiceNetworking.Models.TrafficControllerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs index 7bbd9b160211..ed14510cebff 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyCollection.cs @@ -17,10 +17,10 @@ public partial class Sample_ApplicationGatewayForContainersSecurityPolicyCollect { [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutSecurityPolicy() + public async Task CreateOrUpdate_PutIpAccessRulesSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyPut.json - // this example is just showing the usage of "SecurityPoliciesInterface_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/IpAccessRulesSecurityPolicyPut.json + // this example is just showing the usage of "SecurityPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -40,10 +40,43 @@ public async Task CreateOrUpdate_PutSecurityPolicy() // invoke the operation string securityPolicyName = "sp1"; - ApplicationGatewayForContainersSecurityPolicyData data = new ApplicationGatewayForContainersSecurityPolicyData(new AzureLocation("NorthCentralUS")) - { - WafPolicyId = new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), - }; + ApplicationGatewayForContainersSecurityPolicyData data = new ApplicationGatewayForContainersSecurityPolicyData(new AzureLocation("NorthCentralUS")); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, securityPolicyName, data); + ApplicationGatewayForContainersSecurityPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApplicationGatewayForContainersSecurityPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutWAFSecurityPolicy() + { + // Generated from example definition: 2025-03-01-preview/WafSecurityPolicyPut.json + // this example is just showing the usage of "SecurityPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this ApplicationGatewayForContainersSecurityPolicyResource + ApplicationGatewayForContainersSecurityPolicyCollection collection = trafficController.GetApplicationGatewayForContainersSecurityPolicies(); + + // invoke the operation + string securityPolicyName = "sp1"; + ApplicationGatewayForContainersSecurityPolicyData data = new ApplicationGatewayForContainersSecurityPolicyData(new AzureLocation("NorthCentralUS")); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, securityPolicyName, data); ApplicationGatewayForContainersSecurityPolicyResource result = lro.Value; @@ -58,8 +91,8 @@ public async Task CreateOrUpdate_PutSecurityPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyGet.json - // this example is just showing the usage of "SecurityPoliciesInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/SecurityPolicyGet.json + // this example is just showing the usage of "SecurityPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -92,8 +125,8 @@ public async Task Get_GetSecurityPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetSecurityPolicies() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPoliciesGetList.json - // this example is just showing the usage of "SecurityPoliciesInterface_ListByTrafficController" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/SecurityPoliciesGetList.json + // this example is just showing the usage of "SecurityPolicy_ListByTrafficController" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -128,8 +161,8 @@ public async Task GetAll_GetSecurityPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyGet.json - // this example is just showing the usage of "SecurityPoliciesInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/SecurityPolicyGet.json + // this example is just showing the usage of "SecurityPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -158,8 +191,8 @@ public async Task Exists_GetSecurityPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyGet.json - // this example is just showing the usage of "SecurityPoliciesInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/SecurityPolicyGet.json + // this example is just showing the usage of "SecurityPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs index 275d6163d596..891b87831556 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_ApplicationGatewayForContainersSecurityPolicyResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ApplicationGatewayForContainersSecurityPolicyResourc [Ignore("Only validating compilation of examples")] public async Task Get_GetSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyGet.json - // this example is just showing the usage of "SecurityPoliciesInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/SecurityPolicyGet.json + // this example is just showing the usage of "SecurityPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -51,8 +51,8 @@ public async Task Get_GetSecurityPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyDelete.json - // this example is just showing the usage of "SecurityPoliciesInterface_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/SecurityPolicyDelete.json + // this example is just showing the usage of "SecurityPolicy_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -76,10 +76,10 @@ public async Task Delete_DeleteSecurityPolicy() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateSecurityPolicy() + public async Task Update_UpdateIpAccessRulesSecurityPolicy() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/SecurityPolicyPatch.json - // this example is just showing the usage of "SecurityPoliciesInterface_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/IpAccessRulesSecurityPolicyPatch.json + // this example is just showing the usage of "SecurityPolicy_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -98,7 +98,48 @@ public async Task Update_UpdateSecurityPolicy() // invoke the operation ApplicationGatewayForContainersSecurityPolicyPatch patch = new ApplicationGatewayForContainersSecurityPolicyPatch { - WafPolicyId = new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), + Properties = new SecurityPolicyUpdateProperties + { + Rules = { }, + }, + }; + ApplicationGatewayForContainersSecurityPolicyResource result = await applicationGatewayForContainersSecurityPolicy.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApplicationGatewayForContainersSecurityPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateWAFSecurityPolicy() + { + // Generated from example definition: 2025-03-01-preview/WafSecurityPolicyPatch.json + // this example is just showing the usage of "SecurityPolicy_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApplicationGatewayForContainersSecurityPolicyResource created on azure + // for more information of creating ApplicationGatewayForContainersSecurityPolicyResource, please refer to the document of ApplicationGatewayForContainersSecurityPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string securityPolicyName = "sp1"; + ResourceIdentifier applicationGatewayForContainersSecurityPolicyResourceId = ApplicationGatewayForContainersSecurityPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, securityPolicyName); + ApplicationGatewayForContainersSecurityPolicyResource applicationGatewayForContainersSecurityPolicy = client.GetApplicationGatewayForContainersSecurityPolicyResource(applicationGatewayForContainersSecurityPolicyResourceId); + + // invoke the operation + ApplicationGatewayForContainersSecurityPolicyPatch patch = new ApplicationGatewayForContainersSecurityPolicyPatch + { + Properties = new SecurityPolicyUpdateProperties + { + WafPolicyId = new ResourceIdentifier("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.Networking/applicationGatewayWebApplicationFirewallPolicies/wp-0"), + }, }; ApplicationGatewayForContainersSecurityPolicyResource result = await applicationGatewayForContainersSecurityPolicy.UpdateAsync(patch); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index af4ed6e016de..ae4d29fe60af 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,8 +20,8 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetTrafficControllers_GetTrafficControllersList() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllersGetList.json - // this example is just showing the usage of "TrafficControllerInterface_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllersGetList.json + // this example is just showing the usage of "TrafficController_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs new file mode 100644 index 000000000000..23a108ff779c --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationCollection.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.ServiceNetworking.Samples +{ + public partial class Sample_TrafficControllerAssociationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationPut.json + // this example is just showing the usage of "Association_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerAssociationResource + TrafficControllerAssociationCollection collection = trafficController.GetTrafficControllerAssociations(); + + // invoke the operation + string associationName = "as1"; + TrafficControllerAssociationData data = new TrafficControllerAssociationData(new AzureLocation("NorthCentralUS")); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, associationName, data); + TrafficControllerAssociationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerAssociationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationGet.json + // this example is just showing the usage of "Association_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerAssociationResource + TrafficControllerAssociationCollection collection = trafficController.GetTrafficControllerAssociations(); + + // invoke the operation + string associationName = "as1"; + TrafficControllerAssociationResource result = await collection.GetAsync(associationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerAssociationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GetAssociations() + { + // Generated from example definition: 2025-03-01-preview/AssociationsGet.json + // this example is just showing the usage of "Association_ListByTrafficController" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerAssociationResource + TrafficControllerAssociationCollection collection = trafficController.GetTrafficControllerAssociations(); + + // invoke the operation and iterate over the result + await foreach (TrafficControllerAssociationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerAssociationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationGet.json + // this example is just showing the usage of "Association_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerAssociationResource + TrafficControllerAssociationCollection collection = trafficController.GetTrafficControllerAssociations(); + + // invoke the operation + string associationName = "as1"; + bool result = await collection.ExistsAsync(associationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationGet.json + // this example is just showing the usage of "Association_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerAssociationResource + TrafficControllerAssociationCollection collection = trafficController.GetTrafficControllerAssociations(); + + // invoke the operation + string associationName = "as1"; + NullableResponse response = await collection.GetIfExistsAsync(associationName); + TrafficControllerAssociationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerAssociationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationResource.cs new file mode 100644 index 000000000000..3fb3a74eeef2 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerAssociationResource.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ServiceNetworking.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ServiceNetworking.Samples +{ + public partial class Sample_TrafficControllerAssociationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationGet.json + // this example is just showing the usage of "Association_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerAssociationResource created on azure + // for more information of creating TrafficControllerAssociationResource, please refer to the document of TrafficControllerAssociationResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string associationName = "as1"; + ResourceIdentifier trafficControllerAssociationResourceId = TrafficControllerAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, associationName); + TrafficControllerAssociationResource trafficControllerAssociation = client.GetTrafficControllerAssociationResource(trafficControllerAssociationResourceId); + + // invoke the operation + TrafficControllerAssociationResource result = await trafficControllerAssociation.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerAssociationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationDelete.json + // this example is just showing the usage of "Association_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerAssociationResource created on azure + // for more information of creating TrafficControllerAssociationResource, please refer to the document of TrafficControllerAssociationResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string associationName = "as1"; + ResourceIdentifier trafficControllerAssociationResourceId = TrafficControllerAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, associationName); + TrafficControllerAssociationResource trafficControllerAssociation = client.GetTrafficControllerAssociationResource(trafficControllerAssociationResourceId); + + // invoke the operation + await trafficControllerAssociation.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateAssociation() + { + // Generated from example definition: 2025-03-01-preview/AssociationPatch.json + // this example is just showing the usage of "Association_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerAssociationResource created on azure + // for more information of creating TrafficControllerAssociationResource, please refer to the document of TrafficControllerAssociationResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string associationName = "as1"; + ResourceIdentifier trafficControllerAssociationResourceId = TrafficControllerAssociationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, associationName); + TrafficControllerAssociationResource trafficControllerAssociation = client.GetTrafficControllerAssociationResource(trafficControllerAssociationResourceId); + + // invoke the operation + TrafficControllerAssociationPatch patch = new TrafficControllerAssociationPatch(); + TrafficControllerAssociationResource result = await trafficControllerAssociation.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerAssociationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerCollection.cs index 18758e4ffd35..58709869d47b 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerCollection.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerCollection.cs @@ -20,8 +20,8 @@ public partial class Sample_TrafficControllerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerPut.json - // this example is just showing the usage of "TrafficControllerInterface_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerPut.json + // this example is just showing the usage of "TrafficController_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -61,8 +61,8 @@ public async Task CreateOrUpdate_PutTrafficController() [Ignore("Only validating compilation of examples")] public async Task Get_GetTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerGet.json - // this example is just showing the usage of "TrafficControllerInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerGet.json + // this example is just showing the usage of "TrafficController_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -94,8 +94,8 @@ public async Task Get_GetTrafficController() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTrafficControllers() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllersGet.json - // this example is just showing the usage of "TrafficControllerInterface_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllersGet.json + // this example is just showing the usage of "TrafficController_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -129,8 +129,8 @@ public async Task GetAll_GetTrafficControllers() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerGet.json - // this example is just showing the usage of "TrafficControllerInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerGet.json + // this example is just showing the usage of "TrafficController_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -158,8 +158,8 @@ public async Task Exists_GetTrafficController() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerGet.json - // this example is just showing the usage of "TrafficControllerInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerGet.json + // this example is just showing the usage of "TrafficController_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs new file mode 100644 index 000000000000..98b3bdd771e2 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendCollection.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.ServiceNetworking.Samples +{ + public partial class Sample_TrafficControllerFrontendCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendPut.json + // this example is just showing the usage of "Frontend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerFrontendResource + TrafficControllerFrontendCollection collection = trafficController.GetTrafficControllerFrontends(); + + // invoke the operation + string frontendName = "fe1"; + TrafficControllerFrontendData data = new TrafficControllerFrontendData(new AzureLocation("NorthCentralUS")); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, frontendName, data); + TrafficControllerFrontendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerFrontendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendGet.json + // this example is just showing the usage of "Frontend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerFrontendResource + TrafficControllerFrontendCollection collection = trafficController.GetTrafficControllerFrontends(); + + // invoke the operation + string frontendName = "fe1"; + TrafficControllerFrontendResource result = await collection.GetAsync(frontendName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerFrontendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GetFrontends() + { + // Generated from example definition: 2025-03-01-preview/FrontendsGet.json + // this example is just showing the usage of "Frontend_ListByTrafficController" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerFrontendResource + TrafficControllerFrontendCollection collection = trafficController.GetTrafficControllerFrontends(); + + // invoke the operation and iterate over the result + await foreach (TrafficControllerFrontendResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerFrontendData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendGet.json + // this example is just showing the usage of "Frontend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerFrontendResource + TrafficControllerFrontendCollection collection = trafficController.GetTrafficControllerFrontends(); + + // invoke the operation + string frontendName = "fe1"; + bool result = await collection.ExistsAsync(frontendName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendGet.json + // this example is just showing the usage of "Frontend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerResource created on azure + // for more information of creating TrafficControllerResource, please refer to the document of TrafficControllerResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + ResourceIdentifier trafficControllerResourceId = TrafficControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName); + TrafficControllerResource trafficController = client.GetTrafficControllerResource(trafficControllerResourceId); + + // get the collection of this TrafficControllerFrontendResource + TrafficControllerFrontendCollection collection = trafficController.GetTrafficControllerFrontends(); + + // invoke the operation + string frontendName = "fe1"; + NullableResponse response = await collection.GetIfExistsAsync(frontendName); + TrafficControllerFrontendResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerFrontendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendResource.cs new file mode 100644 index 000000000000..0e80f4bfe79a --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerFrontendResource.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ServiceNetworking.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ServiceNetworking.Samples +{ + public partial class Sample_TrafficControllerFrontendResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendGet.json + // this example is just showing the usage of "Frontend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerFrontendResource created on azure + // for more information of creating TrafficControllerFrontendResource, please refer to the document of TrafficControllerFrontendResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string frontendName = "fe1"; + ResourceIdentifier trafficControllerFrontendResourceId = TrafficControllerFrontendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, frontendName); + TrafficControllerFrontendResource trafficControllerFrontend = client.GetTrafficControllerFrontendResource(trafficControllerFrontendResourceId); + + // invoke the operation + TrafficControllerFrontendResource result = await trafficControllerFrontend.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerFrontendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendDelete.json + // this example is just showing the usage of "Frontend_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerFrontendResource created on azure + // for more information of creating TrafficControllerFrontendResource, please refer to the document of TrafficControllerFrontendResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string frontendName = "fe1"; + ResourceIdentifier trafficControllerFrontendResourceId = TrafficControllerFrontendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, frontendName); + TrafficControllerFrontendResource trafficControllerFrontend = client.GetTrafficControllerFrontendResource(trafficControllerFrontendResourceId); + + // invoke the operation + await trafficControllerFrontend.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateFrontend() + { + // Generated from example definition: 2025-03-01-preview/FrontendPatch.json + // this example is just showing the usage of "Frontend_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TrafficControllerFrontendResource created on azure + // for more information of creating TrafficControllerFrontendResource, please refer to the document of TrafficControllerFrontendResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string trafficControllerName = "tc1"; + string frontendName = "fe1"; + ResourceIdentifier trafficControllerFrontendResourceId = TrafficControllerFrontendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, trafficControllerName, frontendName); + TrafficControllerFrontendResource trafficControllerFrontend = client.GetTrafficControllerFrontendResource(trafficControllerFrontendResourceId); + + // invoke the operation + TrafficControllerFrontendPatch patch = new TrafficControllerFrontendPatch(); + TrafficControllerFrontendResource result = await trafficControllerFrontend.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + TrafficControllerFrontendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerResource.cs index 82f3d8489d50..b56f139a4dc3 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/samples/Generated/Samples/Sample_TrafficControllerResource.cs @@ -20,8 +20,8 @@ public partial class Sample_TrafficControllerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerGet.json - // this example is just showing the usage of "TrafficControllerInterface_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerGet.json + // this example is just showing the usage of "TrafficController_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -50,8 +50,8 @@ public async Task Get_GetTrafficController() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerDelete.json - // this example is just showing the usage of "TrafficControllerInterface_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerDelete.json + // this example is just showing the usage of "TrafficController_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -76,8 +76,8 @@ public async Task Delete_DeleteTrafficController() [Ignore("Only validating compilation of examples")] public async Task Update_PatchTrafficController() { - // Generated from example definition: specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2025-01-01/examples/TrafficControllerPatch.json - // this example is just showing the usage of "TrafficControllerInterface_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/TrafficControllerPatch.json + // this example is just showing the usage of "TrafficController_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyCollection.cs index f556f9a69c29..7b690543896d 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyCollection.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// SecurityPoliciesInterface_CreateOrUpdate + /// SecurityPolicy_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_CreateOrUpdate + /// SecurityPolicy_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response G /// /// /// Operation Id - /// SecurityPoliciesInterface_ListByTrafficController + /// SecurityPolicy_ListByTrafficController /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable /// /// Operation Id - /// SecurityPoliciesInterface_ListByTrafficController + /// SecurityPolicy_ListByTrafficController /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable G /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string securityPolicyName, /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string securityPolicyName, CancellationToke /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.Serialization.cs index 845b51517c14..29d920d4d35e 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.Serialization.cs @@ -50,6 +50,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("wafPolicy"u8); JsonSerializer.Serialize(writer, WafPolicy); } + if (Optional.IsDefined(IPAccessRulesPolicy)) + { + writer.WritePropertyName("ipAccessRulesPolicy"u8); + writer.WriteObjectValue(IPAccessRulesPolicy, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -84,9 +89,10 @@ internal static ApplicationGatewayForContainersSecurityPolicyData DeserializeApp string name = default; ResourceType type = default; SystemData systemData = default; - Models.PolicyType? policyType = default; + ApplicationGatewayForContainersSecurityPolicyType? policyType = default; WritableSubResource wafPolicy = default; - ProvisioningState? provisioningState = default; + IPAccessRulesPolicy ipAccessRulesPolicy = default; + ServiceNetworkingProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -149,7 +155,7 @@ internal static ApplicationGatewayForContainersSecurityPolicyData DeserializeApp { continue; } - policyType = new Models.PolicyType(property0.Value.GetString()); + policyType = new ApplicationGatewayForContainersSecurityPolicyType(property0.Value.GetString()); continue; } if (property0.NameEquals("wafPolicy"u8)) @@ -161,13 +167,22 @@ internal static ApplicationGatewayForContainersSecurityPolicyData DeserializeApp wafPolicy = JsonSerializer.Deserialize(property0.Value.GetRawText()); continue; } + if (property0.NameEquals("ipAccessRulesPolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipAccessRulesPolicy = IPAccessRulesPolicy.DeserializeIPAccessRulesPolicy(property0.Value, options); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new ServiceNetworkingProvisioningState(property0.Value.GetString()); continue; } } @@ -188,6 +203,7 @@ internal static ApplicationGatewayForContainersSecurityPolicyData DeserializeApp location, policyType, wafPolicy, + ipAccessRulesPolicy, provisioningState, serializedAdditionalRawData); } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.cs index 88531c7ded4a..665f3ec11e6b 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyData.cs @@ -66,13 +66,15 @@ public ApplicationGatewayForContainersSecurityPolicyData(AzureLocation location) /// The tags. /// The location. /// Type of the Traffic Controller Security Policy. - /// Web Application Firewall Policy of the Traffic Controller Security Policy. + /// Web Application Firewall Policy of the Traffic Controller Security Policy. If this property is set then ipAccessRulesPolicy property cannot be set. + /// Ip Access Policy of the Traffic Controller Security Policy. If this property is set then wafPolicy property cannot be set. /// Provisioning State of Traffic Controller SecurityPolicy Resource. /// Keeps track of any properties unknown to the library. - internal ApplicationGatewayForContainersSecurityPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Models.PolicyType? policyType, WritableSubResource wafPolicy, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ApplicationGatewayForContainersSecurityPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApplicationGatewayForContainersSecurityPolicyType? policyType, WritableSubResource wafPolicy, IPAccessRulesPolicy ipAccessRulesPolicy, ServiceNetworkingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { PolicyType = policyType; WafPolicy = wafPolicy; + IPAccessRulesPolicy = ipAccessRulesPolicy; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -83,8 +85,8 @@ internal ApplicationGatewayForContainersSecurityPolicyData() } /// Type of the Traffic Controller Security Policy. - public Models.PolicyType? PolicyType { get; } - /// Web Application Firewall Policy of the Traffic Controller Security Policy. + public ApplicationGatewayForContainersSecurityPolicyType? PolicyType { get; } + /// Web Application Firewall Policy of the Traffic Controller Security Policy. If this property is set then ipAccessRulesPolicy property cannot be set. internal WritableSubResource WafPolicy { get; set; } /// Gets or sets Id. public ResourceIdentifier WafPolicyId @@ -98,7 +100,20 @@ public ResourceIdentifier WafPolicyId } } + /// Ip Access Policy of the Traffic Controller Security Policy. If this property is set then wafPolicy property cannot be set. + internal IPAccessRulesPolicy IPAccessRulesPolicy { get; set; } + /// Ip Access Policy Rules List. + public IList Rules + { + get + { + if (IPAccessRulesPolicy is null) + IPAccessRulesPolicy = new IPAccessRulesPolicy(); + return IPAccessRulesPolicy.Rules; + } + } + /// Provisioning State of Traffic Controller SecurityPolicy Resource. - public ProvisioningState? ProvisioningState { get; } + public ServiceNetworkingProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.cs index 79fe4fceda02..f0f55df95092 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.cs @@ -99,11 +99,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -139,11 +139,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -179,11 +179,11 @@ public virtual Response G /// /// /// Operation Id - /// SecurityPoliciesInterface_Delete + /// SecurityPolicy_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -221,11 +221,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// SecurityPoliciesInterface_Delete + /// SecurityPolicy_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -263,11 +263,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// SecurityPoliciesInterface_Update + /// SecurityPolicy_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -305,11 +305,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Update + /// SecurityPolicy_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -347,11 +347,11 @@ public virtual Response U /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -409,11 +409,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -471,11 +471,11 @@ public virtual Response A /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -528,11 +528,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -585,11 +585,11 @@ public virtual Response S /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -645,11 +645,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ArmServiceNetworkingModelFactory.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ArmServiceNetworkingModelFactory.cs index 3e9fdb4c622a..85391a6741e4 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ArmServiceNetworkingModelFactory.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ArmServiceNetworkingModelFactory.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -29,10 +28,10 @@ public static partial class ArmServiceNetworkingModelFactory /// Frontends References List. /// Associations References List. /// Security Policies References List. - /// Security Policy Configuration. - /// The status of the last operation. + /// Security Policy Configuration. + /// The status of the last operation. /// A new instance for mocking. - public static TrafficControllerData TrafficControllerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable configurationEndpoints = null, IEnumerable frontends = null, IEnumerable associations = null, IEnumerable securityPolicies = null, ResourceIdentifier wafSecurityPolicyId = null, ProvisioningState? provisioningState = null) + public static TrafficControllerData TrafficControllerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable configurationEndpoints = null, IEnumerable frontends = null, IEnumerable associations = null, IEnumerable securityPolicies = null, SecurityPolicyConfigurations securityPolicyConfigurations = null, ServiceNetworkingProvisioningState? trafficControllerProvisioningState = null) { tags ??= new Dictionary(); configurationEndpoints ??= new List(); @@ -51,40 +50,43 @@ public static TrafficControllerData TrafficControllerData(ResourceIdentifier id frontends?.ToList(), associations?.ToList(), securityPolicies?.ToList(), - wafSecurityPolicyId != null ? new SecurityPolicyConfigurations(ResourceManagerModelFactory.WritableSubResource(wafSecurityPolicyId), serializedAdditionalRawData: null) : null, - provisioningState, + securityPolicyConfigurations, + trafficControllerProvisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Association Type. - /// Association Subnet. - /// Provisioning State of Traffic Controller Association Resource. - /// A new instance for mocking. - public static AssociationData AssociationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AssociationType? associationType = null, ResourceIdentifier subnetId = null, ProvisioningState? provisioningState = null) + /// Type of the Traffic Controller Security Policy. + /// Web Application Firewall Policy of the Traffic Controller Security Policy. If this property is set then ipAccessRulesPolicy property cannot be set. + /// Ip Access Policy of the Traffic Controller Security Policy. If this property is set then wafPolicy property cannot be set. + /// Provisioning State of Traffic Controller SecurityPolicy Resource. + /// A new instance for mocking. + public static ApplicationGatewayForContainersSecurityPolicyData ApplicationGatewayForContainersSecurityPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ApplicationGatewayForContainersSecurityPolicyType? policyType = null, ResourceIdentifier wafPolicyId = null, IEnumerable rules = null, ServiceNetworkingProvisioningState? provisioningState = null) { tags ??= new Dictionary(); + rules ??= new List(); - return new AssociationData( + return new ApplicationGatewayForContainersSecurityPolicyData( id, name, resourceType, systemData, tags, location, - associationType, - subnetId != null ? ResourceManagerModelFactory.WritableSubResource(subnetId) : null, + policyType, + wafPolicyId != null ? ResourceManagerModelFactory.WritableSubResource(wafPolicyId) : null, + rules != null ? new IPAccessRulesPolicy(rules?.ToList(), serializedAdditionalRawData: null) : null, provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -92,13 +94,14 @@ public static AssociationData AssociationData(ResourceIdentifier id = null, stri /// The tags. /// The location. /// The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend. + /// Frontend Security Policy Configuration. /// Provisioning State of Traffic Controller Frontend Resource. - /// A new instance for mocking. - public static FrontendData FrontendData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string fqdn = null, ProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static TrafficControllerFrontendData TrafficControllerFrontendData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string fqdn = null, SecurityPolicyConfigurations securityPolicyConfigurations = null, ServiceNetworkingProvisioningState? provisioningState = null) { tags ??= new Dictionary(); - return new FrontendData( + return new TrafficControllerFrontendData( id, name, resourceType, @@ -106,54 +109,37 @@ public static FrontendData FrontendData(ResourceIdentifier id = null, string nam tags, location, fqdn, + securityPolicyConfigurations, provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Type of the Traffic Controller Security Policy. - /// Web Application Firewall Policy of the Traffic Controller Security Policy. - /// Provisioning State of Traffic Controller SecurityPolicy Resource. - /// A new instance for mocking. - public static ApplicationGatewayForContainersSecurityPolicyData ApplicationGatewayForContainersSecurityPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PolicyType? policyType = null, ResourceIdentifier wafPolicyId = null, ProvisioningState? provisioningState = null) + /// Association Type. + /// Association Subnet. + /// Provisioning State of Traffic Controller Association Resource. + /// A new instance for mocking. + public static TrafficControllerAssociationData TrafficControllerAssociationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, TrafficControllerAssociationType? associationType = null, ResourceIdentifier subnetId = null, ServiceNetworkingProvisioningState? provisioningState = null) { tags ??= new Dictionary(); - return new ApplicationGatewayForContainersSecurityPolicyData( + return new TrafficControllerAssociationData( id, name, resourceType, systemData, tags, location, - policyType, - wafPolicyId != null ? ResourceManagerModelFactory.WritableSubResource(wafPolicyId) : null, + associationType, + subnetId != null ? ResourceManagerModelFactory.WritableSubResource(subnetId) : null, provisioningState, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Configuration Endpoints. - /// Frontends References List. - /// Associations References List. - /// The status of the last operation. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static TrafficControllerData TrafficControllerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IEnumerable configurationEndpoints, IEnumerable frontends, IEnumerable associations, ProvisioningState? provisioningState) - { - return TrafficControllerData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, configurationEndpoints: configurationEndpoints, frontends: frontends, associations: associations, securityPolicies: default, wafSecurityPolicyId: default, provisioningState: provisioningState); - } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationResource.Serialization.cs deleted file mode 100644 index 68a7b672c2d0..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.ServiceNetworking -{ - public partial class AssociationResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - AssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - AssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingArmClient.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingArmClient.cs index f3a193402876..d702211170a0 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingArmClient.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingArmClient.cs @@ -35,39 +35,27 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual TrafficControllerResource GetTrafficControllerResource(ResourceIdentifier id) - { - TrafficControllerResource.ValidateResourceId(id); - return new TrafficControllerResource(Client, id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual AssociationResource GetAssociationResource(ResourceIdentifier id) + /// Returns a object. + public virtual TrafficControllerAssociationResource GetTrafficControllerAssociationResource(ResourceIdentifier id) { - AssociationResource.ValidateResourceId(id); - return new AssociationResource(Client, id); + TrafficControllerAssociationResource.ValidateResourceId(id); + return new TrafficControllerAssociationResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual FrontendResource GetFrontendResource(ResourceIdentifier id) + /// Returns a object. + public virtual TrafficControllerFrontendResource GetTrafficControllerFrontendResource(ResourceIdentifier id) { - FrontendResource.ValidateResourceId(id); - return new FrontendResource(Client, id); + TrafficControllerFrontendResource.ValidateResourceId(id); + return new TrafficControllerFrontendResource(Client, id); } /// @@ -81,5 +69,17 @@ public virtual ApplicationGatewayForContainersSecurityPolicyResource GetApplicat ApplicationGatewayForContainersSecurityPolicyResource.ValidateResourceId(id); return new ApplicationGatewayForContainersSecurityPolicyResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual TrafficControllerResource GetTrafficControllerResource(ResourceIdentifier id) + { + TrafficControllerResource.ValidateResourceId(id); + return new TrafficControllerResource(Client, id); + } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingResourceGroupResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingResourceGroupResource.cs index 251cba2a2b0b..5d3da1e5fdb4 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingResourceGroupResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual TrafficControllerCollection GetTrafficControllers() /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetTrafficControl /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingSubscriptionResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingSubscriptionResource.cs index 4b12e1327198..ae9777a643f7 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingSubscriptionResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/MockableServiceNetworkingSubscriptionResource.cs @@ -48,11 +48,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Operation Id - /// TrafficControllerInterface_ListBySubscription + /// TrafficController_ListBySubscription /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -78,11 +78,11 @@ public virtual AsyncPageable GetTrafficControllersAsy /// /// /// Operation Id - /// TrafficControllerInterface_ListBySubscription + /// TrafficController_ListBySubscription /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/ServiceNetworkingExtensions.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/ServiceNetworkingExtensions.cs index 5fd73b1fb305..15863156005f 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/ServiceNetworkingExtensions.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Extensions/ServiceNetworkingExtensions.cs @@ -33,79 +33,79 @@ private static MockableServiceNetworkingSubscriptionResource GetMockableServiceN } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static TrafficControllerResource GetTrafficControllerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static TrafficControllerAssociationResource GetTrafficControllerAssociationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceNetworkingArmClient(client).GetTrafficControllerResource(id); + return GetMockableServiceNetworkingArmClient(client).GetTrafficControllerAssociationResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static AssociationResource GetAssociationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static TrafficControllerFrontendResource GetTrafficControllerFrontendResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceNetworkingArmClient(client).GetAssociationResource(id); + return GetMockableServiceNetworkingArmClient(client).GetTrafficControllerFrontendResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static FrontendResource GetFrontendResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceNetworkingArmClient(client).GetFrontendResource(id); + return GetMockableServiceNetworkingArmClient(client).GetApplicationGatewayForContainersSecurityPolicyResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static ApplicationGatewayForContainersSecurityPolicyResource GetApplicationGatewayForContainersSecurityPolicyResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static TrafficControllerResource GetTrafficControllerResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceNetworkingArmClient(client).GetApplicationGatewayForContainersSecurityPolicyResource(id); + return GetMockableServiceNetworkingArmClient(client).GetTrafficControllerResource(id); } /// @@ -134,11 +134,11 @@ public static TrafficControllerCollection GetTrafficControllers(this ResourceGro /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -172,11 +172,11 @@ public static async Task> GetTrafficControll /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -210,11 +210,11 @@ public static Response GetTrafficController(this Reso /// /// /// Operation Id - /// TrafficControllerInterface_ListBySubscription + /// TrafficController_ListBySubscription /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -246,11 +246,11 @@ public static AsyncPageable GetTrafficControllersAsyn /// /// /// Operation Id - /// TrafficControllerInterface_ListBySubscription + /// TrafficController_ListBySubscription /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendResource.Serialization.cs deleted file mode 100644 index be97bd969a76..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.ServiceNetworking -{ - public partial class FrontendResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - FrontendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - FrontendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/AssociationOperationSource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/AssociationOperationSource.cs deleted file mode 100644 index d7e7cab9c7a4..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/AssociationOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ServiceNetworking -{ - internal class AssociationOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal AssociationOperationSource(ArmClient client) - { - _client = client; - } - - AssociationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = AssociationData.DeserializeAssociationData(document.RootElement); - return new AssociationResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = AssociationData.DeserializeAssociationData(document.RootElement); - return new AssociationResource(_client, data); - } - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/FrontendOperationSource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/FrontendOperationSource.cs deleted file mode 100644 index ac95add30566..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/FrontendOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.ServiceNetworking -{ - internal class FrontendOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal FrontendOperationSource(ArmClient client) - { - _client = client; - } - - FrontendResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = FrontendData.DeserializeFrontendData(document.RootElement); - return new FrontendResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = FrontendData.DeserializeFrontendData(document.RootElement); - return new FrontendResource(_client, data); - } - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/TrafficControllerAssociationOperationSource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/TrafficControllerAssociationOperationSource.cs new file mode 100644 index 000000000000..eb6a13c60ee0 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/TrafficControllerAssociationOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ServiceNetworking +{ + internal class TrafficControllerAssociationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal TrafficControllerAssociationOperationSource(ArmClient client) + { + _client = client; + } + + TrafficControllerAssociationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(document.RootElement); + return new TrafficControllerAssociationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(document.RootElement); + return new TrafficControllerAssociationResource(_client, data); + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/TrafficControllerFrontendOperationSource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/TrafficControllerFrontendOperationSource.cs new file mode 100644 index 000000000000..bf88987c0826 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/LongRunningOperation/TrafficControllerFrontendOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ServiceNetworking +{ + internal class TrafficControllerFrontendOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal TrafficControllerFrontendOperationSource(ArmClient client) + { + _client = client; + } + + TrafficControllerFrontendResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(document.RootElement); + return new TrafficControllerFrontendResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(document.RootElement); + return new TrafficControllerFrontendResource(_client, data); + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.Serialization.cs index d5723b478bbf..8540d9cee2b1 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.Serialization.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ServiceNetworking.Models { @@ -46,14 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(WafPolicy)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("wafPolicy"u8); - JsonSerializer.Serialize(writer, WafPolicy); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -92,7 +88,7 @@ internal static ApplicationGatewayForContainersSecurityPolicyPatch DeserializeAp return null; } IDictionary tags = default; - WritableSubResource wafPolicy = default; + SecurityPolicyUpdateProperties properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -115,21 +111,9 @@ internal static ApplicationGatewayForContainersSecurityPolicyPatch DeserializeAp { if (property.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("wafPolicy"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - wafPolicy = JsonSerializer.Deserialize(property0.Value.GetRawText()); - continue; - } - } + properties = SecurityPolicyUpdateProperties.DeserializeSecurityPolicyUpdateProperties(property.Value, options); continue; } if (options.Format != "W") @@ -138,7 +122,7 @@ internal static ApplicationGatewayForContainersSecurityPolicyPatch DeserializeAp } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationGatewayForContainersSecurityPolicyPatch(tags ?? new ChangeTrackingDictionary(), wafPolicy, serializedAdditionalRawData); + return new ApplicationGatewayForContainersSecurityPolicyPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.cs index 6ad5a102c7aa..0f3ce11356b0 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyPatch.cs @@ -7,8 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ServiceNetworking.Models { @@ -55,29 +53,18 @@ public ApplicationGatewayForContainersSecurityPolicyPatch() /// Initializes a new instance of . /// Resource tags. - /// Web Application Firewall Policy of the Traffic Controller Security Policy. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal ApplicationGatewayForContainersSecurityPolicyPatch(IDictionary tags, WritableSubResource wafPolicy, IDictionary serializedAdditionalRawData) + internal ApplicationGatewayForContainersSecurityPolicyPatch(IDictionary tags, SecurityPolicyUpdateProperties properties, IDictionary serializedAdditionalRawData) { Tags = tags; - WafPolicy = wafPolicy; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Resource tags. public IDictionary Tags { get; } - /// Web Application Firewall Policy of the Traffic Controller Security Policy. - internal WritableSubResource WafPolicy { get; set; } - /// Gets or sets Id. - public ResourceIdentifier WafPolicyId - { - get => WafPolicy is null ? default : WafPolicy.Id; - set - { - if (WafPolicy is null) - WafPolicy = new WritableSubResource(); - WafPolicy.Id = value; - } - } + /// The resource-specific properties for this resource. + public SecurityPolicyUpdateProperties Properties { get; set; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyType.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyType.cs new file mode 100644 index 000000000000..2ea28087e940 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ApplicationGatewayForContainersSecurityPolicyType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// Policy Type of the Security Policy. + public readonly partial struct ApplicationGatewayForContainersSecurityPolicyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationGatewayForContainersSecurityPolicyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WAFValue = "waf"; + private const string IPAccessRulesValue = "ipAccessRules"; + + /// Policy of Type WAF. + public static ApplicationGatewayForContainersSecurityPolicyType WAF { get; } = new ApplicationGatewayForContainersSecurityPolicyType(WAFValue); + /// Policy of Type IpAccessRules. + public static ApplicationGatewayForContainersSecurityPolicyType IPAccessRules { get; } = new ApplicationGatewayForContainersSecurityPolicyType(IPAccessRulesValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationGatewayForContainersSecurityPolicyType left, ApplicationGatewayForContainersSecurityPolicyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationGatewayForContainersSecurityPolicyType left, ApplicationGatewayForContainersSecurityPolicyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ApplicationGatewayForContainersSecurityPolicyType(string value) => new ApplicationGatewayForContainersSecurityPolicyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationGatewayForContainersSecurityPolicyType other && Equals(other); + /// + public bool Equals(ApplicationGatewayForContainersSecurityPolicyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.Serialization.cs index 58c72e972792..7c2c3e3b06dc 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.Serialization.cs @@ -83,7 +83,7 @@ internal static AssociationListResult DeserializeAssociationListResult(JsonEleme { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -91,10 +91,10 @@ internal static AssociationListResult DeserializeAssociationListResult(JsonEleme { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AssociationData.DeserializeAssociationData(item, options)); + array.Add(TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(item, options)); } value = array; continue; diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.cs index 50fc05113d79..f2998a530bee 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationListResult.cs @@ -49,7 +49,7 @@ internal partial class AssociationListResult /// Initializes a new instance of . /// The Association items on this page. /// is null. - internal AssociationListResult(IEnumerable value) + internal AssociationListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); @@ -60,7 +60,7 @@ internal AssociationListResult(IEnumerable value) /// The Association items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal AssociationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal AssociationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -73,7 +73,7 @@ internal AssociationListResult() } /// The Association items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationType.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationType.cs deleted file mode 100644 index f2bf822ad050..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ServiceNetworking.Models -{ - /// Association Type Enum. - public readonly partial struct AssociationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AssociationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SubnetsValue = "subnets"; - - /// Association of Type Subnet. - public static AssociationType Subnets { get; } = new AssociationType(SubnetsValue); - /// Determines if two values are the same. - public static bool operator ==(AssociationType left, AssociationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AssociationType left, AssociationType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AssociationType(string value) => new AssociationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AssociationType other && Equals(other); - /// - public bool Equals(AssociationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.Serialization.cs index 37759141ebbb..bc3b46b43926 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.Serialization.cs @@ -83,7 +83,7 @@ internal static FrontendListResult DeserializeFrontendListResult(JsonElement ele { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -91,10 +91,10 @@ internal static FrontendListResult DeserializeFrontendListResult(JsonElement ele { if (property.NameEquals("value"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FrontendData.DeserializeFrontendData(item, options)); + array.Add(TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(item, options)); } value = array; continue; diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.cs index 4a35b0a83dba..71eadee88e8d 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendListResult.cs @@ -49,7 +49,7 @@ internal partial class FrontendListResult /// Initializes a new instance of . /// The Frontend items on this page. /// is null. - internal FrontendListResult(IEnumerable value) + internal FrontendListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); @@ -60,7 +60,7 @@ internal FrontendListResult(IEnumerable value) /// The Frontend items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal FrontendListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal FrontendListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -73,7 +73,7 @@ internal FrontendListResult() } /// The Frontend items on this page. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The link to the next page of items. public Uri NextLink { get; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurationsUpdate.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendUpdateProperties.Serialization.cs similarity index 55% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurationsUpdate.Serialization.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendUpdateProperties.Serialization.cs index d0e9e3649a7a..633aa698b032 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurationsUpdate.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendUpdateProperties.Serialization.cs @@ -10,15 +10,14 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ServiceNetworking.Models { - internal partial class SecurityPolicyConfigurationsUpdate : IUtf8JsonSerializable, IJsonModel + internal partial class FrontendUpdateProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,16 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SecurityPolicyConfigurationsUpdate)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(FrontendUpdateProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(WafSecurityPolicy)) + if (Optional.IsDefined(SecurityPolicyConfigurations)) { - writer.WritePropertyName("wafSecurityPolicy"u8); - JsonSerializer.Serialize(writer, WafSecurityPolicy); + writer.WritePropertyName("securityPolicyConfigurations"u8); + writer.WriteObjectValue(SecurityPolicyConfigurations, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -57,19 +56,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SecurityPolicyConfigurationsUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + FrontendUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SecurityPolicyConfigurationsUpdate)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(FrontendUpdateProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSecurityPolicyConfigurationsUpdate(document.RootElement, options); + return DeserializeFrontendUpdateProperties(document.RootElement, options); } - internal static SecurityPolicyConfigurationsUpdate DeserializeSecurityPolicyConfigurationsUpdate(JsonElement element, ModelReaderWriterOptions options = null) + internal static FrontendUpdateProperties DeserializeFrontendUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -77,18 +76,18 @@ internal static SecurityPolicyConfigurationsUpdate DeserializeSecurityPolicyConf { return null; } - WritableSubResource wafSecurityPolicy = default; + SecurityPolicyConfigurations securityPolicyConfigurations = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("wafSecurityPolicy"u8)) + if (property.NameEquals("securityPolicyConfigurations"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - wafSecurityPolicy = JsonSerializer.Deserialize(property.Value.GetRawText()); + securityPolicyConfigurations = SecurityPolicyConfigurations.DeserializeSecurityPolicyConfigurations(property.Value, options); continue; } if (options.Format != "W") @@ -97,38 +96,38 @@ internal static SecurityPolicyConfigurationsUpdate DeserializeSecurityPolicyConf } } serializedAdditionalRawData = rawDataDictionary; - return new SecurityPolicyConfigurationsUpdate(wafSecurityPolicy, serializedAdditionalRawData); + return new FrontendUpdateProperties(securityPolicyConfigurations, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SecurityPolicyConfigurationsUpdate)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(FrontendUpdateProperties)} does not support writing '{options.Format}' format."); } } - SecurityPolicyConfigurationsUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + FrontendUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSecurityPolicyConfigurationsUpdate(document.RootElement, options); + return DeserializeFrontendUpdateProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SecurityPolicyConfigurationsUpdate)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(FrontendUpdateProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendPatch.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendUpdateProperties.cs similarity index 72% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendPatch.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendUpdateProperties.cs index ddf4b80a59ee..1abf11b8aab3 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendPatch.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendUpdateProperties.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.ServiceNetworking.Models { - /// The type used for update operations of the Frontend. - public partial class FrontendPatch + /// The updatable properties of the Frontend. + internal partial class FrontendUpdateProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,22 +45,21 @@ public partial class FrontendPatch /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public FrontendPatch() + /// Initializes a new instance of . + public FrontendUpdateProperties() { - Tags = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . - /// Resource tags. + /// Initializes a new instance of . + /// Frontend Security Policy Configuration. /// Keeps track of any properties unknown to the library. - internal FrontendPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + internal FrontendUpdateProperties(SecurityPolicyConfigurations securityPolicyConfigurations, IDictionary serializedAdditionalRawData) { - Tags = tags; + SecurityPolicyConfigurations = securityPolicyConfigurations; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource tags. - public IDictionary Tags { get; } + /// Frontend Security Policy Configuration. + public SecurityPolicyConfigurations SecurityPolicyConfigurations { get; set; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRule.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRule.Serialization.cs new file mode 100644 index 000000000000..3e825c2b45bd --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRule.Serialization.cs @@ -0,0 +1,160 @@ +// 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.Core; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + public partial class IPAccessRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IPAccessRule)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority); + writer.WritePropertyName("sourceAddressPrefixes"u8); + writer.WriteStartArray(); + foreach (var item in SourceAddressPrefixes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + 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 + } + } + } + + IPAccessRule 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(IPAccessRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIPAccessRule(document.RootElement, options); + } + + internal static IPAccessRule DeserializeIPAccessRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + int priority = default; + IList sourceAddressPrefixes = default; + IPAccessRuleAction action = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("priority"u8)) + { + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sourceAddressPrefixes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sourceAddressPrefixes = array; + continue; + } + if (property.NameEquals("action"u8)) + { + action = new IPAccessRuleAction(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IPAccessRule(name, priority, sourceAddressPrefixes, action, 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(IPAccessRule)} does not support writing '{options.Format}' format."); + } + } + + IPAccessRule 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 DeserializeIPAccessRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IPAccessRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRule.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRule.cs new file mode 100644 index 000000000000..3194b561e436 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRule.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// Ip Access Policy Rules. + public partial class IPAccessRule + { + /// + /// 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 Ip Access Rule. + /// The priority of the rule. The value can be between 1 and 400. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + /// Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs. + /// Action of the Rule. + /// or is null. + public IPAccessRule(string name, int priority, IEnumerable sourceAddressPrefixes, IPAccessRuleAction action) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(sourceAddressPrefixes, nameof(sourceAddressPrefixes)); + + Name = name; + Priority = priority; + SourceAddressPrefixes = sourceAddressPrefixes.ToList(); + Action = action; + } + + /// Initializes a new instance of . + /// Name of the Ip Access Rule. + /// The priority of the rule. The value can be between 1 and 400. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + /// Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs. + /// Action of the Rule. + /// Keeps track of any properties unknown to the library. + internal IPAccessRule(string name, int priority, IList sourceAddressPrefixes, IPAccessRuleAction action, IDictionary serializedAdditionalRawData) + { + Name = name; + Priority = priority; + SourceAddressPrefixes = sourceAddressPrefixes; + Action = action; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IPAccessRule() + { + } + + /// Name of the Ip Access Rule. + public string Name { get; set; } + /// The priority of the rule. The value can be between 1 and 400. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. + public int Priority { get; set; } + /// Source Address Prefixed Applied by the Rule. Asterisk '*' can also be used to match all source IPs. + public IList SourceAddressPrefixes { get; } + /// Action of the Rule. + public IPAccessRuleAction Action { get; set; } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRuleAction.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRuleAction.cs new file mode 100644 index 000000000000..7efc80b0ad7f --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRuleAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// Action of Ip Access Rule. + public readonly partial struct IPAccessRuleAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IPAccessRuleAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "allow"; + private const string DenyValue = "deny"; + + /// Allow Source Ip Prefixes. + public static IPAccessRuleAction Allow { get; } = new IPAccessRuleAction(AllowValue); + /// Deny Source Ip Prefixes. + public static IPAccessRuleAction Deny { get; } = new IPAccessRuleAction(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(IPAccessRuleAction left, IPAccessRuleAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IPAccessRuleAction left, IPAccessRuleAction right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IPAccessRuleAction(string value) => new IPAccessRuleAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IPAccessRuleAction other && Equals(other); + /// + public bool Equals(IPAccessRuleAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRulesPolicy.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRulesPolicy.Serialization.cs new file mode 100644 index 000000000000..18173c3a889b --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRulesPolicy.Serialization.cs @@ -0,0 +1,143 @@ +// 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.Core; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + internal partial class IPAccessRulesPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IPAccessRulesPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteStartArray(); + foreach (var item in Rules) + { + 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 + } + } + } + + IPAccessRulesPolicy 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(IPAccessRulesPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIPAccessRulesPolicy(document.RootElement, options); + } + + internal static IPAccessRulesPolicy DeserializeIPAccessRulesPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList rules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(IPAccessRule.DeserializeIPAccessRule(item, options)); + } + rules = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IPAccessRulesPolicy(rules ?? new ChangeTrackingList(), 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(IPAccessRulesPolicy)} does not support writing '{options.Format}' format."); + } + } + + IPAccessRulesPolicy 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 DeserializeIPAccessRulesPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IPAccessRulesPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurationsUpdate.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRulesPolicy.cs similarity index 56% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurationsUpdate.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRulesPolicy.cs index f61f0a5dcb4b..6e4a24a3c012 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurationsUpdate.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/IPAccessRulesPolicy.cs @@ -7,13 +7,11 @@ using System; using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ServiceNetworking.Models { - /// SecurityPolicyConfigurations Subresource of Traffic Controller. - internal partial class SecurityPolicyConfigurationsUpdate + /// Ip Access Policy. + internal partial class IPAccessRulesPolicy { /// /// Keeps track of any properties unknown to the library. @@ -47,32 +45,22 @@ internal partial class SecurityPolicyConfigurationsUpdate /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SecurityPolicyConfigurationsUpdate() + /// Initializes a new instance of . + public IPAccessRulesPolicy() { + Rules = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// Contains reference to a WAF-type security policy that is applied at the Traffic Controller level. + /// Initializes a new instance of . + /// Ip Access Policy Rules List. /// Keeps track of any properties unknown to the library. - internal SecurityPolicyConfigurationsUpdate(WritableSubResource wafSecurityPolicy, IDictionary serializedAdditionalRawData) + internal IPAccessRulesPolicy(IList rules, IDictionary serializedAdditionalRawData) { - WafSecurityPolicy = wafSecurityPolicy; + Rules = rules; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Contains reference to a WAF-type security policy that is applied at the Traffic Controller level. - internal WritableSubResource WafSecurityPolicy { get; set; } - /// Gets or sets Id. - public ResourceIdentifier WafSecurityPolicyId - { - get => WafSecurityPolicy is null ? default : WafSecurityPolicy.Id; - set - { - if (WafSecurityPolicy is null) - WafSecurityPolicy = new WritableSubResource(); - WafSecurityPolicy.Id = value; - } - } + /// Ip Access Policy Rules List. + public IList Rules { get; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/PolicyType.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/PolicyType.cs deleted file mode 100644 index a239f0d32d34..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/PolicyType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ServiceNetworking.Models -{ - /// Policy Type of the Security Policy. - public readonly partial struct PolicyType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PolicyType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WAFValue = "waf"; - - /// Policy of Type WAF. - public static PolicyType WAF { get; } = new PolicyType(WAFValue); - /// Determines if two values are the same. - public static bool operator ==(PolicyType left, PolicyType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PolicyType left, PolicyType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator PolicyType(string value) => new PolicyType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PolicyType other && Equals(other); - /// - public bool Equals(PolicyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ProvisioningState.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index 20a310027a04..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ProvisioningState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ServiceNetworking.Models -{ - /// Resource Provisioning State Enum. - public readonly partial struct ProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ProvisioningValue = "Provisioning"; - private const string UpdatingValue = "Updating"; - private const string DeletingValue = "Deleting"; - private const string AcceptedValue = "Accepted"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Resource in Provisioning State. - public static ProvisioningState Provisioning { get; } = new ProvisioningState(ProvisioningValue); - /// Resource in Updating State. - public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); - /// Resource in Deleting State. - public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); - /// Resource in Accepted State. - public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); - /// Resource in Succeeded State. - public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); - /// Resource in Failed State. - public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); - /// Resource in Canceled State. - public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); - /// - public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.Serialization.cs index 63da992f8cce..fed681dfcdd6 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.Serialization.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ServiceNetworking.Models { - internal partial class SecurityPolicyConfigurations : IUtf8JsonSerializable, IJsonModel + public partial class SecurityPolicyConfigurations : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -40,6 +40,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("wafSecurityPolicy"u8); JsonSerializer.Serialize(writer, WafSecurityPolicy); } + if (Optional.IsDefined(IPAccessRulesSecurityPolicy)) + { + writer.WritePropertyName("ipAccessRulesSecurityPolicy"u8); + JsonSerializer.Serialize(writer, IPAccessRulesSecurityPolicy); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,6 +83,7 @@ internal static SecurityPolicyConfigurations DeserializeSecurityPolicyConfigurat return null; } WritableSubResource wafSecurityPolicy = default; + WritableSubResource ipAccessRulesSecurityPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +97,22 @@ internal static SecurityPolicyConfigurations DeserializeSecurityPolicyConfigurat wafSecurityPolicy = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } + if (property.NameEquals("ipAccessRulesSecurityPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipAccessRulesSecurityPolicy = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new SecurityPolicyConfigurations(wafSecurityPolicy, serializedAdditionalRawData); + return new SecurityPolicyConfigurations(wafSecurityPolicy, ipAccessRulesSecurityPolicy, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.cs index 6d5cbab6f8ed..fd06c192e57c 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyConfigurations.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceNetworking.Models { /// SecurityPolicyConfigurations Subresource of Traffic Controller. - internal partial class SecurityPolicyConfigurations + public partial class SecurityPolicyConfigurations { /// /// Keeps track of any properties unknown to the library. @@ -54,10 +54,12 @@ public SecurityPolicyConfigurations() /// Initializes a new instance of . /// Contains reference to a WAF-type security policy that is applied at the Traffic Controller level. + /// Contains reference to a IpAccessRules-type security policy that is applied at the Frontend level. /// Keeps track of any properties unknown to the library. - internal SecurityPolicyConfigurations(WritableSubResource wafSecurityPolicy, IDictionary serializedAdditionalRawData) + internal SecurityPolicyConfigurations(WritableSubResource wafSecurityPolicy, WritableSubResource ipAccessRulesSecurityPolicy, IDictionary serializedAdditionalRawData) { WafSecurityPolicy = wafSecurityPolicy; + IPAccessRulesSecurityPolicy = ipAccessRulesSecurityPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,5 +76,19 @@ public ResourceIdentifier WafSecurityPolicyId WafSecurityPolicy.Id = value; } } + + /// Contains reference to a IpAccessRules-type security policy that is applied at the Frontend level. + internal WritableSubResource IPAccessRulesSecurityPolicy { get; set; } + /// Gets or sets Id. + public ResourceIdentifier IPAccessRulesSecurityPolicyId + { + get => IPAccessRulesSecurityPolicy is null ? default : IPAccessRulesSecurityPolicy.Id; + set + { + if (IPAccessRulesSecurityPolicy is null) + IPAccessRulesSecurityPolicy = new WritableSubResource(); + IPAccessRulesSecurityPolicy.Id = value; + } + } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyUpdateProperties.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..cc99f3d3d027 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyUpdateProperties.Serialization.cs @@ -0,0 +1,149 @@ +// 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.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + public partial class SecurityPolicyUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecurityPolicyUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(WafPolicy)) + { + writer.WritePropertyName("wafPolicy"u8); + JsonSerializer.Serialize(writer, WafPolicy); + } + if (Optional.IsDefined(IPAccessRulesPolicy)) + { + writer.WritePropertyName("ipAccessRulesPolicy"u8); + writer.WriteObjectValue(IPAccessRulesPolicy, 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 + } + } + } + + SecurityPolicyUpdateProperties 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(SecurityPolicyUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecurityPolicyUpdateProperties(document.RootElement, options); + } + + internal static SecurityPolicyUpdateProperties DeserializeSecurityPolicyUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WritableSubResource wafPolicy = default; + IPAccessRulesPolicy ipAccessRulesPolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("wafPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + wafPolicy = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("ipAccessRulesPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipAccessRulesPolicy = IPAccessRulesPolicy.DeserializeIPAccessRulesPolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecurityPolicyUpdateProperties(wafPolicy, ipAccessRulesPolicy, 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(SecurityPolicyUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + SecurityPolicyUpdateProperties 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 DeserializeSecurityPolicyUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecurityPolicyUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyUpdateProperties.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyUpdateProperties.cs new file mode 100644 index 000000000000..1479a0bdcf0d --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/SecurityPolicyUpdateProperties.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.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// The updatable properties of the SecurityPolicy. + public partial class SecurityPolicyUpdateProperties + { + /// + /// 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 SecurityPolicyUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Web Application Firewall Policy of the Traffic Controller Security Policy. If this property is set then ipAccessRulesPolicy property cannot be set. + /// Ip Access Policy of the Traffic Controller Security Policy. If this property is set then wafPolicy property cannot be set. + /// Keeps track of any properties unknown to the library. + internal SecurityPolicyUpdateProperties(WritableSubResource wafPolicy, IPAccessRulesPolicy ipAccessRulesPolicy, IDictionary serializedAdditionalRawData) + { + WafPolicy = wafPolicy; + IPAccessRulesPolicy = ipAccessRulesPolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Web Application Firewall Policy of the Traffic Controller Security Policy. If this property is set then ipAccessRulesPolicy property cannot be set. + internal WritableSubResource WafPolicy { get; set; } + /// Gets or sets Id. + public ResourceIdentifier WafPolicyId + { + get => WafPolicy is null ? default : WafPolicy.Id; + set + { + if (WafPolicy is null) + WafPolicy = new WritableSubResource(); + WafPolicy.Id = value; + } + } + + /// Ip Access Policy of the Traffic Controller Security Policy. If this property is set then wafPolicy property cannot be set. + internal IPAccessRulesPolicy IPAccessRulesPolicy { get; set; } + /// Ip Access Policy Rules List. + public IList Rules + { + get + { + if (IPAccessRulesPolicy is null) + IPAccessRulesPolicy = new IPAccessRulesPolicy(); + return IPAccessRulesPolicy.Rules; + } + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ServiceNetworkingProvisioningState.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ServiceNetworkingProvisioningState.cs new file mode 100644 index 000000000000..5c4490c6cfa0 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/ServiceNetworkingProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// Resource Provisioning State Enum. + public readonly partial struct ServiceNetworkingProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ServiceNetworkingProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string AcceptedValue = "Accepted"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource in Provisioning State. + public static ServiceNetworkingProvisioningState Provisioning { get; } = new ServiceNetworkingProvisioningState(ProvisioningValue); + /// Resource in Updating State. + public static ServiceNetworkingProvisioningState Updating { get; } = new ServiceNetworkingProvisioningState(UpdatingValue); + /// Resource in Deleting State. + public static ServiceNetworkingProvisioningState Deleting { get; } = new ServiceNetworkingProvisioningState(DeletingValue); + /// Resource in Accepted State. + public static ServiceNetworkingProvisioningState Accepted { get; } = new ServiceNetworkingProvisioningState(AcceptedValue); + /// Resource in Succeeded State. + public static ServiceNetworkingProvisioningState Succeeded { get; } = new ServiceNetworkingProvisioningState(SucceededValue); + /// Resource in Failed State. + public static ServiceNetworkingProvisioningState Failed { get; } = new ServiceNetworkingProvisioningState(FailedValue); + /// Resource in Canceled State. + public static ServiceNetworkingProvisioningState Canceled { get; } = new ServiceNetworkingProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ServiceNetworkingProvisioningState left, ServiceNetworkingProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ServiceNetworkingProvisioningState left, ServiceNetworkingProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ServiceNetworkingProvisioningState(string value) => new ServiceNetworkingProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ServiceNetworkingProvisioningState other && Equals(other); + /// + public bool Equals(ServiceNetworkingProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationPatch.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationPatch.Serialization.cs similarity index 71% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationPatch.Serialization.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationPatch.Serialization.cs index 0bb7469e72be..70a9a731d5eb 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationPatch.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationPatch.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.ServiceNetworking.Models { - public partial class AssociationPatch : IUtf8JsonSerializable, IJsonModel + public partial class TrafficControllerAssociationPatch : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,10 +29,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AssociationPatch)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationPatch)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Tags)) @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AssociationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TrafficControllerAssociationPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AssociationPatch)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationPatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAssociationPatch(document.RootElement, options); + return DeserializeTrafficControllerAssociationPatch(document.RootElement, options); } - internal static AssociationPatch DeserializeAssociationPatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static TrafficControllerAssociationPatch DeserializeTrafficControllerAssociationPatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -97,7 +97,7 @@ internal static AssociationPatch DeserializeAssociationPatch(JsonElement element return null; } IDictionary tags = default; - AssociationType? associationType = default; + TrafficControllerAssociationType? associationType = default; WritableSubResource subnet = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -132,7 +132,7 @@ internal static AssociationPatch DeserializeAssociationPatch(JsonElement element { continue; } - associationType = new AssociationType(property0.Value.GetString()); + associationType = new TrafficControllerAssociationType(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet"u8)) @@ -153,38 +153,38 @@ internal static AssociationPatch DeserializeAssociationPatch(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new AssociationPatch(tags ?? new ChangeTrackingDictionary(), associationType, subnet, serializedAdditionalRawData); + return new TrafficControllerAssociationPatch(tags ?? new ChangeTrackingDictionary(), associationType, subnet, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(AssociationPatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationPatch)} does not support writing '{options.Format}' format."); } } - AssociationPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + TrafficControllerAssociationPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAssociationPatch(document.RootElement, options); + return DeserializeTrafficControllerAssociationPatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AssociationPatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationPatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationPatch.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationPatch.cs similarity index 82% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationPatch.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationPatch.cs index 5bc8881e4d7a..d2f1322fbcad 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/AssociationPatch.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationPatch.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceNetworking.Models { /// The type used for update operations of the Association. - public partial class AssociationPatch + public partial class TrafficControllerAssociationPatch { /// /// Keeps track of any properties unknown to the library. @@ -47,18 +47,18 @@ public partial class AssociationPatch /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AssociationPatch() + /// Initializes a new instance of . + public TrafficControllerAssociationPatch() { Tags = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Resource tags. /// Association Type. /// Association Subnet. /// Keeps track of any properties unknown to the library. - internal AssociationPatch(IDictionary tags, AssociationType? associationType, WritableSubResource subnet, IDictionary serializedAdditionalRawData) + internal TrafficControllerAssociationPatch(IDictionary tags, TrafficControllerAssociationType? associationType, WritableSubResource subnet, IDictionary serializedAdditionalRawData) { Tags = tags; AssociationType = associationType; @@ -69,7 +69,7 @@ internal AssociationPatch(IDictionary tags, AssociationType? ass /// Resource tags. public IDictionary Tags { get; } /// Association Type. - public AssociationType? AssociationType { get; set; } + public TrafficControllerAssociationType? AssociationType { get; set; } /// Association Subnet. internal WritableSubResource Subnet { get; set; } /// Gets or sets Id. diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationType.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationType.cs new file mode 100644 index 000000000000..e271a0dee3c4 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerAssociationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// Association Type Enum. + public readonly partial struct TrafficControllerAssociationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TrafficControllerAssociationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SubnetsValue = "subnets"; + + /// Association of Type Subnet. + public static TrafficControllerAssociationType Subnets { get; } = new TrafficControllerAssociationType(SubnetsValue); + /// Determines if two values are the same. + public static bool operator ==(TrafficControllerAssociationType left, TrafficControllerAssociationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TrafficControllerAssociationType left, TrafficControllerAssociationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TrafficControllerAssociationType(string value) => new TrafficControllerAssociationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TrafficControllerAssociationType other && Equals(other); + /// + public bool Equals(TrafficControllerAssociationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendPatch.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerFrontendPatch.Serialization.cs similarity index 59% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendPatch.Serialization.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerFrontendPatch.Serialization.cs index 5410a99b5388..b09800eb65a7 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/FrontendPatch.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerFrontendPatch.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.ServiceNetworking.Models { - public partial class FrontendPatch : IUtf8JsonSerializable, IJsonModel + public partial class TrafficControllerFrontendPatch : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FrontendPatch)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendPatch)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Tags)) @@ -45,6 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -62,19 +67,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - FrontendPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TrafficControllerFrontendPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FrontendPatch)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendPatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFrontendPatch(document.RootElement, options); + return DeserializeTrafficControllerFrontendPatch(document.RootElement, options); } - internal static FrontendPatch DeserializeFrontendPatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static TrafficControllerFrontendPatch DeserializeTrafficControllerFrontendPatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -83,6 +88,7 @@ internal static FrontendPatch DeserializeFrontendPatch(JsonElement element, Mode return null; } IDictionary tags = default; + FrontendUpdateProperties properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -101,44 +107,53 @@ internal static FrontendPatch DeserializeFrontendPatch(JsonElement element, Mode tags = dictionary; continue; } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FrontendUpdateProperties.DeserializeFrontendUpdateProperties(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new FrontendPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new TrafficControllerFrontendPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(FrontendPatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendPatch)} does not support writing '{options.Format}' format."); } } - FrontendPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + TrafficControllerFrontendPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeFrontendPatch(document.RootElement, options); + return DeserializeTrafficControllerFrontendPatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(FrontendPatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendPatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerFrontendPatch.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerFrontendPatch.cs new file mode 100644 index 000000000000..837b8c74342a --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerFrontendPatch.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 Azure.ResourceManager.ServiceNetworking.Models +{ + /// The type used for update operations of the Frontend. + public partial class TrafficControllerFrontendPatch + { + /// + /// 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 TrafficControllerFrontendPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal TrafficControllerFrontendPatch(IDictionary tags, FrontendUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal FrontendUpdateProperties Properties { get; set; } + /// Frontend Security Policy Configuration. + public SecurityPolicyConfigurations FrontendUpdateSecurityPolicyConfigurations + { + get => Properties is null ? default : Properties.SecurityPolicyConfigurations; + set + { + if (Properties is null) + Properties = new FrontendUpdateProperties(); + Properties.SecurityPolicyConfigurations = value; + } + } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.Serialization.cs index 25cd3e0b952e..96c16c6606c4 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.Serialization.cs @@ -45,14 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(SecurityPolicyConfigurations)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("securityPolicyConfigurations"u8); - writer.WriteObjectValue(SecurityPolicyConfigurations, options); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -91,7 +88,7 @@ internal static TrafficControllerPatch DeserializeTrafficControllerPatch(JsonEle return null; } IDictionary tags = default; - SecurityPolicyConfigurationsUpdate securityPolicyConfigurations = default; + TrafficControllerUpdateProperties properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -114,21 +111,9 @@ internal static TrafficControllerPatch DeserializeTrafficControllerPatch(JsonEle { if (property.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("securityPolicyConfigurations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - securityPolicyConfigurations = SecurityPolicyConfigurationsUpdate.DeserializeSecurityPolicyConfigurationsUpdate(property0.Value, options); - continue; - } - } + properties = TrafficControllerUpdateProperties.DeserializeTrafficControllerUpdateProperties(property.Value, options); continue; } if (options.Format != "W") @@ -137,7 +122,7 @@ internal static TrafficControllerPatch DeserializeTrafficControllerPatch(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new TrafficControllerPatch(tags ?? new ChangeTrackingDictionary(), securityPolicyConfigurations, serializedAdditionalRawData); + return new TrafficControllerPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.cs index 6d38ce13f0b7..e1770775deb4 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerPatch.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; namespace Azure.ResourceManager.ServiceNetworking.Models { @@ -54,28 +53,28 @@ public TrafficControllerPatch() /// Initializes a new instance of . /// Resource tags. - /// Security Policy Configuration. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal TrafficControllerPatch(IDictionary tags, SecurityPolicyConfigurationsUpdate securityPolicyConfigurations, IDictionary serializedAdditionalRawData) + internal TrafficControllerPatch(IDictionary tags, TrafficControllerUpdateProperties properties, IDictionary serializedAdditionalRawData) { Tags = tags; - SecurityPolicyConfigurations = securityPolicyConfigurations; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Resource tags. public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal TrafficControllerUpdateProperties Properties { get; set; } /// Security Policy Configuration. - internal SecurityPolicyConfigurationsUpdate SecurityPolicyConfigurations { get; set; } - /// Gets or sets Id. - public ResourceIdentifier WafSecurityPolicyId + public SecurityPolicyConfigurations TrafficControllerUpdateSecurityPolicyConfigurations { - get => SecurityPolicyConfigurations is null ? default : SecurityPolicyConfigurations.WafSecurityPolicyId; + get => Properties is null ? default : Properties.SecurityPolicyConfigurations; set { - if (SecurityPolicyConfigurations is null) - SecurityPolicyConfigurations = new SecurityPolicyConfigurationsUpdate(); - SecurityPolicyConfigurations.WafSecurityPolicyId = value; + if (Properties is null) + Properties = new TrafficControllerUpdateProperties(); + Properties.SecurityPolicyConfigurations = value; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerUpdateProperties.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..d2b99e310ed5 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerUpdateProperties.Serialization.cs @@ -0,0 +1,133 @@ +// 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.Core; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + internal partial class TrafficControllerUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TrafficControllerUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SecurityPolicyConfigurations)) + { + writer.WritePropertyName("securityPolicyConfigurations"u8); + writer.WriteObjectValue(SecurityPolicyConfigurations, 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 + } + } + } + + TrafficControllerUpdateProperties 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(TrafficControllerUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTrafficControllerUpdateProperties(document.RootElement, options); + } + + internal static TrafficControllerUpdateProperties DeserializeTrafficControllerUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SecurityPolicyConfigurations securityPolicyConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("securityPolicyConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityPolicyConfigurations = SecurityPolicyConfigurations.DeserializeSecurityPolicyConfigurations(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TrafficControllerUpdateProperties(securityPolicyConfigurations, 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(TrafficControllerUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + TrafficControllerUpdateProperties 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 DeserializeTrafficControllerUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TrafficControllerUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerUpdateProperties.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerUpdateProperties.cs new file mode 100644 index 000000000000..3f49130a4e16 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/Models/TrafficControllerUpdateProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceNetworking.Models +{ + /// The updatable properties of the TrafficController. + internal partial class TrafficControllerUpdateProperties + { + /// + /// 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 TrafficControllerUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Security Policy Configuration. + /// Keeps track of any properties unknown to the library. + internal TrafficControllerUpdateProperties(SecurityPolicyConfigurations securityPolicyConfigurations, IDictionary serializedAdditionalRawData) + { + SecurityPolicyConfigurations = securityPolicyConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Security Policy Configuration. + public SecurityPolicyConfigurations SecurityPolicyConfigurations { get; set; } + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/AssociationsInterfaceRestOperations.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/AssociationsInterfaceRestOperations.cs index 5865b385dcd2..72ee5f6f3ff9 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/AssociationsInterfaceRestOperations.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/AssociationsInterfaceRestOperations.cs @@ -25,111 +25,17 @@ internal partial class AssociationsInterfaceRestOperations /// Initializes a new instance of AssociationsInterfaceRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public AssociationsInterfaceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-01-01"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByTrafficControllerRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); - uri.AppendPath(trafficControllerName, true); - uri.AppendPath("/associations", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByTrafficControllerRequest(string subscriptionId, string resourceGroupName, string trafficControllerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); - uri.AppendPath(trafficControllerName, true); - uri.AppendPath("/associations", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List Association resources by TrafficController. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// traffic controller name for path. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByTrafficControllerAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); - - using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AssociationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AssociationListResult.DeserializeAssociationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Association resources by TrafficController. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// traffic controller name for path. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); - - using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AssociationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AssociationListResult.DeserializeAssociationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName) { var uri = new RawRequestUriBuilder(); @@ -169,14 +75,14 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,27 +95,27 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - AssociationData value = default; + TrafficControllerAssociationData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AssociationData.DeserializeAssociationData(document.RootElement); + value = TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((AssociationData)null, message.Response); + return Response.FromValue((TrafficControllerAssociationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// Get a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -222,19 +128,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - AssociationData value = default; + TrafficControllerAssociationData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AssociationData.DeserializeAssociationData(document.RootElement); + value = TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((AssociationData)null, message.Response); + return Response.FromValue((TrafficControllerAssociationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -277,7 +183,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. @@ -285,7 +191,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -306,7 +212,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. @@ -314,7 +220,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -334,7 +240,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationPatch patch) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,7 +256,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -377,7 +283,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. @@ -385,7 +291,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationPatch patch, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -399,9 +305,9 @@ public async Task> UpdateAsync(string subscriptionId, { case 200: { - AssociationData value = default; + TrafficControllerAssociationData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AssociationData.DeserializeAssociationData(document.RootElement); + value = TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -410,7 +316,7 @@ public async Task> UpdateAsync(string subscriptionId, } /// Update a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. @@ -418,7 +324,7 @@ public async Task> UpdateAsync(string subscriptionId, /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, AssociationPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, TrafficControllerAssociationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -432,9 +338,9 @@ public Response Update(string subscriptionId, string resourceGr { case 200: { - AssociationData value = default; + TrafficControllerAssociationData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AssociationData.DeserializeAssociationData(document.RootElement); + value = TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -481,7 +387,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. @@ -508,7 +414,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Association. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Name of Association. @@ -534,6 +440,100 @@ public Response Delete(string subscriptionId, string resourceGroupName, string t } } + internal RequestUriBuilder CreateListByTrafficControllerRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); + uri.AppendPath(trafficControllerName, true); + uri.AppendPath("/associations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByTrafficControllerRequest(string subscriptionId, string resourceGroupName, string trafficControllerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); + uri.AppendPath(trafficControllerName, true); + uri.AppendPath("/associations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Association resources by TrafficController. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// traffic controller name for path. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByTrafficControllerAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); + + using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AssociationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AssociationListResult.DeserializeAssociationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Association resources by TrafficController. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// traffic controller name for path. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); + + using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AssociationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AssociationListResult.DeserializeAssociationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByTrafficControllerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string trafficControllerName) { var uri = new RawRequestUriBuilder(); @@ -558,7 +558,7 @@ internal HttpMessage CreateListByTrafficControllerNextPageRequest(string nextLin /// List Association resources by TrafficController. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -589,7 +589,7 @@ public async Task> ListByTrafficControllerNextPa /// List Association resources by TrafficController. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/FrontendsInterfaceRestOperations.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/FrontendsInterfaceRestOperations.cs index 2e957f12294d..4eb35f076978 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/FrontendsInterfaceRestOperations.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/FrontendsInterfaceRestOperations.cs @@ -25,111 +25,17 @@ internal partial class FrontendsInterfaceRestOperations /// Initializes a new instance of FrontendsInterfaceRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public FrontendsInterfaceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-01-01"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByTrafficControllerRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); - uri.AppendPath(trafficControllerName, true); - uri.AppendPath("/frontends", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByTrafficControllerRequest(string subscriptionId, string resourceGroupName, string trafficControllerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); - uri.AppendPath(trafficControllerName, true); - uri.AppendPath("/frontends", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List Frontend resources by TrafficController. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// traffic controller name for path. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByTrafficControllerAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); - - using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - FrontendListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FrontendListResult.DeserializeFrontendListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List Frontend resources by TrafficController. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// traffic controller name for path. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); - - using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - FrontendListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FrontendListResult.DeserializeFrontendListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName) { var uri = new RawRequestUriBuilder(); @@ -169,14 +75,14 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,27 +95,27 @@ public async Task> GetAsync(string subscriptionId, string { case 200: { - FrontendData value = default; + TrafficControllerFrontendData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FrontendData.DeserializeFrontendData(document.RootElement); + value = TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FrontendData)null, message.Response); + return Response.FromValue((TrafficControllerFrontendData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// Get a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -222,19 +128,19 @@ public Response Get(string subscriptionId, string resourceGroupNam { case 200: { - FrontendData value = default; + TrafficControllerFrontendData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FrontendData.DeserializeFrontendData(document.RootElement); + value = TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FrontendData)null, message.Response); + return Response.FromValue((TrafficControllerFrontendData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -277,7 +183,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. @@ -285,7 +191,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -306,7 +212,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. @@ -314,7 +220,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -334,7 +240,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendPatch patch) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,7 +256,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -377,7 +283,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. @@ -385,7 +291,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendPatch patch, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -399,9 +305,9 @@ public async Task> UpdateAsync(string subscriptionId, str { case 200: { - FrontendData value = default; + TrafficControllerFrontendData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FrontendData.DeserializeFrontendData(document.RootElement); + value = TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -410,7 +316,7 @@ public async Task> UpdateAsync(string subscriptionId, str } /// Update a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. @@ -418,7 +324,7 @@ public async Task> UpdateAsync(string subscriptionId, str /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, FrontendPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string trafficControllerName, string frontendName, TrafficControllerFrontendPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -432,9 +338,9 @@ public Response Update(string subscriptionId, string resourceGroup { case 200: { - FrontendData value = default; + TrafficControllerFrontendData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FrontendData.DeserializeFrontendData(document.RootElement); + value = TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -481,7 +387,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. @@ -508,7 +414,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Frontend. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Frontends. @@ -534,6 +440,100 @@ public Response Delete(string subscriptionId, string resourceGroupName, string t } } + internal RequestUriBuilder CreateListByTrafficControllerRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); + uri.AppendPath(trafficControllerName, true); + uri.AppendPath("/frontends", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByTrafficControllerRequest(string subscriptionId, string resourceGroupName, string trafficControllerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); + uri.AppendPath(trafficControllerName, true); + uri.AppendPath("/frontends", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Frontend resources by TrafficController. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// traffic controller name for path. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByTrafficControllerAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); + + using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FrontendListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FrontendListResult.DeserializeFrontendListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Frontend resources by TrafficController. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// traffic controller name for path. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); + + using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FrontendListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FrontendListResult.DeserializeFrontendListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByTrafficControllerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string trafficControllerName) { var uri = new RawRequestUriBuilder(); @@ -558,7 +558,7 @@ internal HttpMessage CreateListByTrafficControllerNextPageRequest(string nextLin /// List Frontend resources by TrafficController. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -589,7 +589,7 @@ public async Task> ListByTrafficControllerNextPageA /// List Frontend resources by TrafficController. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/SecurityPoliciesInterfaceRestOperations.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/SecurityPoliciesInterfaceRestOperations.cs index a2ab05948017..e5570c1aa80c 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/SecurityPoliciesInterfaceRestOperations.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/SecurityPoliciesInterfaceRestOperations.cs @@ -25,111 +25,17 @@ internal partial class SecurityPoliciesInterfaceRestOperations /// Initializes a new instance of SecurityPoliciesInterfaceRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public SecurityPoliciesInterfaceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-01-01"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByTrafficControllerRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); - uri.AppendPath(trafficControllerName, true); - uri.AppendPath("/securityPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByTrafficControllerRequest(string subscriptionId, string resourceGroupName, string trafficControllerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); - uri.AppendPath(trafficControllerName, true); - uri.AppendPath("/securityPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List SecurityPolicy resources by TrafficController. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// traffic controller name for path. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByTrafficControllerAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); - - using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SecurityPolicyListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SecurityPolicyListResult.DeserializeSecurityPolicyListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List SecurityPolicy resources by TrafficController. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// traffic controller name for path. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); - - using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SecurityPolicyListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SecurityPolicyListResult.DeserializeSecurityPolicyListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName, string securityPolicyName) { var uri = new RawRequestUriBuilder(); @@ -169,7 +75,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -202,7 +108,7 @@ public async Task> G } /// Get a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -277,7 +183,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -306,7 +212,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -377,7 +283,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -410,7 +316,7 @@ public async Task> U } /// Update a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -481,7 +387,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -508,7 +414,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a SecurityPolicy. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// SecurityPolicy. @@ -534,6 +440,100 @@ public Response Delete(string subscriptionId, string resourceGroupName, string t } } + internal RequestUriBuilder CreateListByTrafficControllerRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); + uri.AppendPath(trafficControllerName, true); + uri.AppendPath("/securityPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByTrafficControllerRequest(string subscriptionId, string resourceGroupName, string trafficControllerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers/", false); + uri.AppendPath(trafficControllerName, true); + uri.AppendPath("/securityPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List SecurityPolicy resources by TrafficController. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// traffic controller name for path. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByTrafficControllerAsync(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); + + using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SecurityPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SecurityPolicyListResult.DeserializeSecurityPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List SecurityPolicy resources by TrafficController. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// traffic controller name for path. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(trafficControllerName, nameof(trafficControllerName)); + + using var message = CreateListByTrafficControllerRequest(subscriptionId, resourceGroupName, trafficControllerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SecurityPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SecurityPolicyListResult.DeserializeSecurityPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByTrafficControllerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string trafficControllerName) { var uri = new RawRequestUriBuilder(); @@ -558,7 +558,7 @@ internal HttpMessage CreateListByTrafficControllerNextPageRequest(string nextLin /// List SecurityPolicy resources by TrafficController. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -589,7 +589,7 @@ public async Task> ListByTrafficControllerNex /// List SecurityPolicy resources by TrafficController. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/TrafficControllerInterfaceRestOperations.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/TrafficControllerInterfaceRestOperations.cs index 59882657901a..e8736ac1d378 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/TrafficControllerInterfaceRestOperations.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/RestOperations/TrafficControllerInterfaceRestOperations.cs @@ -25,181 +25,17 @@ internal partial class TrafficControllerInterfaceRestOperations /// Initializes a new instance of TrafficControllerInterfaceRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public TrafficControllerInterfaceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-01-01"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List TrafficController resources by subscription ID. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - TrafficControllerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List TrafficController resources by subscription ID. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - TrafficControllerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List TrafficController resources by resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - TrafficControllerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List TrafficController resources by resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - TrafficControllerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string trafficControllerName) { var uri = new RawRequestUriBuilder(); @@ -235,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -266,7 +102,7 @@ public async Task> GetAsync(string subscriptionI } /// Get a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -335,7 +171,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Resource create parameters. @@ -362,7 +198,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// Resource create parameters. @@ -427,7 +263,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The resource properties to be updated. @@ -458,7 +294,7 @@ public async Task> UpdateAsync(string subscripti } /// Update a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The resource properties to be updated. @@ -523,7 +359,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -548,7 +384,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a TrafficController. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// traffic controller name for path. /// The cancellation token to use. @@ -572,22 +408,114 @@ public Response Delete(string subscriptionId, string resourceGroupName, string t } } - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); + uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List TrafficController resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TrafficControllerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List TrafficController resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TrafficControllerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceNetworking/trafficControllers", false); + uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -595,17 +523,15 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st } /// List TrafficController resources by subscription ID. - /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateListBySubscriptionRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -622,17 +548,15 @@ public async Task> ListBySubscriptionNextP } /// List TrafficController resources by subscription ID. - /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. - /// or is null. + /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateListBySubscriptionRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -672,7 +596,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List TrafficController resources by resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -701,7 +625,7 @@ public async Task> ListByResourceGroupNext /// List TrafficController resources by resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -727,5 +651,81 @@ public Response ListByResourceGroupNextPage(string throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + 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"); + _userAgent.Apply(message); + return message; + } + + /// List TrafficController resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TrafficControllerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List TrafficController resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TrafficControllerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TrafficControllerListResult.DeserializeTrafficControllerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationCollection.cs similarity index 59% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationCollection.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationCollection.cs index 7c0c390cdd28..95f374feec94 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationCollection.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationCollection.cs @@ -18,28 +18,28 @@ namespace Azure.ResourceManager.ServiceNetworking { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetAssociations method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetTrafficControllerAssociations method from an instance of . /// - public partial class AssociationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class TrafficControllerAssociationCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _associationAssociationsInterfaceClientDiagnostics; - private readonly AssociationsInterfaceRestOperations _associationAssociationsInterfaceRestClient; + private readonly ClientDiagnostics _trafficControllerAssociationAssociationsInterfaceClientDiagnostics; + private readonly AssociationsInterfaceRestOperations _trafficControllerAssociationAssociationsInterfaceRestClient; - /// Initializes a new instance of the class for mocking. - protected AssociationCollection() + /// Initializes a new instance of the class for mocking. + protected TrafficControllerAssociationCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal AssociationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal TrafficControllerAssociationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _associationAssociationsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", AssociationResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(AssociationResource.ResourceType, out string associationAssociationsInterfaceApiVersion); - _associationAssociationsInterfaceRestClient = new AssociationsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, associationAssociationsInterfaceApiVersion); + _trafficControllerAssociationAssociationsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", TrafficControllerAssociationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TrafficControllerAssociationResource.ResourceType, out string trafficControllerAssociationAssociationsInterfaceApiVersion); + _trafficControllerAssociationAssociationsInterfaceRestClient = new AssociationsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, trafficControllerAssociationAssociationsInterfaceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -60,15 +60,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AssociationsInterface_CreateOrUpdate + /// Association_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -78,17 +78,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string associationName, AssociationData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string associationName, TrafficControllerAssociationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.CreateOrUpdate"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data, cancellationToken).ConfigureAwait(false); - var operation = new ServiceNetworkingArmOperation(new AssociationOperationSource(Client), _associationAssociationsInterfaceClientDiagnostics, Pipeline, _associationAssociationsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data, cancellationToken).ConfigureAwait(false); + var operation = new ServiceNetworkingArmOperation(new TrafficControllerAssociationOperationSource(Client), _trafficControllerAssociationAssociationsInterfaceClientDiagnostics, Pipeline, _trafficControllerAssociationAssociationsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -109,15 +109,15 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Operation Id - /// AssociationsInterface_CreateOrUpdate + /// Association_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -127,17 +127,17 @@ public virtual async Task> CreateOrUpdateAsync /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string associationName, AssociationData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string associationName, TrafficControllerAssociationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.CreateOrUpdate"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.CreateOrUpdate"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data, cancellationToken); - var operation = new ServiceNetworkingArmOperation(new AssociationOperationSource(Client), _associationAssociationsInterfaceClientDiagnostics, Pipeline, _associationAssociationsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data, cancellationToken); + var operation = new ServiceNetworkingArmOperation(new TrafficControllerAssociationOperationSource(Client), _trafficControllerAssociationAssociationsInterfaceClientDiagnostics, Pipeline, _trafficControllerAssociationAssociationsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -158,15 +158,15 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -174,18 +174,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string associationName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string associationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.Get"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.Get"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -203,15 +203,15 @@ public virtual async Task> GetAsync(string associa /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -219,18 +219,18 @@ public virtual async Task> GetAsync(string associa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string associationName, CancellationToken cancellationToken = default) + public virtual Response Get(string associationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.Get"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.Get"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -248,25 +248,25 @@ public virtual Response Get(string associationName, Cancell /// /// /// Operation Id - /// AssociationsInterface_ListByTrafficController + /// Association_ListByTrafficController /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _associationAssociationsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _associationAssociationsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AssociationResource(Client, AssociationData.DeserializeAssociationData(e)), _associationAssociationsInterfaceClientDiagnostics, Pipeline, "AssociationCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _trafficControllerAssociationAssociationsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _trafficControllerAssociationAssociationsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new TrafficControllerAssociationResource(Client, TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(e)), _trafficControllerAssociationAssociationsInterfaceClientDiagnostics, Pipeline, "TrafficControllerAssociationCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,25 +278,25 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Operation Id - /// AssociationsInterface_ListByTrafficController + /// Association_ListByTrafficController /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _associationAssociationsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _associationAssociationsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AssociationResource(Client, AssociationData.DeserializeAssociationData(e)), _associationAssociationsInterfaceClientDiagnostics, Pipeline, "AssociationCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _trafficControllerAssociationAssociationsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _trafficControllerAssociationAssociationsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new TrafficControllerAssociationResource(Client, TrafficControllerAssociationData.DeserializeTrafficControllerAssociationData(e)), _trafficControllerAssociationAssociationsInterfaceClientDiagnostics, Pipeline, "TrafficControllerAssociationCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -308,15 +308,15 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -328,11 +328,11 @@ public virtual async Task> ExistsAsync(string associationName, Ca { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.Exists"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.Exists"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -351,15 +351,15 @@ public virtual async Task> ExistsAsync(string associationName, Ca /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -371,11 +371,11 @@ public virtual Response Exists(string associationName, CancellationToken c { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.Exists"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.Exists"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -394,15 +394,15 @@ public virtual Response Exists(string associationName, CancellationToken c /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -410,18 +410,18 @@ public virtual Response Exists(string associationName, CancellationToken c /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string associationName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string associationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.GetIfExists"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.GetIfExists"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -439,15 +439,15 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -455,18 +455,18 @@ public virtual async Task> GetIfExistsAsyn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string associationName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string associationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(associationName, nameof(associationName)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationCollection.GetIfExists"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationCollection.GetIfExists"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, associationName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -475,7 +475,7 @@ public virtual NullableResponse GetIfExists(string associat } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -485,7 +485,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationData.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationData.Serialization.cs similarity index 74% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationData.Serialization.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationData.Serialization.cs index ddd08f9043d0..69d631d53839 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationData.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.ServiceNetworking { - public partial class AssociationData : IUtf8JsonSerializable, IJsonModel + public partial class TrafficControllerAssociationData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AssociationData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -58,19 +58,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteEndObject(); } - AssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TrafficControllerAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AssociationData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAssociationData(document.RootElement, options); + return DeserializeTrafficControllerAssociationData(document.RootElement, options); } - internal static AssociationData DeserializeAssociationData(JsonElement element, ModelReaderWriterOptions options = null) + internal static TrafficControllerAssociationData DeserializeTrafficControllerAssociationData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -84,9 +84,9 @@ internal static AssociationData DeserializeAssociationData(JsonElement element, string name = default; ResourceType type = default; SystemData systemData = default; - AssociationType? associationType = default; + TrafficControllerAssociationType? associationType = default; WritableSubResource subnet = default; - ProvisioningState? provisioningState = default; + ServiceNetworkingProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -149,7 +149,7 @@ internal static AssociationData DeserializeAssociationData(JsonElement element, { continue; } - associationType = new AssociationType(property0.Value.GetString()); + associationType = new TrafficControllerAssociationType(property0.Value.GetString()); continue; } if (property0.NameEquals("subnet"u8)) @@ -167,7 +167,7 @@ internal static AssociationData DeserializeAssociationData(JsonElement element, { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new ServiceNetworkingProvisioningState(property0.Value.GetString()); continue; } } @@ -179,7 +179,7 @@ internal static AssociationData DeserializeAssociationData(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new AssociationData( + return new TrafficControllerAssociationData( id, name, type, @@ -192,35 +192,35 @@ internal static AssociationData DeserializeAssociationData(JsonElement element, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(AssociationData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationData)} does not support writing '{options.Format}' format."); } } - AssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + TrafficControllerAssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAssociationData(document.RootElement, options); + return DeserializeTrafficControllerAssociationData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AssociationData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerAssociationData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationData.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationData.cs similarity index 73% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationData.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationData.cs index 2fc8bc724c4c..2303960e1cd3 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationData.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationData.cs @@ -15,10 +15,10 @@ namespace Azure.ResourceManager.ServiceNetworking { /// - /// A class representing the Association data model. + /// A class representing the TrafficControllerAssociation data model. /// Association Subresource of Traffic Controller /// - public partial class AssociationData : TrackedResourceData + public partial class TrafficControllerAssociationData : TrackedResourceData { /// /// Keeps track of any properties unknown to the library. @@ -52,13 +52,13 @@ public partial class AssociationData : TrackedResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The location. - public AssociationData(AzureLocation location) : base(location) + public TrafficControllerAssociationData(AzureLocation location) : base(location) { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -69,7 +69,7 @@ public AssociationData(AzureLocation location) : base(location) /// Association Subnet. /// Provisioning State of Traffic Controller Association Resource. /// Keeps track of any properties unknown to the library. - internal AssociationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AssociationType? associationType, WritableSubResource subnet, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal TrafficControllerAssociationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, TrafficControllerAssociationType? associationType, WritableSubResource subnet, ServiceNetworkingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { AssociationType = associationType; Subnet = subnet; @@ -77,13 +77,13 @@ internal AssociationData(ResourceIdentifier id, string name, ResourceType resour _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AssociationData() + /// Initializes a new instance of for deserialization. + internal TrafficControllerAssociationData() { } /// Association Type. - public AssociationType? AssociationType { get; set; } + public TrafficControllerAssociationType? AssociationType { get; set; } /// Association Subnet. internal WritableSubResource Subnet { get; set; } /// Gets or sets Id. @@ -99,6 +99,6 @@ public ResourceIdentifier SubnetId } /// Provisioning State of Traffic Controller Association Resource. - public ProvisioningState? ProvisioningState { get; } + public ServiceNetworkingProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs new file mode 100644 index 000000000000..b4be25987e73 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ServiceNetworking +{ + public partial class TrafficControllerAssociationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TrafficControllerAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TrafficControllerAssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.cs similarity index 66% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationResource.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.cs index ec8f05070eb6..533d43338a05 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/AssociationResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ServiceNetworking { /// - /// A Class representing an Association along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetAssociationResource method. - /// Otherwise you can get one from its parent resource using the GetAssociation method. + /// A Class representing a TrafficControllerAssociation along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetTrafficControllerAssociationResource method. + /// Otherwise you can get one from its parent resource using the GetTrafficControllerAssociation method. /// - public partial class AssociationResource : ArmResource + public partial class TrafficControllerAssociationResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. /// The trafficControllerName. @@ -35,35 +35,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _associationAssociationsInterfaceClientDiagnostics; - private readonly AssociationsInterfaceRestOperations _associationAssociationsInterfaceRestClient; - private readonly AssociationData _data; + private readonly ClientDiagnostics _trafficControllerAssociationAssociationsInterfaceClientDiagnostics; + private readonly AssociationsInterfaceRestOperations _trafficControllerAssociationAssociationsInterfaceRestClient; + private readonly TrafficControllerAssociationData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.ServiceNetworking/trafficControllers/associations"; - /// Initializes a new instance of the class for mocking. - protected AssociationResource() + /// Initializes a new instance of the class for mocking. + protected TrafficControllerAssociationResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal AssociationResource(ArmClient client, AssociationData data) : this(client, data.Id) + internal TrafficControllerAssociationResource(ArmClient client, TrafficControllerAssociationData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal AssociationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal TrafficControllerAssociationResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _associationAssociationsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string associationAssociationsInterfaceApiVersion); - _associationAssociationsInterfaceRestClient = new AssociationsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, associationAssociationsInterfaceApiVersion); + _trafficControllerAssociationAssociationsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string trafficControllerAssociationAssociationsInterfaceApiVersion); + _trafficControllerAssociationAssociationsInterfaceRestClient = new AssociationsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, trafficControllerAssociationAssociationsInterfaceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -74,7 +74,7 @@ internal AssociationResource(ArmClient client, ResourceIdentifier id) : base(cli /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual AssociationData Data + public virtual TrafficControllerAssociationData Data { get { @@ -99,29 +99,29 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.Get"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.Get"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -139,29 +139,29 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.Get"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.Get"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -179,15 +179,15 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Operation Id - /// AssociationsInterface_Delete + /// Association_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -195,12 +195,12 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.Delete"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.Delete"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ServiceNetworkingArmOperation(_associationAssociationsInterfaceClientDiagnostics, Pipeline, _associationAssociationsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ServiceNetworkingArmOperation(_trafficControllerAssociationAssociationsInterfaceClientDiagnostics, Pipeline, _trafficControllerAssociationAssociationsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -221,15 +221,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// AssociationsInterface_Delete + /// Association_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -237,12 +237,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.Delete"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.Delete"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ServiceNetworkingArmOperation(_associationAssociationsInterfaceClientDiagnostics, Pipeline, _associationAssociationsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ServiceNetworkingArmOperation(_trafficControllerAssociationAssociationsInterfaceClientDiagnostics, Pipeline, _trafficControllerAssociationAssociationsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -263,31 +263,31 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// AssociationsInterface_Update + /// Association_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(AssociationPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(TrafficControllerAssociationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.Update"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.Update"); scope.Start(); try { - var response = await _associationAssociationsInterfaceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + var response = await _trafficControllerAssociationAssociationsInterfaceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -305,31 +305,31 @@ public virtual async Task> UpdateAsync(Association /// /// /// Operation Id - /// AssociationsInterface_Update + /// Association_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual Response Update(AssociationPatch patch, CancellationToken cancellationToken = default) + public virtual Response Update(TrafficControllerAssociationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.Update"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.Update"); scope.Start(); try { - var response = _associationAssociationsInterfaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new AssociationResource(Client, response.Value), response.GetRawResponse()); + var response = _trafficControllerAssociationAssociationsInterfaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new TrafficControllerAssociationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -347,15 +347,15 @@ public virtual Response Update(AssociationPatch patch, Canc /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -363,12 +363,12 @@ public virtual Response Update(AssociationPatch patch, Canc /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.AddTag"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.AddTag"); scope.Start(); try { @@ -377,13 +377,13 @@ public virtual async Task> AddTagAsync(string key, var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerAssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AssociationPatch(); + var patch = new TrafficControllerAssociationPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -409,15 +409,15 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -425,12 +425,12 @@ public virtual async Task> AddTagAsync(string key, /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.AddTag"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.AddTag"); scope.Start(); try { @@ -439,13 +439,13 @@ public virtual Response AddTag(string key, string value, Ca var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new AssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new TrafficControllerAssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AssociationPatch(); + var patch = new TrafficControllerAssociationPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -471,26 +471,26 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.SetTags"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.SetTags"); scope.Start(); try { @@ -500,13 +500,13 @@ public virtual async Task> SetTagsAsync(IDictionar var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerAssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AssociationPatch(); + var patch = new TrafficControllerAssociationPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); return result; @@ -528,26 +528,26 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.SetTags"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.SetTags"); scope.Start(); try { @@ -557,13 +557,13 @@ public virtual Response SetTags(IDictionary var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new AssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new TrafficControllerAssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AssociationPatch(); + var patch = new TrafficControllerAssociationPatch(); patch.Tags.ReplaceWith(tags); var result = Update(patch, cancellationToken: cancellationToken); return result; @@ -585,26 +585,26 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.RemoveTag"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.RemoveTag"); scope.Start(); try { @@ -613,13 +613,13 @@ public virtual async Task> RemoveTagAsync(string k var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _associationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _trafficControllerAssociationAssociationsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerAssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AssociationPatch(); + var patch = new TrafficControllerAssociationPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -645,26 +645,26 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _associationAssociationsInterfaceClientDiagnostics.CreateScope("AssociationResource.RemoveTag"); + using var scope = _trafficControllerAssociationAssociationsInterfaceClientDiagnostics.CreateScope("TrafficControllerAssociationResource.RemoveTag"); scope.Start(); try { @@ -673,13 +673,13 @@ public virtual Response RemoveTag(string key, CancellationT var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _associationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new AssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _trafficControllerAssociationAssociationsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new TrafficControllerAssociationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AssociationPatch(); + var patch = new TrafficControllerAssociationPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerCollection.cs index 9a4fe99fbdd8..88e3980cdce3 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerCollection.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// TrafficControllerInterface_CreateOrUpdate + /// TrafficController_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -110,11 +110,11 @@ public virtual async Task> CreateOrUpdat /// /// /// Operation Id - /// TrafficControllerInterface_CreateOrUpdate + /// TrafficController_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsync(string t /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -249,11 +249,11 @@ public virtual Response Get(string trafficControllerN /// /// /// Operation Id - /// TrafficControllerInterface_ListByResourceGroup + /// TrafficController_ListByResourceGroup /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -279,11 +279,11 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Operation Id - /// TrafficControllerInterface_ListByResourceGroup + /// TrafficController_ListByResourceGroup /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -309,11 +309,11 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string trafficControllerNa /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -395,11 +395,11 @@ public virtual Response Exists(string trafficControllerName, CancellationT /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +440,11 @@ public virtual async Task> GetIfExis /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.Serialization.cs index 9766fbf7ef40..4971e42a669b 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.Serialization.cs @@ -85,10 +85,10 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("securityPolicyConfigurations"u8); writer.WriteObjectValue(SecurityPolicyConfigurations, options); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(TrafficControllerProvisioningState)) { writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); + writer.WriteStringValue(TrafficControllerProvisioningState.Value.ToString()); } writer.WriteEndObject(); } @@ -124,7 +124,7 @@ internal static TrafficControllerData DeserializeTrafficControllerData(JsonEleme IReadOnlyList associations = default; IReadOnlyList securityPolicies = default; SecurityPolicyConfigurations securityPolicyConfigurations = default; - ProvisioningState? provisioningState = default; + ServiceNetworkingProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -252,7 +252,7 @@ internal static TrafficControllerData DeserializeTrafficControllerData(JsonEleme { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new ServiceNetworkingProvisioningState(property0.Value.GetString()); continue; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.cs index 46cc228ea8a9..e26b248767ec 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerData.cs @@ -74,16 +74,16 @@ public TrafficControllerData(AzureLocation location) : base(location) /// Associations References List. /// Security Policies References List. /// Security Policy Configuration. - /// The status of the last operation. + /// The status of the last operation. /// Keeps track of any properties unknown to the library. - internal TrafficControllerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IReadOnlyList configurationEndpoints, IReadOnlyList frontends, IReadOnlyList associations, IReadOnlyList securityPolicies, SecurityPolicyConfigurations securityPolicyConfigurations, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal TrafficControllerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IReadOnlyList configurationEndpoints, IReadOnlyList frontends, IReadOnlyList associations, IReadOnlyList securityPolicies, SecurityPolicyConfigurations securityPolicyConfigurations, ServiceNetworkingProvisioningState? trafficControllerProvisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ConfigurationEndpoints = configurationEndpoints; Frontends = frontends; Associations = associations; SecurityPolicies = securityPolicies; SecurityPolicyConfigurations = securityPolicyConfigurations; - ProvisioningState = provisioningState; + TrafficControllerProvisioningState = trafficControllerProvisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -101,20 +101,8 @@ internal TrafficControllerData() /// Security Policies References List. public IReadOnlyList SecurityPolicies { get; } /// Security Policy Configuration. - internal SecurityPolicyConfigurations SecurityPolicyConfigurations { get; set; } - /// Gets or sets Id. - public ResourceIdentifier WafSecurityPolicyId - { - get => SecurityPolicyConfigurations is null ? default : SecurityPolicyConfigurations.WafSecurityPolicyId; - set - { - if (SecurityPolicyConfigurations is null) - SecurityPolicyConfigurations = new SecurityPolicyConfigurations(); - SecurityPolicyConfigurations.WafSecurityPolicyId = value; - } - } - + public SecurityPolicyConfigurations SecurityPolicyConfigurations { get; set; } /// The status of the last operation. - public ProvisioningState? ProvisioningState { get; } + public ServiceNetworkingProvisioningState? TrafficControllerProvisioningState { get; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendCollection.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendCollection.cs similarity index 60% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendCollection.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendCollection.cs index 06bd5e25ccbf..3d8320c75726 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendCollection.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendCollection.cs @@ -18,28 +18,28 @@ namespace Azure.ResourceManager.ServiceNetworking { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetFrontends method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetTrafficControllerFrontends method from an instance of . /// - public partial class FrontendCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class TrafficControllerFrontendCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _frontendFrontendsInterfaceClientDiagnostics; - private readonly FrontendsInterfaceRestOperations _frontendFrontendsInterfaceRestClient; + private readonly ClientDiagnostics _trafficControllerFrontendFrontendsInterfaceClientDiagnostics; + private readonly FrontendsInterfaceRestOperations _trafficControllerFrontendFrontendsInterfaceRestClient; - /// Initializes a new instance of the class for mocking. - protected FrontendCollection() + /// Initializes a new instance of the class for mocking. + protected TrafficControllerFrontendCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal FrontendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal TrafficControllerFrontendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _frontendFrontendsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", FrontendResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(FrontendResource.ResourceType, out string frontendFrontendsInterfaceApiVersion); - _frontendFrontendsInterfaceRestClient = new FrontendsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, frontendFrontendsInterfaceApiVersion); + _trafficControllerFrontendFrontendsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", TrafficControllerFrontendResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TrafficControllerFrontendResource.ResourceType, out string trafficControllerFrontendFrontendsInterfaceApiVersion); + _trafficControllerFrontendFrontendsInterfaceRestClient = new FrontendsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, trafficControllerFrontendFrontendsInterfaceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -60,15 +60,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FrontendsInterface_CreateOrUpdate + /// Frontend_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -78,17 +78,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string frontendName, FrontendData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string frontendName, TrafficControllerFrontendData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.CreateOrUpdate"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data, cancellationToken).ConfigureAwait(false); - var operation = new ServiceNetworkingArmOperation(new FrontendOperationSource(Client), _frontendFrontendsInterfaceClientDiagnostics, Pipeline, _frontendFrontendsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data, cancellationToken).ConfigureAwait(false); + var operation = new ServiceNetworkingArmOperation(new TrafficControllerFrontendOperationSource(Client), _trafficControllerFrontendFrontendsInterfaceClientDiagnostics, Pipeline, _trafficControllerFrontendFrontendsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -109,15 +109,15 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Operation Id - /// FrontendsInterface_CreateOrUpdate + /// Frontend_CreateOrUpdate /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -127,17 +127,17 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string frontendName, FrontendData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string frontendName, TrafficControllerFrontendData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.CreateOrUpdate"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.CreateOrUpdate"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data, cancellationToken); - var operation = new ServiceNetworkingArmOperation(new FrontendOperationSource(Client), _frontendFrontendsInterfaceClientDiagnostics, Pipeline, _frontendFrontendsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data, cancellationToken); + var operation = new ServiceNetworkingArmOperation(new TrafficControllerFrontendOperationSource(Client), _trafficControllerFrontendFrontendsInterfaceClientDiagnostics, Pipeline, _trafficControllerFrontendFrontendsInterfaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -158,15 +158,15 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -174,18 +174,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string frontendName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string frontendName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.Get"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.Get"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -203,15 +203,15 @@ public virtual async Task> GetAsync(string frontendNa /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -219,18 +219,18 @@ public virtual async Task> GetAsync(string frontendNa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string frontendName, CancellationToken cancellationToken = default) + public virtual Response Get(string frontendName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.Get"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.Get"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -248,25 +248,25 @@ public virtual Response Get(string frontendName, CancellationT /// /// /// Operation Id - /// FrontendsInterface_ListByTrafficController + /// Frontend_ListByTrafficController /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _frontendFrontendsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _frontendFrontendsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FrontendResource(Client, FrontendData.DeserializeFrontendData(e)), _frontendFrontendsInterfaceClientDiagnostics, Pipeline, "FrontendCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _trafficControllerFrontendFrontendsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _trafficControllerFrontendFrontendsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new TrafficControllerFrontendResource(Client, TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(e)), _trafficControllerFrontendFrontendsInterfaceClientDiagnostics, Pipeline, "TrafficControllerFrontendCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -278,25 +278,25 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// Operation Id - /// FrontendsInterface_ListByTrafficController + /// Frontend_ListByTrafficController /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _frontendFrontendsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _frontendFrontendsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FrontendResource(Client, FrontendData.DeserializeFrontendData(e)), _frontendFrontendsInterfaceClientDiagnostics, Pipeline, "FrontendCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _trafficControllerFrontendFrontendsInterfaceRestClient.CreateListByTrafficControllerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _trafficControllerFrontendFrontendsInterfaceRestClient.CreateListByTrafficControllerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new TrafficControllerFrontendResource(Client, TrafficControllerFrontendData.DeserializeTrafficControllerFrontendData(e)), _trafficControllerFrontendFrontendsInterfaceClientDiagnostics, Pipeline, "TrafficControllerFrontendCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -308,15 +308,15 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -328,11 +328,11 @@ public virtual async Task> ExistsAsync(string frontendName, Cance { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.Exists"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.Exists"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -351,15 +351,15 @@ public virtual async Task> ExistsAsync(string frontendName, Cance /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -371,11 +371,11 @@ public virtual Response Exists(string frontendName, CancellationToken canc { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.Exists"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.Exists"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -394,15 +394,15 @@ public virtual Response Exists(string frontendName, CancellationToken canc /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -410,18 +410,18 @@ public virtual Response Exists(string frontendName, CancellationToken canc /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string frontendName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string frontendName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.GetIfExists"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.GetIfExists"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -439,15 +439,15 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -455,18 +455,18 @@ public virtual async Task> GetIfExistsAsync(s /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string frontendName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string frontendName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(frontendName, nameof(frontendName)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendCollection.GetIfExists"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendCollection.GetIfExists"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, frontendName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -475,7 +475,7 @@ public virtual NullableResponse GetIfExists(string frontendNam } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -485,7 +485,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendData.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendData.Serialization.cs similarity index 67% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendData.Serialization.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendData.Serialization.cs index 5fc19e94fe11..694131e9c2a3 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendData.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendData.Serialization.cs @@ -15,11 +15,11 @@ namespace Azure.ResourceManager.ServiceNetworking { - public partial class FrontendData : IUtf8JsonSerializable, IJsonModel + public partial class TrafficControllerFrontendData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FrontendData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -44,6 +44,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("fqdn"u8); writer.WriteStringValue(Fqdn); } + if (Optional.IsDefined(SecurityPolicyConfigurations)) + { + writer.WritePropertyName("securityPolicyConfigurations"u8); + writer.WriteObjectValue(SecurityPolicyConfigurations, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -52,19 +57,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteEndObject(); } - FrontendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + TrafficControllerFrontendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FrontendData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFrontendData(document.RootElement, options); + return DeserializeTrafficControllerFrontendData(document.RootElement, options); } - internal static FrontendData DeserializeFrontendData(JsonElement element, ModelReaderWriterOptions options = null) + internal static TrafficControllerFrontendData DeserializeTrafficControllerFrontendData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -79,7 +84,8 @@ internal static FrontendData DeserializeFrontendData(JsonElement element, ModelR ResourceType type = default; SystemData systemData = default; string fqdn = default; - ProvisioningState? provisioningState = default; + SecurityPolicyConfigurations securityPolicyConfigurations = default; + ServiceNetworkingProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -141,13 +147,22 @@ internal static FrontendData DeserializeFrontendData(JsonElement element, ModelR fqdn = property0.Value.GetString(); continue; } + if (property0.NameEquals("securityPolicyConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityPolicyConfigurations = SecurityPolicyConfigurations.DeserializeSecurityPolicyConfigurations(property0.Value, options); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new ServiceNetworkingProvisioningState(property0.Value.GetString()); continue; } } @@ -159,7 +174,7 @@ internal static FrontendData DeserializeFrontendData(JsonElement element, ModelR } } serializedAdditionalRawData = rawDataDictionary; - return new FrontendData( + return new TrafficControllerFrontendData( id, name, type, @@ -167,39 +182,40 @@ internal static FrontendData DeserializeFrontendData(JsonElement element, ModelR tags ?? new ChangeTrackingDictionary(), location, fqdn, + securityPolicyConfigurations, provisioningState, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(FrontendData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendData)} does not support writing '{options.Format}' format."); } } - FrontendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + TrafficControllerFrontendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeFrontendData(document.RootElement, options); + return DeserializeTrafficControllerFrontendData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(FrontendData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(TrafficControllerFrontendData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendData.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendData.cs similarity index 67% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendData.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendData.cs index 56714ace59f7..4cf9ccff1b76 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendData.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendData.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.ServiceNetworking { /// - /// A class representing the Frontend data model. + /// A class representing the TrafficControllerFrontend data model. /// Frontend Sub Resource of Traffic Controller. /// - public partial class FrontendData : TrackedResourceData + public partial class TrafficControllerFrontendData : TrackedResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,13 +51,13 @@ public partial class FrontendData : TrackedResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The location. - public FrontendData(AzureLocation location) : base(location) + public TrafficControllerFrontendData(AzureLocation location) : base(location) { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -65,23 +65,27 @@ public FrontendData(AzureLocation location) : base(location) /// The tags. /// The location. /// The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend. + /// Frontend Security Policy Configuration. /// Provisioning State of Traffic Controller Frontend Resource. /// Keeps track of any properties unknown to the library. - internal FrontendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string fqdn, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal TrafficControllerFrontendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string fqdn, SecurityPolicyConfigurations securityPolicyConfigurations, ServiceNetworkingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Fqdn = fqdn; + SecurityPolicyConfigurations = securityPolicyConfigurations; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal FrontendData() + /// Initializes a new instance of for deserialization. + internal TrafficControllerFrontendData() { } /// The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend. public string Fqdn { get; } + /// Frontend Security Policy Configuration. + public SecurityPolicyConfigurations SecurityPolicyConfigurations { get; set; } /// Provisioning State of Traffic Controller Frontend Resource. - public ProvisioningState? ProvisioningState { get; } + public ServiceNetworkingProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs new file mode 100644 index 000000000000..4977ba1d8eb0 --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ServiceNetworking +{ + public partial class TrafficControllerFrontendResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TrafficControllerFrontendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TrafficControllerFrontendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.cs similarity index 66% rename from sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendResource.cs rename to sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.cs index b6051a9b2360..ef89d356a216 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/FrontendResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ServiceNetworking { /// - /// A Class representing a Frontend along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetFrontendResource method. - /// Otherwise you can get one from its parent resource using the GetFrontend method. + /// A Class representing a TrafficControllerFrontend along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetTrafficControllerFrontendResource method. + /// Otherwise you can get one from its parent resource using the GetTrafficControllerFrontend method. /// - public partial class FrontendResource : ArmResource + public partial class TrafficControllerFrontendResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. /// The trafficControllerName. @@ -35,35 +35,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _frontendFrontendsInterfaceClientDiagnostics; - private readonly FrontendsInterfaceRestOperations _frontendFrontendsInterfaceRestClient; - private readonly FrontendData _data; + private readonly ClientDiagnostics _trafficControllerFrontendFrontendsInterfaceClientDiagnostics; + private readonly FrontendsInterfaceRestOperations _trafficControllerFrontendFrontendsInterfaceRestClient; + private readonly TrafficControllerFrontendData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.ServiceNetworking/trafficControllers/frontends"; - /// Initializes a new instance of the class for mocking. - protected FrontendResource() + /// Initializes a new instance of the class for mocking. + protected TrafficControllerFrontendResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal FrontendResource(ArmClient client, FrontendData data) : this(client, data.Id) + internal TrafficControllerFrontendResource(ArmClient client, TrafficControllerFrontendData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal FrontendResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal TrafficControllerFrontendResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _frontendFrontendsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string frontendFrontendsInterfaceApiVersion); - _frontendFrontendsInterfaceRestClient = new FrontendsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, frontendFrontendsInterfaceApiVersion); + _trafficControllerFrontendFrontendsInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceNetworking", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string trafficControllerFrontendFrontendsInterfaceApiVersion); + _trafficControllerFrontendFrontendsInterfaceRestClient = new FrontendsInterfaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, trafficControllerFrontendFrontendsInterfaceApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -74,7 +74,7 @@ internal FrontendResource(ArmClient client, ResourceIdentifier id) : base(client /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual FrontendData Data + public virtual TrafficControllerFrontendData Data { get { @@ -99,29 +99,29 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.Get"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.Get"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -139,29 +139,29 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.Get"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.Get"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -179,15 +179,15 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Operation Id - /// FrontendsInterface_Delete + /// Frontend_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -195,12 +195,12 @@ public virtual Response Get(CancellationToken cancellationToke /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.Delete"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.Delete"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ServiceNetworkingArmOperation(_frontendFrontendsInterfaceClientDiagnostics, Pipeline, _frontendFrontendsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ServiceNetworkingArmOperation(_trafficControllerFrontendFrontendsInterfaceClientDiagnostics, Pipeline, _trafficControllerFrontendFrontendsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -221,15 +221,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// FrontendsInterface_Delete + /// Frontend_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -237,12 +237,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.Delete"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.Delete"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ServiceNetworkingArmOperation(_frontendFrontendsInterfaceClientDiagnostics, Pipeline, _frontendFrontendsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ServiceNetworkingArmOperation(_trafficControllerFrontendFrontendsInterfaceClientDiagnostics, Pipeline, _trafficControllerFrontendFrontendsInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -263,31 +263,31 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// FrontendsInterface_Update + /// Frontend_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(FrontendPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(TrafficControllerFrontendPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.Update"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.Update"); scope.Start(); try { - var response = await _frontendFrontendsInterfaceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + var response = await _trafficControllerFrontendFrontendsInterfaceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -305,31 +305,31 @@ public virtual async Task> UpdateAsync(FrontendPatch /// /// /// Operation Id - /// FrontendsInterface_Update + /// Frontend_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual Response Update(FrontendPatch patch, CancellationToken cancellationToken = default) + public virtual Response Update(TrafficControllerFrontendPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.Update"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.Update"); scope.Start(); try { - var response = _frontendFrontendsInterfaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new FrontendResource(Client, response.Value), response.GetRawResponse()); + var response = _trafficControllerFrontendFrontendsInterfaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new TrafficControllerFrontendResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -347,15 +347,15 @@ public virtual Response Update(FrontendPatch patch, Cancellati /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -363,12 +363,12 @@ public virtual Response Update(FrontendPatch patch, Cancellati /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.AddTag"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.AddTag"); scope.Start(); try { @@ -377,13 +377,13 @@ public virtual async Task> AddTagAsync(string key, st var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _frontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _trafficControllerFrontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerFrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FrontendPatch(); + var patch = new TrafficControllerFrontendPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -409,15 +409,15 @@ public virtual async Task> AddTagAsync(string key, st /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -425,12 +425,12 @@ public virtual async Task> AddTagAsync(string key, st /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.AddTag"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.AddTag"); scope.Start(); try { @@ -439,13 +439,13 @@ public virtual Response AddTag(string key, string value, Cance var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new FrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new TrafficControllerFrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FrontendPatch(); + var patch = new TrafficControllerFrontendPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -471,26 +471,26 @@ public virtual Response AddTag(string key, string value, Cance /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.SetTags"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.SetTags"); scope.Start(); try { @@ -500,13 +500,13 @@ public virtual async Task> SetTagsAsync(IDictionary> SetTagsAsync(IDictionary /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.SetTags"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.SetTags"); scope.Start(); try { @@ -557,13 +557,13 @@ public virtual Response SetTags(IDictionary ta var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new FrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new TrafficControllerFrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FrontendPatch(); + var patch = new TrafficControllerFrontendPatch(); patch.Tags.ReplaceWith(tags); var result = Update(patch, cancellationToken: cancellationToken); return result; @@ -585,26 +585,26 @@ public virtual Response SetTags(IDictionary ta /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.RemoveTag"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.RemoveTag"); scope.Start(); try { @@ -613,13 +613,13 @@ public virtual async Task> RemoveTagAsync(string key, var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _frontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _trafficControllerFrontendFrontendsInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new TrafficControllerFrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FrontendPatch(); + var patch = new TrafficControllerFrontendPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -645,26 +645,26 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _frontendFrontendsInterfaceClientDiagnostics.CreateScope("FrontendResource.RemoveTag"); + using var scope = _trafficControllerFrontendFrontendsInterfaceClientDiagnostics.CreateScope("TrafficControllerFrontendResource.RemoveTag"); scope.Start(); try { @@ -673,13 +673,13 @@ public virtual Response RemoveTag(string key, CancellationToke var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _frontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new FrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _trafficControllerFrontendFrontendsInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new TrafficControllerFrontendResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FrontendPatch(); + var patch = new TrafficControllerFrontendPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.cs index 3a705cc693b8..ab5351efba6d 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.cs @@ -90,11 +90,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of AssociationResources in the TrafficController. - /// An object representing collection of AssociationResources and their operations over a AssociationResource. - public virtual AssociationCollection GetAssociations() + /// Gets a collection of TrafficControllerAssociationResources in the TrafficController. + /// An object representing collection of TrafficControllerAssociationResources and their operations over a TrafficControllerAssociationResource. + public virtual TrafficControllerAssociationCollection GetTrafficControllerAssociations() { - return GetCachedClient(client => new AssociationCollection(client, Id)); + return GetCachedClient(client => new TrafficControllerAssociationCollection(client, Id)); } /// @@ -106,15 +106,15 @@ public virtual AssociationCollection GetAssociations() /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -123,9 +123,9 @@ public virtual AssociationCollection GetAssociations() /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetAssociationAsync(string associationName, CancellationToken cancellationToken = default) + public virtual async Task> GetTrafficControllerAssociationAsync(string associationName, CancellationToken cancellationToken = default) { - return await GetAssociations().GetAsync(associationName, cancellationToken).ConfigureAwait(false); + return await GetTrafficControllerAssociations().GetAsync(associationName, cancellationToken).ConfigureAwait(false); } /// @@ -137,15 +137,15 @@ public virtual async Task> GetAssociationAsync(str /// /// /// Operation Id - /// AssociationsInterface_Get + /// Association_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -154,16 +154,16 @@ public virtual async Task> GetAssociationAsync(str /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetAssociation(string associationName, CancellationToken cancellationToken = default) + public virtual Response GetTrafficControllerAssociation(string associationName, CancellationToken cancellationToken = default) { - return GetAssociations().Get(associationName, cancellationToken); + return GetTrafficControllerAssociations().Get(associationName, cancellationToken); } - /// Gets a collection of FrontendResources in the TrafficController. - /// An object representing collection of FrontendResources and their operations over a FrontendResource. - public virtual FrontendCollection GetFrontends() + /// Gets a collection of TrafficControllerFrontendResources in the TrafficController. + /// An object representing collection of TrafficControllerFrontendResources and their operations over a TrafficControllerFrontendResource. + public virtual TrafficControllerFrontendCollection GetTrafficControllerFrontends() { - return GetCachedClient(client => new FrontendCollection(client, Id)); + return GetCachedClient(client => new TrafficControllerFrontendCollection(client, Id)); } /// @@ -175,15 +175,15 @@ public virtual FrontendCollection GetFrontends() /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -192,9 +192,9 @@ public virtual FrontendCollection GetFrontends() /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetFrontendAsync(string frontendName, CancellationToken cancellationToken = default) + public virtual async Task> GetTrafficControllerFrontendAsync(string frontendName, CancellationToken cancellationToken = default) { - return await GetFrontends().GetAsync(frontendName, cancellationToken).ConfigureAwait(false); + return await GetTrafficControllerFrontends().GetAsync(frontendName, cancellationToken).ConfigureAwait(false); } /// @@ -206,15 +206,15 @@ public virtual async Task> GetFrontendAsync(string fr /// /// /// Operation Id - /// FrontendsInterface_Get + /// Frontend_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// @@ -223,9 +223,9 @@ public virtual async Task> GetFrontendAsync(string fr /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetFrontend(string frontendName, CancellationToken cancellationToken = default) + public virtual Response GetTrafficControllerFrontend(string frontendName, CancellationToken cancellationToken = default) { - return GetFrontends().Get(frontendName, cancellationToken); + return GetTrafficControllerFrontends().Get(frontendName, cancellationToken); } /// Gets a collection of ApplicationGatewayForContainersSecurityPolicyResources in the TrafficController. @@ -244,11 +244,11 @@ public virtual ApplicationGatewayForContainersSecurityPolicyCollection GetApplic /// /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -275,11 +275,11 @@ public virtual async Task /// /// Operation Id - /// SecurityPoliciesInterface_Get + /// SecurityPolicy_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -306,11 +306,11 @@ public virtual Response G /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -346,11 +346,11 @@ public virtual async Task> GetAsync(Cancella /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -386,11 +386,11 @@ public virtual Response Get(CancellationToken cancell /// /// /// Operation Id - /// TrafficControllerInterface_Delete + /// TrafficController_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -428,11 +428,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// TrafficControllerInterface_Delete + /// TrafficController_Delete /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -470,11 +470,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// TrafficControllerInterface_Update + /// TrafficController_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -512,11 +512,11 @@ public virtual async Task> UpdateAsync(Traff /// /// /// Operation Id - /// TrafficControllerInterface_Update + /// TrafficController_Update /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -554,11 +554,11 @@ public virtual Response Update(TrafficControllerPatch /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -616,11 +616,11 @@ public virtual async Task> AddTagAsync(strin /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -678,11 +678,11 @@ public virtual Response AddTag(string key, string val /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -735,11 +735,11 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -792,11 +792,11 @@ public virtual Response SetTags(IDictionary /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource @@ -852,11 +852,11 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Operation Id - /// TrafficControllerInterface_Get + /// TrafficController_Get /// /// /// Default Api Version - /// 2025-01-01 + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/autorest.md b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/autorest.md deleted file mode 100644 index 761e1e9905c8..000000000000 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/autorest.md +++ /dev/null @@ -1,55 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -azure-arm: true -csharp: true -library-name: ServiceNetworking -namespace: Azure.ResourceManager.ServiceNetworking -require: https://github.com/Azure/azure-rest-api-specs/blob/b3d637043bcd1484f0f4c63ca6051407b6a329d1/specification/servicenetworking/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true -rename-mapping: - SecurityPolicy: ApplicationGatewayForContainersSecurityPolicy - - - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - -``` diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml new file mode 100644 index 000000000000..2ae05dfe210c --- /dev/null +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicenetworking/ServiceNetworking.Management +commit: b51e7791a9e70424abbd073c501d161b7d802af1 +repo: Azure/azure-rest-api-specs +additionalDirectories: