-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[AutoPR Azure.ResourceManager.Nginx]-generated-from-SDK Generation - .NET-5433738 #53107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ArthurMa1978
merged 15 commits into
Azure:main
from
azure-sdk:sdkauto/Azure.ResourceManager.Nginx-5433738
Dec 16, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
28e714b
Configurations: 'specification/nginx/Nginx.Management/tspconfig.yaml…
azure-sdk c856007
Merge branch 'main' into mgmt-nginx
ArthurMa1978 1527fe7
update
ArthurMa1978 850ca85
update
ArthurMa1978 1883fd9
update spec commit id
ArthurMa1978 7a946e6
Merge branch 'main' into sdkauto/Azure.ResourceManager.Nginx-5433738
ArthurMa1978 0920584
update
ArthurMa1978 1319e9f
update
ArthurMa1978 70439ac
Merge branch 'main' into sdkauto/Azure.ResourceManager.Nginx-5433738
ArthurMa1978 2a66a36
update
ArthurMa1978 84d483c
update changelog
ArthurMa1978 591d0e2
update
ArthurMa1978 6178cfb
update
ArthurMa1978 f0f1937
update
ArthurMa1978 d376e64
update
ArthurMa1978 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,147 changes: 1,147 additions & 0 deletions
1,147
sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.net10.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
476 changes: 413 additions & 63 deletions
476
sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.net8.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
476 changes: 413 additions & 63 deletions
476
sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.netstandard2.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
sdk/nginx/Azure.ResourceManager.Nginx/src/Custom/ArmNginxModelFactory.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using Azure; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager.Models; | ||
| using Azure.ResourceManager.Nginx; | ||
| using Azure.ResourceManager.Resources.Models; | ||
|
|
||
| namespace Azure.ResourceManager.Nginx.Models | ||
| { | ||
| /// <summary> A factory class for creating instances of the models for mocking. </summary> | ||
| public static partial class ArmNginxModelFactory | ||
| { | ||
| /// <summary> Initializes a new instance of <see cref="Nginx.NginxConfigurationData"/>. </summary> | ||
| /// <param name="id"> The id. </param> | ||
| /// <param name="name"> The name. </param> | ||
| /// <param name="resourceType"> The resourceType. </param> | ||
| /// <param name="systemData"> The systemData. </param> | ||
| /// <param name="properties"></param> | ||
| /// <param name="location"></param> | ||
| /// <returns> A new <see cref="Nginx.NginxConfigurationData"/> instance for mocking. </returns> | ||
| public static NginxConfigurationData NginxConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NginxConfigurationProperties properties, AzureLocation? location) | ||
| => NginxConfigurationData(id, name, resourceType, systemData, properties); | ||
|
|
||
| /// <summary> Initializes a new instance of <see cref="Nginx.NginxDeploymentData"/>. </summary> | ||
| /// <param name="id"> The id. </param> | ||
| /// <param name="name"> The name. </param> | ||
| /// <param name="resourceType"> The resourceType. </param> | ||
| /// <param name="systemData"> The systemData. </param> | ||
| /// <param name="tags"> The tags. </param> | ||
| /// <param name="location"> The location. </param> | ||
| /// <param name="identity"> Gets or sets the identity. </param> | ||
| /// <param name="properties"></param> | ||
| /// <param name="skuName"></param> | ||
| /// <returns> A new <see cref="Nginx.NginxDeploymentData"/> instance for mocking. </returns> | ||
| public static NginxDeploymentData NginxDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, NginxDeploymentProperties properties = default, string skuName = default) | ||
| => NginxDeploymentData(id, name, resourceType, systemData, tags, location, properties, identity, skuName); | ||
|
|
||
| /// <summary> Initializes a new instance of <see cref="Models.NginxCertificateProperties"/>. </summary> | ||
| /// <param name="provisioningState"></param> | ||
| /// <param name="keyVirtualPath"></param> | ||
| /// <param name="certificateVirtualPath"></param> | ||
| /// <param name="keyVaultSecretId"></param> | ||
| /// <returns> A new <see cref="Models.NginxCertificateProperties"/> instance for mocking. </returns> | ||
| public static NginxCertificateProperties NginxCertificateProperties(NginxProvisioningState? provisioningState, string keyVirtualPath, string certificateVirtualPath, string keyVaultSecretId) | ||
| => NginxCertificateProperties(provisioningState, keyVirtualPath, certificateVirtualPath, keyVaultSecretId, null, null, null, null); | ||
|
|
||
| /// <summary> Initializes a new instance of <see cref="Models.NginxDeploymentProperties"/>. </summary> | ||
| /// <param name="provisioningState"></param> | ||
| /// <param name="nginxVersion"></param> | ||
| /// <param name="managedResourceGroup"> The managed resource group to deploy VNet injection related network resources. </param> | ||
| /// <param name="networkProfile"></param> | ||
| /// <param name="ipAddress"> The IP address of the deployment. </param> | ||
| /// <param name="enableDiagnosticsSupport"></param> | ||
| /// <param name="loggingStorageAccount"></param> | ||
| /// <param name="scalingCapacity"></param> | ||
| /// <param name="userPreferredEmail"></param> | ||
| /// <returns> A new <see cref="Models.NginxDeploymentProperties"/> instance for mocking. </returns> | ||
| public static NginxDeploymentProperties NginxDeploymentProperties(NginxProvisioningState? provisioningState, string nginxVersion, string managedResourceGroup, NginxNetworkProfile networkProfile, string ipAddress, bool? enableDiagnosticsSupport, NginxStorageAccount loggingStorageAccount, int? scalingCapacity, string userPreferredEmail = default) | ||
| => NginxDeploymentProperties(provisioningState, nginxVersion, networkProfile, ipAddress, enableDiagnosticsSupport, loggingStorageAccount, null, null, userPreferredEmail, null, null); | ||
| } | ||
| } |
15 changes: 15 additions & 0 deletions
15
sdk/nginx/Azure.ResourceManager.Nginx/src/Custom/Models/NginxConfigurationFile.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| namespace Azure.ResourceManager.Nginx.Models | ||
| { | ||
| /// <summary> Nginx Configuration File. </summary> | ||
| [Microsoft.TypeSpec.Generator.Customizations.CodeGenSerialization(nameof(ContentHash), "contentHash")] | ||
| public partial class NginxConfigurationFile | ||
| { | ||
| /// <summary> Gets or sets the Content. </summary> | ||
| public string ContentHash { get; set; } // The service returns a "contentHash" field that is missing from the spec | ||
| } | ||
| } |
30 changes: 30 additions & 0 deletions
30
sdk/nginx/Azure.ResourceManager.Nginx/src/Custom/Models/NginxDeploymentProperties.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System.ComponentModel; | ||
|
|
||
| namespace Azure.ResourceManager.Nginx.Models | ||
| { | ||
| /// <summary> Nginx Deployment Properties. </summary> | ||
| public partial class NginxDeploymentProperties | ||
| { | ||
| /// <summary> The managed resource group to deploy VNet injection related network resources. </summary> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public string ManagedResourceGroup { get; set; } // This was a spec breaking change, so we’re adding the property back to restore backward compatibility. | ||
|
|
||
| /// <summary> Gets or sets the scaling capacity. </summary> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public int? ScalingCapacity | ||
| { | ||
| get => ScalingProperties is null ? default : ScalingProperties.Capacity; | ||
| set | ||
| { | ||
| if (ScalingProperties is null) | ||
| ScalingProperties = new NginxDeploymentScalingProperties(); | ||
| ScalingProperties.Capacity = value; | ||
| } | ||
| } | ||
| } | ||
| } | ||
47 changes: 47 additions & 0 deletions
47
sdk/nginx/Azure.ResourceManager.Nginx/src/Custom/Models/NginxFrontendIPConfiguration.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System.Collections.Generic; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Text.Json; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager.Resources.Models; | ||
|
|
||
| namespace Azure.ResourceManager.Nginx.Models | ||
| { | ||
| /// <summary> Nginx Frontend IP Configuration. </summary> | ||
| [Microsoft.TypeSpec.Generator.Customizations.CodeGenSerialization(nameof(PublicIPAddresses), DeserializationValueHook = nameof(DeserializePublicIPAddresses))] // CodeGen issue, should be removed when fixed | ||
| public partial class NginxFrontendIPConfiguration | ||
| { | ||
| internal static WritableSubResource DeserializeWritableSubResource(JsonElement element) | ||
| { | ||
| ResourceIdentifier id = null; | ||
| foreach (JsonProperty item in element.EnumerateObject()) | ||
| { | ||
| if (item.NameEquals("id") && item.Value.ValueKind != JsonValueKind.Null) | ||
| { | ||
| id = new ResourceIdentifier(item.Value.GetString()); | ||
| } | ||
| } | ||
|
|
||
| return new WritableSubResource() { Id = id }; | ||
| } | ||
|
ArcturusZhang marked this conversation as resolved.
|
||
|
|
||
| [MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
| internal static void DeserializePublicIPAddresses(JsonProperty property, ref IList<WritableSubResource> publicIPAddresses) | ||
| { | ||
| if (property.Value.ValueKind == JsonValueKind.Null) | ||
| { | ||
| return; | ||
| } | ||
| List<WritableSubResource> array = new List<WritableSubResource>(); | ||
| foreach (var item in property.Value.EnumerateArray()) | ||
| { | ||
| array.Add(DeserializeWritableSubResource(item)); | ||
| } | ||
| publicIPAddresses = array; | ||
| } | ||
| } | ||
| } | ||
78 changes: 78 additions & 0 deletions
78
sdk/nginx/Azure.ResourceManager.Nginx/src/Custom/NginxConfigurationCollection.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Azure.ResourceManager.Nginx.Models; | ||
|
|
||
| namespace Azure.ResourceManager.Nginx | ||
| { | ||
| /// <summary> | ||
| /// A class representing a collection of <see cref="NginxConfigurationResource"/> and their operations. | ||
| /// Each <see cref="NginxConfigurationResource"/> in the collection will belong to the same instance of <see cref="NginxDeploymentResource"/>. | ||
| /// To get a <see cref="NginxConfigurationCollection"/> instance call the GetNginxConfigurations method from an instance of <see cref="NginxDeploymentResource"/>. | ||
| /// </summary> | ||
| public partial class NginxConfigurationCollection : ArmCollection, IEnumerable<NginxConfigurationResource>, IAsyncEnumerable<NginxConfigurationResource> | ||
| { | ||
| /// <summary> | ||
| /// Create or update the NGINX configuration for given NGINX deployment | ||
| /// <list type="bullet"> | ||
| /// <item> | ||
| /// <term>Request Path</term> | ||
| /// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}</description> | ||
| /// </item> | ||
| /// <item> | ||
| /// <term>Operation Id</term> | ||
| /// <description>Configurations_CreateOrUpdate</description> | ||
| /// </item> | ||
| /// </list> | ||
| /// </summary> | ||
| /// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param> | ||
| /// <param name="configurationName"> The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. </param> | ||
| /// <param name="data"> The NGINX configuration. </param> | ||
| /// <param name="cancellationToken"> The cancellation token to use. </param> | ||
| /// <exception cref="ArgumentException"> <paramref name="configurationName"/> is an empty string, and was expected to be non-empty. </exception> | ||
| /// <exception cref="ArgumentNullException"> <paramref name="configurationName"/> or <paramref name="data"/> is null. </exception> | ||
| public virtual async Task<ArmOperation<NginxConfigurationResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string configurationName, NginxConfigurationData data, CancellationToken cancellationToken = default) | ||
| => await CreateOrUpdateAsync(waitUntil, configurationName, | ||
| new NginxConfigurationCreateOrUpdateContent(data.Id, data.Name, data.ResourceType, | ||
| new NginxConfigurationCreateOrUpdateProperties(data.Properties.ProvisioningState, data.Properties.Files, | ||
| data.Properties.ProtectedFiles?.Select(file => new NginxConfigurationContentProtectedFile(null, file.VirtualPath, file.ContentHash, null)).ToList(), | ||
| data.Properties.Package, data.Properties.RootFile, null), | ||
| data.SystemData, null), | ||
| cancellationToken).ConfigureAwait(false); | ||
|
|
||
| /// <summary> | ||
| /// Create or update the NGINX configuration for given NGINX deployment | ||
| /// <list type="bullet"> | ||
| /// <item> | ||
| /// <term>Request Path</term> | ||
| /// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}</description> | ||
| /// </item> | ||
| /// <item> | ||
| /// <term>Operation Id</term> | ||
| /// <description>Configurations_CreateOrUpdate</description> | ||
| /// </item> | ||
| /// </list> | ||
| /// </summary> | ||
| /// <param name="waitUntil"> <see cref="WaitUntil.Completed"/> if the method should wait to return until the long-running operation has completed on the service; <see cref="WaitUntil.Started"/> if it should return after starting the operation. For more information on long-running operations, please see <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/LongRunningOperations.md"> Azure.Core Long-Running Operation samples</see>. </param> | ||
| /// <param name="configurationName"> The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. </param> | ||
| /// <param name="data"> The NGINX configuration. </param> | ||
| /// <param name="cancellationToken"> The cancellation token to use. </param> | ||
| /// <exception cref="ArgumentException"> <paramref name="configurationName"/> is an empty string, and was expected to be non-empty. </exception> | ||
| /// <exception cref="ArgumentNullException"> <paramref name="configurationName"/> or <paramref name="data"/> is null. </exception> | ||
| public virtual ArmOperation<NginxConfigurationResource> CreateOrUpdate(WaitUntil waitUntil, string configurationName, NginxConfigurationData data, CancellationToken cancellationToken = default) | ||
| => CreateOrUpdate(waitUntil, configurationName, | ||
| new NginxConfigurationCreateOrUpdateContent(data.Id, data.Name, data.ResourceType, | ||
| new NginxConfigurationCreateOrUpdateProperties(data.Properties.ProvisioningState, data.Properties.Files, | ||
| data.Properties.ProtectedFiles?.Select(file => new NginxConfigurationContentProtectedFile(null, file.VirtualPath, file.ContentHash, null)).ToList(), | ||
| data.Properties.Package, data.Properties.RootFile, null), | ||
| data.SystemData, null), | ||
| cancellationToken); | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
sdk/nginx/Azure.ResourceManager.Nginx/src/Custom/NginxConfigurationData.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System.ComponentModel; | ||
| using Azure.Core; | ||
| using Azure.ResourceManager.Models; | ||
|
|
||
| namespace Azure.ResourceManager.Nginx | ||
| { | ||
| /// <summary> A class representing the NginxConfiguration data model. </summary> | ||
| public partial class NginxConfigurationData : ResourceData | ||
| { | ||
| /// <summary> Gets or sets the location. </summary> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public AzureLocation? Location { get; set; } // This was a spec breaking change, so we’re adding the property back to restore backward compatibility. | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.