From c8eb7509ab4ac244e90596514b554975b330722f Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Tue, 4 Feb 2025 18:37:56 +0300 Subject: [PATCH 1/3] Update Nginx SDK to package-2024-11-01-preview --- .github/CODEOWNERS | 4 +- .../Azure.ResourceManager.Nginx/CHANGELOG.md | 10 +- .../api/Azure.ResourceManager.Nginx.net8.0.cs | 225 +++++++- ...re.ResourceManager.Nginx.netstandard2.0.cs | 225 +++++++- .../Sample_NginxCertificateCollection.cs | 10 +- .../Sample_NginxCertificateResource.cs | 6 +- .../Sample_NginxConfigurationCollection.cs | 15 +- .../Sample_NginxConfigurationResource.cs | 12 +- .../Sample_NginxDeploymentApiKeyCollection.cs | 197 +++++++ .../Sample_NginxDeploymentApiKeyResource.cs | 110 ++++ .../Sample_NginxDeploymentCollection.cs | 16 +- .../Samples/Sample_NginxDeploymentResource.cs | 40 +- .../Sample_SubscriptionResourceExtensions.cs | 2 +- .../src/Generated/ArmNginxModelFactory.cs | 151 ++++- .../Extensions/MockableNginxArmClient.cs | 12 + .../MockableNginxResourceGroupResource.cs | 4 +- .../MockableNginxSubscriptionResource.cs | 4 +- .../Generated/Extensions/NginxExtensions.cs | 27 +- .../Models/DiagnosticItem.Serialization.cs | 206 +++++++ .../src/Generated/Models/DiagnosticItem.cs | 123 ++++ .../src/Generated/Models/Level.cs | 51 ++ .../NginxAnalysisConfig.Serialization.cs | 8 +- .../Generated/Models/NginxAnalysisConfig.cs | 6 +- .../NginxAnalysisResult.Serialization.cs | 4 +- .../Generated/Models/NginxAnalysisResult.cs | 9 +- ...inxAnalysisResultDetails.Serialization.cs} | 63 ++- ...tData.cs => NginxAnalysisResultDetails.cs} | 17 +- ...tionCreateOrUpdateContent.Serialization.cs | 154 ++++++ ...NginxConfigurationCreateOrUpdateContent.cs | 71 +++ ...nxConfigurationProperties.Serialization.cs | 8 +- .../Models/NginxConfigurationProperties.cs | 6 +- ...ationProtectedFileContent.Serialization.cs | 151 +++++ .../NginxConfigurationProtectedFileContent.cs | 73 +++ ...rationProtectedFileResult.Serialization.cs | 140 +++++ .../NginxConfigurationProtectedFileResult.cs | 69 +++ ...urationResponseProperties.Serialization.cs | 215 +++++++ .../NginxConfigurationResponseProperties.cs | 83 +++ ...iKeyCreateOrUpdateContent.Serialization.cs | 154 ++++++ ...nxDeploymentApiKeyCreateOrUpdateContent.cs | 71 +++ ...loymentApiKeyListResponse.Serialization.cs | 154 ++++++ .../NginxDeploymentApiKeyListResponse.cs | 70 +++ ...ntApiKeyRequestProperties.Serialization.cs | 144 +++++ .../NginxDeploymentApiKeyRequestProperties.cs | 69 +++ ...tApiKeyResponseProperties.Serialization.cs | 144 +++++ ...NginxDeploymentApiKeyResponseProperties.cs | 69 +++ ...NginxDeploymentProperties.Serialization.cs | 24 +- .../Models/NginxDeploymentProperties.cs | 10 +- ...eploymentUpdateProperties.Serialization.cs | 16 + .../Models/NginxDeploymentUpdateProperties.cs | 6 +- .../Generated/NginxCertificateCollection.cs | 20 +- .../src/Generated/NginxCertificateResource.cs | 12 +- .../Generated/NginxConfigurationCollection.cs | 45 +- .../NginxConfigurationData.Serialization.cs | 20 +- .../src/Generated/NginxConfigurationData.cs | 12 +- .../Generated/NginxConfigurationResource.cs | 40 +- .../NginxDeploymentApiKeyCollection.cs | 498 +++++++++++++++++ ...NginxDeploymentApiKeyData.Serialization.cs | 155 ++++++ .../Generated/NginxDeploymentApiKeyData.cs | 72 +++ ...xDeploymentApiKeyResource.Serialization.cs | 26 + .../NginxDeploymentApiKeyResource.cs | 356 ++++++++++++ .../Generated/NginxDeploymentCollection.cs | 20 +- .../src/Generated/NginxDeploymentResource.cs | 101 +++- .../RestOperations/ApiKeysRestOperations.cs | 523 ++++++++++++++++++ .../CertificatesRestOperations.cs | 22 +- .../ConfigurationsRestOperations.cs | 56 +- .../DeploymentsRestOperations.cs | 34 +- .../src/autorest.md | 10 +- .../tests/Helpers/ResourceDataHelper.cs | 4 +- .../tests/NginxManagementTestBase.cs | 46 +- .../Scenario/NginxCertificateResourceTests.cs | 9 + .../NginxConfigurationCollectionTests.cs | 37 +- .../NginxConfigurationResourceTests.cs | 65 ++- .../NginxDeploymentApiKeyCollectionTests.cs | 138 +++++ .../NginxDeploymentApiKeyResourceTests.cs | 129 +++++ .../Scenario/NginxDeploymentResourceTests.cs | 58 +- 75 files changed, 5618 insertions(+), 348 deletions(-) create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyCollection.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyResource.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/Level.cs rename sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/{AnalysisResultData.Serialization.cs => NginxAnalysisResultDetails.Serialization.cs} (56%) rename sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/{AnalysisResultData.cs => NginxAnalysisResultDetails.cs} (71%) create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyCollection.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ApiKeysRestOperations.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyCollectionTests.cs create mode 100644 sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyResourceTests.cs diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7f48bff0c5a71..66fada11a6c13 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1052,10 +1052,10 @@ # ServiceOwners: @vipray-ms # PRLabel: %Nginx -/sdk/nginx/Azure.ResourceManager.*/ @jamesfan1 @bangbingsyb @spencerofwiti +/sdk/nginx/Azure.ResourceManager.*/ @jamesfan1 @bangbingsyb @spencerofwiti @amwaleh @briantkim93 @george-ngugi # ServiceLabel: %Nginx %Mgmt -# ServiceOwners: @jamesfan1 @bangbingsyb @spencerofwiti +# ServiceOwners: @jamesfan1 @bangbingsyb @spencerofwiti @amwaleh @briantkim93 @george-ngugi # PRLabel: %Operator Nexus - Network Cloud /sdk/networkcloud/Azure.ResourceManager.*/ @Azure/azure-sdk-write-networkcloud diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md b/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md index 9e6468ee3a51c..d972b811f22d9 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md +++ b/sdk/nginx/Azure.ResourceManager.Nginx/CHANGELOG.md @@ -1,15 +1,21 @@ # Release History -## 1.1.0-beta.3 (Unreleased) +## 1.1.0-beta.3 (2025-02-07) ### Features Added +- Upgraded api-version tag from `package-2024-06-01-preview` to `package-2024-11-01-preview`. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/7a3f210cf6924c6139e2493f5fd0625919af1f32/specification/nginx/resource-manager/readme.md +- Added Nginx Deployment API Key support. + ### Breaking Changes -### Bugs Fixed +- Rename `AnalysisResultData` to `NginxAnalysisResultDetails`. +- Removed location support from `NginxConfigurationData`. ### Other Changes +- Update AutoRest C# version to 3.0.0-beta.20241125.1 + ## 1.1.0-beta.2 (2024-10-30) ### Features Added diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.net8.0.cs b/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.net8.0.cs index e885924d61c86..a13568a771fc0 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.net8.0.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.net8.0.cs @@ -51,8 +51,8 @@ protected NginxCertificateResource() { } public partial class NginxConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NginxConfigurationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -67,9 +67,8 @@ protected NginxConfigurationCollection() { } } public partial class NginxConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public NginxConfigurationData() { } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties Properties { get { throw null; } set { } } + internal NginxConfigurationData() { } + public Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Nginx.NginxConfigurationData 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) { } @@ -95,8 +94,55 @@ protected NginxConfigurationResource() { } Azure.ResourceManager.Nginx.NginxConfigurationData 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NginxDeploymentApiKeyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NginxDeploymentApiKeyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string apiKeyName, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string apiKeyName, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string apiKeyName, 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 apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string apiKeyName, 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 NginxDeploymentApiKeyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxDeploymentApiKeyData() { } + public Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData 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.Nginx.NginxDeploymentApiKeyData 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 NginxDeploymentApiKeyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NginxDeploymentApiKeyResource() { } + public virtual Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) { 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; } + Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData 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.Nginx.NginxDeploymentApiKeyData 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class NginxDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -147,6 +193,9 @@ protected NginxDeploymentResource() { } public virtual Azure.Response GetNginxConfiguration(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNginxConfigurationAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Nginx.NginxConfigurationCollection GetNginxConfigurations() { throw null; } + public virtual Azure.Response GetNginxDeploymentApiKey(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNginxDeploymentApiKeyAsync(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Nginx.NginxDeploymentApiKeyCollection GetNginxDeploymentApiKeys() { 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; } @@ -164,6 +213,7 @@ public static partial class NginxExtensions public static Azure.ResourceManager.Nginx.NginxCertificateResource GetNginxCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Nginx.NginxConfigurationResource GetNginxConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNginxDeployment(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource GetNginxDeploymentApiKeyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static System.Threading.Tasks.Task> GetNginxDeploymentAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Nginx.NginxDeploymentResource GetNginxDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Nginx.NginxDeploymentCollection GetNginxDeployments(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } @@ -178,6 +228,7 @@ public partial class MockableNginxArmClient : Azure.ResourceManager.ArmResource protected MockableNginxArmClient() { } public virtual Azure.ResourceManager.Nginx.NginxCertificateResource GetNginxCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Nginx.NginxConfigurationResource GetNginxConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource GetNginxDeploymentApiKeyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Nginx.NginxDeploymentResource GetNginxDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNginxResourceGroupResource : Azure.ResourceManager.ArmResource @@ -198,25 +249,70 @@ namespace Azure.ResourceManager.Nginx.Models { public static partial class ArmNginxModelFactory { + public static Azure.ResourceManager.Nginx.Models.DiagnosticItem DiagnosticItem(string id = null, string directive = null, string description = null, string file = null, float line = 0f, string message = null, string rule = null, Azure.ResourceManager.Nginx.Models.Level level = default(Azure.ResourceManager.Nginx.Models.Level), string category = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.NginxAnalysisDiagnostic NginxAnalysisDiagnostic(string id = null, string directive = null, string description = null, string file = null, float line = 0f, string message = null, string rule = null) { throw null; } - public static Azure.ResourceManager.Nginx.Models.NginxAnalysisResult NginxAnalysisResult(string status = null, System.Collections.Generic.IEnumerable dataErrors = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxAnalysisResult NginxAnalysisResult(string status = null, Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails data = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails NginxAnalysisResultDetails(System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable diagnostics = null) { throw null; } public static Azure.ResourceManager.Nginx.NginxCertificateData NginxCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxCertificateProperties properties = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.Nginx.Models.NginxCertificateProperties NginxCertificateProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), string keyVirtualPath = null, string certificateVirtualPath = null, string keyVaultSecretId = null, string sha1Thumbprint = null, string keyVaultSecretVersion = null, System.DateTimeOffset? keyVaultSecretCreated = default(System.DateTimeOffset?), Azure.ResourceManager.Nginx.Models.NginxCertificateError certificateError = null) { throw null; } - public static Azure.ResourceManager.Nginx.NginxConfigurationData NginxConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties properties = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } - public static Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties NginxConfigurationProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable protectedFiles = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage package = null, string rootFile = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent NginxConfigurationCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.NginxConfigurationData NginxConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties NginxConfigurationProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable protectedFiles = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage package = null, string rootFile = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationProtectedFileResult NginxConfigurationProtectedFileResult(string virtualPath = null, string contentHash = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties NginxConfigurationResponseProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable protectedFiles = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage package = null, string rootFile = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent NginxDeploymentApiKeyCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyRequestProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData NginxDeploymentApiKeyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties NginxDeploymentApiKeyResponseProperties(string hint = null, System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Nginx.NginxDeploymentData NginxDeploymentData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentProperties properties = null, string skuName = null) { throw null; } - public static Azure.ResourceManager.Nginx.Models.NginxDeploymentProperties NginxDeploymentProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), string nginxVersion = null, string managedResourceGroup = null, Azure.ResourceManager.Nginx.Models.NginxNetworkProfile networkProfile = null, string ipAddress = null, bool? enableDiagnosticsSupport = default(bool?), Azure.ResourceManager.Nginx.Models.NginxStorageAccount loggingStorageAccount = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentScalingProperties scalingProperties = null, string upgradeChannel = null, string userPreferredEmail = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxDeploymentProperties NginxDeploymentProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), string nginxVersion = null, Azure.ResourceManager.Nginx.Models.NginxNetworkProfile networkProfile = null, string ipAddress = null, bool? enableDiagnosticsSupport = default(bool?), Azure.ResourceManager.Nginx.Models.NginxStorageAccount loggingStorageAccount = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentScalingProperties scalingProperties = null, string upgradeChannel = null, string userPreferredEmail = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = null, string dataplaneApiEndpoint = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect NginxDeploymentPropertiesNginxAppProtect(Azure.ResourceManager.Nginx.Models.WebApplicationFirewallActivationState? webApplicationFirewallActivationState = default(Azure.ResourceManager.Nginx.Models.WebApplicationFirewallActivationState?), Azure.ResourceManager.Nginx.Models.WebApplicationFirewallStatus webApplicationFirewallStatus = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.WebApplicationFirewallComponentVersions WebApplicationFirewallComponentVersions(string wafEngineVersion = null, string wafNginxVersion = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage WebApplicationFirewallPackage(string version = null, System.DateTimeOffset revisionDatetime = default(System.DateTimeOffset)) { throw null; } public static Azure.ResourceManager.Nginx.Models.WebApplicationFirewallStatus WebApplicationFirewallStatus(Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage attackSignaturesPackage = null, Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage botSignaturesPackage = null, Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage threatCampaignsPackage = null, Azure.ResourceManager.Nginx.Models.WebApplicationFirewallComponentVersions componentVersions = null) { throw null; } } + public partial class DiagnosticItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DiagnosticItem() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Directive { get { throw null; } } + public string File { get { throw null; } } + public string Id { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.Level Level { get { throw null; } } + public float Line { get { throw null; } } + public string Message { get { throw null; } } + public string Rule { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.DiagnosticItem 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.Nginx.Models.DiagnosticItem 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 Level : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Level(string value) { throw null; } + public static Azure.ResourceManager.Nginx.Models.Level Info { get { throw null; } } + public static Azure.ResourceManager.Nginx.Models.Level Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.Nginx.Models.Level 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.Nginx.Models.Level left, Azure.ResourceManager.Nginx.Models.Level right) { throw null; } + public static implicit operator Azure.ResourceManager.Nginx.Models.Level (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Nginx.Models.Level left, Azure.ResourceManager.Nginx.Models.Level right) { throw null; } + public override string ToString() { throw null; } + } public partial class NginxAnalysisConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxAnalysisConfig() { } public System.Collections.Generic.IList Files { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage Package { get { throw null; } set { } } - public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } + public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } public string RootFile { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Nginx.Models.NginxAnalysisConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -256,7 +352,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NginxAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NginxAnalysisResult() { } - public System.Collections.Generic.IReadOnlyList DataErrors { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails Data { get { throw null; } } public string Status { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Nginx.Models.NginxAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -265,6 +361,18 @@ 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 partial class NginxAnalysisResultDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxAnalysisResultDetails() { } + public System.Collections.Generic.IReadOnlyList Diagnostics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails 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.Nginx.Models.NginxAnalysisResultDetails 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 NginxCertificateError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxCertificateError() { } @@ -295,6 +403,17 @@ 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 partial class NginxConfigurationCreateOrUpdateContent : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxConfigurationCreateOrUpdateContent() { } + public Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent 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.Nginx.Models.NginxConfigurationCreateOrUpdateContent 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 NginxConfigurationFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxConfigurationFile() { } @@ -324,7 +443,7 @@ public partial class NginxConfigurationProperties : System.ClientModel.Primitive public NginxConfigurationProperties() { } public System.Collections.Generic.IList Files { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage Package { get { throw null; } set { } } - public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } + public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxProvisioningState? ProvisioningState { get { throw null; } } public string RootFile { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -334,6 +453,81 @@ 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 partial class NginxConfigurationProtectedFileContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxConfigurationProtectedFileContent() { } + public string Content { get { throw null; } set { } } + public string ContentHash { get { throw null; } set { } } + public string VirtualPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationProtectedFileContent 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.Nginx.Models.NginxConfigurationProtectedFileContent 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 NginxConfigurationProtectedFileResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxConfigurationProtectedFileResult() { } + public string ContentHash { get { throw null; } } + public string VirtualPath { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationProtectedFileResult 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.Nginx.Models.NginxConfigurationProtectedFileResult 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 NginxConfigurationResponseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxConfigurationResponseProperties() { } + public System.Collections.Generic.IReadOnlyList Files { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage Package { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedFiles { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.NginxProvisioningState? ProvisioningState { get { throw null; } } + public string RootFile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties 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.Nginx.Models.NginxConfigurationResponseProperties 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 NginxDeploymentApiKeyCreateOrUpdateContent : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxDeploymentApiKeyCreateOrUpdateContent() { } + public Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyRequestProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent 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.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent 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 NginxDeploymentApiKeyRequestProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxDeploymentApiKeyRequestProperties() { } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public string SecretText { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyRequestProperties 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.Nginx.Models.NginxDeploymentApiKeyRequestProperties 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 NginxDeploymentApiKeyResponseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxDeploymentApiKeyResponseProperties() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Hint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties 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.Nginx.Models.NginxDeploymentApiKeyResponseProperties 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 NginxDeploymentPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxDeploymentPatch() { } @@ -352,10 +546,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NginxDeploymentProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxDeploymentProperties() { } + public string DataplaneApiEndpoint { get { throw null; } } public bool? EnableDiagnosticsSupport { get { throw null; } set { } } public string IPAddress { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxStorageAccount LoggingStorageAccount { get { throw null; } set { } } - public string ManagedResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect NginxAppProtect { get { throw null; } set { } } public string NginxVersion { get { throw null; } } @@ -399,6 +593,7 @@ public partial class NginxDeploymentUpdateProperties : System.ClientModel.Primit public NginxDeploymentUpdateProperties() { } public bool? EnableDiagnosticsSupport { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxStorageAccount LoggingStorageAccount { get { throw null; } set { } } + public Azure.ResourceManager.Nginx.Models.NginxNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxDeploymentScalingProperties ScalingProperties { get { throw null; } set { } } public string UpgradeChannel { get { throw null; } set { } } public string UserPreferredEmail { get { throw null; } set { } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.netstandard2.0.cs b/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.netstandard2.0.cs index e885924d61c86..a13568a771fc0 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.netstandard2.0.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/api/Azure.ResourceManager.Nginx.netstandard2.0.cs @@ -51,8 +51,8 @@ protected NginxCertificateResource() { } public partial class NginxConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NginxConfigurationCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -67,9 +67,8 @@ protected NginxConfigurationCollection() { } } public partial class NginxConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public NginxConfigurationData() { } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties Properties { get { throw null; } set { } } + internal NginxConfigurationData() { } + public Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Nginx.NginxConfigurationData 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) { } @@ -95,8 +94,55 @@ protected NginxConfigurationResource() { } Azure.ResourceManager.Nginx.NginxConfigurationData 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.NginxConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NginxDeploymentApiKeyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NginxDeploymentApiKeyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string apiKeyName, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string apiKeyName, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string apiKeyName, 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 apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string apiKeyName, 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 NginxDeploymentApiKeyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxDeploymentApiKeyData() { } + public Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData 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.Nginx.NginxDeploymentApiKeyData 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 NginxDeploymentApiKeyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NginxDeploymentApiKeyResource() { } + public virtual Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) { 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; } + Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData 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.Nginx.NginxDeploymentApiKeyData 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class NginxDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -147,6 +193,9 @@ protected NginxDeploymentResource() { } public virtual Azure.Response GetNginxConfiguration(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNginxConfigurationAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Nginx.NginxConfigurationCollection GetNginxConfigurations() { throw null; } + public virtual Azure.Response GetNginxDeploymentApiKey(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNginxDeploymentApiKeyAsync(string apiKeyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Nginx.NginxDeploymentApiKeyCollection GetNginxDeploymentApiKeys() { 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; } @@ -164,6 +213,7 @@ public static partial class NginxExtensions public static Azure.ResourceManager.Nginx.NginxCertificateResource GetNginxCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Nginx.NginxConfigurationResource GetNginxConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNginxDeployment(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource GetNginxDeploymentApiKeyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static System.Threading.Tasks.Task> GetNginxDeploymentAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Nginx.NginxDeploymentResource GetNginxDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Nginx.NginxDeploymentCollection GetNginxDeployments(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } @@ -178,6 +228,7 @@ public partial class MockableNginxArmClient : Azure.ResourceManager.ArmResource protected MockableNginxArmClient() { } public virtual Azure.ResourceManager.Nginx.NginxCertificateResource GetNginxCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Nginx.NginxConfigurationResource GetNginxConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Nginx.NginxDeploymentApiKeyResource GetNginxDeploymentApiKeyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Nginx.NginxDeploymentResource GetNginxDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNginxResourceGroupResource : Azure.ResourceManager.ArmResource @@ -198,25 +249,70 @@ namespace Azure.ResourceManager.Nginx.Models { public static partial class ArmNginxModelFactory { + public static Azure.ResourceManager.Nginx.Models.DiagnosticItem DiagnosticItem(string id = null, string directive = null, string description = null, string file = null, float line = 0f, string message = null, string rule = null, Azure.ResourceManager.Nginx.Models.Level level = default(Azure.ResourceManager.Nginx.Models.Level), string category = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.NginxAnalysisDiagnostic NginxAnalysisDiagnostic(string id = null, string directive = null, string description = null, string file = null, float line = 0f, string message = null, string rule = null) { throw null; } - public static Azure.ResourceManager.Nginx.Models.NginxAnalysisResult NginxAnalysisResult(string status = null, System.Collections.Generic.IEnumerable dataErrors = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxAnalysisResult NginxAnalysisResult(string status = null, Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails data = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails NginxAnalysisResultDetails(System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable diagnostics = null) { throw null; } public static Azure.ResourceManager.Nginx.NginxCertificateData NginxCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxCertificateProperties properties = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.Nginx.Models.NginxCertificateProperties NginxCertificateProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), string keyVirtualPath = null, string certificateVirtualPath = null, string keyVaultSecretId = null, string sha1Thumbprint = null, string keyVaultSecretVersion = null, System.DateTimeOffset? keyVaultSecretCreated = default(System.DateTimeOffset?), Azure.ResourceManager.Nginx.Models.NginxCertificateError certificateError = null) { throw null; } - public static Azure.ResourceManager.Nginx.NginxConfigurationData NginxConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties properties = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } - public static Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties NginxConfigurationProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable protectedFiles = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage package = null, string rootFile = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent NginxConfigurationCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.NginxConfigurationData NginxConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties NginxConfigurationProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable protectedFiles = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage package = null, string rootFile = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationProtectedFileResult NginxConfigurationProtectedFileResult(string virtualPath = null, string contentHash = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties NginxConfigurationResponseProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable protectedFiles = null, Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage package = null, string rootFile = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent NginxDeploymentApiKeyCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyRequestProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.NginxDeploymentApiKeyData NginxDeploymentApiKeyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties properties = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties NginxDeploymentApiKeyResponseProperties(string hint = null, System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Nginx.NginxDeploymentData NginxDeploymentData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentProperties properties = null, string skuName = null) { throw null; } - public static Azure.ResourceManager.Nginx.Models.NginxDeploymentProperties NginxDeploymentProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), string nginxVersion = null, string managedResourceGroup = null, Azure.ResourceManager.Nginx.Models.NginxNetworkProfile networkProfile = null, string ipAddress = null, bool? enableDiagnosticsSupport = default(bool?), Azure.ResourceManager.Nginx.Models.NginxStorageAccount loggingStorageAccount = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentScalingProperties scalingProperties = null, string upgradeChannel = null, string userPreferredEmail = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = null) { throw null; } + public static Azure.ResourceManager.Nginx.Models.NginxDeploymentProperties NginxDeploymentProperties(Azure.ResourceManager.Nginx.Models.NginxProvisioningState? provisioningState = default(Azure.ResourceManager.Nginx.Models.NginxProvisioningState?), string nginxVersion = null, Azure.ResourceManager.Nginx.Models.NginxNetworkProfile networkProfile = null, string ipAddress = null, bool? enableDiagnosticsSupport = default(bool?), Azure.ResourceManager.Nginx.Models.NginxStorageAccount loggingStorageAccount = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentScalingProperties scalingProperties = null, string upgradeChannel = null, string userPreferredEmail = null, Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = null, string dataplaneApiEndpoint = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect NginxDeploymentPropertiesNginxAppProtect(Azure.ResourceManager.Nginx.Models.WebApplicationFirewallActivationState? webApplicationFirewallActivationState = default(Azure.ResourceManager.Nginx.Models.WebApplicationFirewallActivationState?), Azure.ResourceManager.Nginx.Models.WebApplicationFirewallStatus webApplicationFirewallStatus = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.WebApplicationFirewallComponentVersions WebApplicationFirewallComponentVersions(string wafEngineVersion = null, string wafNginxVersion = null) { throw null; } public static Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage WebApplicationFirewallPackage(string version = null, System.DateTimeOffset revisionDatetime = default(System.DateTimeOffset)) { throw null; } public static Azure.ResourceManager.Nginx.Models.WebApplicationFirewallStatus WebApplicationFirewallStatus(Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage attackSignaturesPackage = null, Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage botSignaturesPackage = null, Azure.ResourceManager.Nginx.Models.WebApplicationFirewallPackage threatCampaignsPackage = null, Azure.ResourceManager.Nginx.Models.WebApplicationFirewallComponentVersions componentVersions = null) { throw null; } } + public partial class DiagnosticItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DiagnosticItem() { } + public string Category { get { throw null; } } + public string Description { get { throw null; } } + public string Directive { get { throw null; } } + public string File { get { throw null; } } + public string Id { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.Level Level { get { throw null; } } + public float Line { get { throw null; } } + public string Message { get { throw null; } } + public string Rule { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.DiagnosticItem 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.Nginx.Models.DiagnosticItem 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 Level : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Level(string value) { throw null; } + public static Azure.ResourceManager.Nginx.Models.Level Info { get { throw null; } } + public static Azure.ResourceManager.Nginx.Models.Level Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.Nginx.Models.Level 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.Nginx.Models.Level left, Azure.ResourceManager.Nginx.Models.Level right) { throw null; } + public static implicit operator Azure.ResourceManager.Nginx.Models.Level (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Nginx.Models.Level left, Azure.ResourceManager.Nginx.Models.Level right) { throw null; } + public override string ToString() { throw null; } + } public partial class NginxAnalysisConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxAnalysisConfig() { } public System.Collections.Generic.IList Files { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage Package { get { throw null; } set { } } - public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } + public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } public string RootFile { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Nginx.Models.NginxAnalysisConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -256,7 +352,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NginxAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NginxAnalysisResult() { } - public System.Collections.Generic.IReadOnlyList DataErrors { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails Data { get { throw null; } } public string Status { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Nginx.Models.NginxAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -265,6 +361,18 @@ 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 partial class NginxAnalysisResultDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxAnalysisResultDetails() { } + public System.Collections.Generic.IReadOnlyList Diagnostics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxAnalysisResultDetails 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.Nginx.Models.NginxAnalysisResultDetails 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 NginxCertificateError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxCertificateError() { } @@ -295,6 +403,17 @@ 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 partial class NginxConfigurationCreateOrUpdateContent : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxConfigurationCreateOrUpdateContent() { } + public Azure.ResourceManager.Nginx.Models.NginxConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationCreateOrUpdateContent 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.Nginx.Models.NginxConfigurationCreateOrUpdateContent 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 NginxConfigurationFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxConfigurationFile() { } @@ -324,7 +443,7 @@ public partial class NginxConfigurationProperties : System.ClientModel.Primitive public NginxConfigurationProperties() { } public System.Collections.Generic.IList Files { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage Package { get { throw null; } set { } } - public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } + public System.Collections.Generic.IList ProtectedFiles { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxProvisioningState? ProvisioningState { get { throw null; } } public string RootFile { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -334,6 +453,81 @@ 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 partial class NginxConfigurationProtectedFileContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxConfigurationProtectedFileContent() { } + public string Content { get { throw null; } set { } } + public string ContentHash { get { throw null; } set { } } + public string VirtualPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationProtectedFileContent 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.Nginx.Models.NginxConfigurationProtectedFileContent 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 NginxConfigurationProtectedFileResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxConfigurationProtectedFileResult() { } + public string ContentHash { get { throw null; } } + public string VirtualPath { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationProtectedFileResult 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.Nginx.Models.NginxConfigurationProtectedFileResult 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 NginxConfigurationResponseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxConfigurationResponseProperties() { } + public System.Collections.Generic.IReadOnlyList Files { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.NginxConfigurationPackage Package { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedFiles { get { throw null; } } + public Azure.ResourceManager.Nginx.Models.NginxProvisioningState? ProvisioningState { get { throw null; } } + public string RootFile { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxConfigurationResponseProperties 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.Nginx.Models.NginxConfigurationResponseProperties 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 NginxDeploymentApiKeyCreateOrUpdateContent : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxDeploymentApiKeyCreateOrUpdateContent() { } + public Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyRequestProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent 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.Nginx.Models.NginxDeploymentApiKeyCreateOrUpdateContent 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 NginxDeploymentApiKeyRequestProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NginxDeploymentApiKeyRequestProperties() { } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public string SecretText { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyRequestProperties 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.Nginx.Models.NginxDeploymentApiKeyRequestProperties 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 NginxDeploymentApiKeyResponseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NginxDeploymentApiKeyResponseProperties() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Hint { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Nginx.Models.NginxDeploymentApiKeyResponseProperties 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.Nginx.Models.NginxDeploymentApiKeyResponseProperties 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 NginxDeploymentPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxDeploymentPatch() { } @@ -352,10 +546,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class NginxDeploymentProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NginxDeploymentProperties() { } + public string DataplaneApiEndpoint { get { throw null; } } public bool? EnableDiagnosticsSupport { get { throw null; } set { } } public string IPAddress { get { throw null; } } public Azure.ResourceManager.Nginx.Models.NginxStorageAccount LoggingStorageAccount { get { throw null; } set { } } - public string ManagedResourceGroup { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxDeploymentPropertiesNginxAppProtect NginxAppProtect { get { throw null; } set { } } public string NginxVersion { get { throw null; } } @@ -399,6 +593,7 @@ public partial class NginxDeploymentUpdateProperties : System.ClientModel.Primit public NginxDeploymentUpdateProperties() { } public bool? EnableDiagnosticsSupport { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxStorageAccount LoggingStorageAccount { get { throw null; } set { } } + public Azure.ResourceManager.Nginx.Models.NginxNetworkProfile NetworkProfile { get { throw null; } set { } } public Azure.ResourceManager.Nginx.Models.NginxDeploymentScalingProperties ScalingProperties { get { throw null; } set { } } public string UpgradeChannel { get { throw null; } set { } } public string UserPreferredEmail { get { throw null; } set { } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateCollection.cs index 264e90e07d4b6..1aa0eb2752e32 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateCollection.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NginxCertificateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CertificatesCreateOrUpdate() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_CreateOrUpdate.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_CreateOrUpdate.json // this example is just showing the usage of "Certificates_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CertificatesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_CertificatesGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Get.json // this example is just showing the usage of "Certificates_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 @@ -89,7 +89,7 @@ public async Task Get_CertificatesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CertificatesList() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_List.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_List.json // this example is just showing the usage of "Certificates_List" 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 @@ -125,7 +125,7 @@ public async Task GetAll_CertificatesList() [Ignore("Only validating compilation of examples")] public async Task Exists_CertificatesGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Get.json // this example is just showing the usage of "Certificates_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 @@ -155,7 +155,7 @@ public async Task Exists_CertificatesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CertificatesGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Get.json // this example is just showing the usage of "Certificates_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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateResource.cs index 66ee4005d5556..a38dd6b1eb464 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxCertificateResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NginxCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_CertificatesGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Get.json // this example is just showing the usage of "Certificates_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 @@ -50,7 +50,7 @@ public async Task Get_CertificatesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CertificatesDelete() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_Delete.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Delete.json // this example is just showing the usage of "Certificates_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 @@ -77,7 +77,7 @@ public async Task Delete_CertificatesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CertificatesCreateOrUpdate() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Certificates_CreateOrUpdate.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_CreateOrUpdate.json // this example is just showing the usage of "Certificates_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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationCollection.cs index b6a3d99006c51..eab6e91e2b505 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationCollection.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Nginx.Models; using NUnit.Framework; namespace Azure.ResourceManager.Nginx.Samples @@ -19,7 +20,7 @@ public partial class Sample_NginxConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_CreateOrUpdate.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_CreateOrUpdate.json // this example is just showing the usage of "Configurations_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 @@ -40,8 +41,8 @@ public async Task CreateOrUpdate_ConfigurationsCreateOrUpdate() // invoke the operation string configurationName = "default"; - NginxConfigurationData data = new NginxConfigurationData(); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configurationName, data); + NginxConfigurationCreateOrUpdateContent content = new NginxConfigurationCreateOrUpdateContent(); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configurationName, content); NginxConfigurationResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -55,7 +56,7 @@ public async Task CreateOrUpdate_ConfigurationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_ConfigurationsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Get.json // this example is just showing the usage of "Configurations_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 @@ -89,7 +90,7 @@ public async Task Get_ConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ConfigurationsList() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_List.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_List.json // this example is just showing the usage of "Configurations_List" 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 @@ -125,7 +126,7 @@ public async Task GetAll_ConfigurationsList() [Ignore("Only validating compilation of examples")] public async Task Exists_ConfigurationsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Get.json // this example is just showing the usage of "Configurations_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 @@ -155,7 +156,7 @@ public async Task Exists_ConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ConfigurationsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Get.json // this example is just showing the usage of "Configurations_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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationResource.cs index f95c3fee41841..e5ad1878da39a 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NginxConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_ConfigurationsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Get.json // this example is just showing the usage of "Configurations_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 @@ -51,7 +51,7 @@ public async Task Get_ConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConfigurationsDelete() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_Delete.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Delete.json // this example is just showing the usage of "Configurations_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 @@ -78,7 +78,7 @@ public async Task Delete_ConfigurationsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_CreateOrUpdate.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_CreateOrUpdate.json // this example is just showing the usage of "Configurations_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 @@ -96,8 +96,8 @@ public async Task Update_ConfigurationsCreateOrUpdate() NginxConfigurationResource nginxConfiguration = client.GetNginxConfigurationResource(nginxConfigurationResourceId); // invoke the operation - NginxConfigurationData data = new NginxConfigurationData(); - ArmOperation lro = await nginxConfiguration.UpdateAsync(WaitUntil.Completed, data); + NginxConfigurationCreateOrUpdateContent content = new NginxConfigurationCreateOrUpdateContent(); + ArmOperation lro = await nginxConfiguration.UpdateAsync(WaitUntil.Completed, content); NginxConfigurationResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -111,7 +111,7 @@ public async Task Update_ConfigurationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Analysis_ConfigurationsAnalysis() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Configurations_Analysis.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Analysis.json // this example is just showing the usage of "Configurations_Analysis" 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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyCollection.cs new file mode 100644 index 0000000000000..9381fb5929ce1 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyCollection.cs @@ -0,0 +1,197 @@ +// 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.Nginx.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Nginx.Samples +{ + public partial class Sample_NginxDeploymentApiKeyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiKeysCreateOrUpdate() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_CreateOrUpdate.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentResource created on azure + // for more information of creating NginxDeploymentResource, please refer to the document of NginxDeploymentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + ResourceIdentifier nginxDeploymentResourceId = NginxDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName); + NginxDeploymentResource nginxDeployment = client.GetNginxDeploymentResource(nginxDeploymentResourceId); + + // get the collection of this NginxDeploymentApiKeyResource + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + + // invoke the operation + string apiKeyName = "myApiKey"; + NginxDeploymentApiKeyCreateOrUpdateContent content = new NginxDeploymentApiKeyCreateOrUpdateContent(); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiKeyName, content); + NginxDeploymentApiKeyResource 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 + NginxDeploymentApiKeyData 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_ApiKeysGet() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Get.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentResource created on azure + // for more information of creating NginxDeploymentResource, please refer to the document of NginxDeploymentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + ResourceIdentifier nginxDeploymentResourceId = NginxDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName); + NginxDeploymentResource nginxDeployment = client.GetNginxDeploymentResource(nginxDeploymentResourceId); + + // get the collection of this NginxDeploymentApiKeyResource + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + + // invoke the operation + string apiKeyName = "myApiKey"; + NginxDeploymentApiKeyResource result = await collection.GetAsync(apiKeyName); + + // 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 + NginxDeploymentApiKeyData 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_ApiKeysList() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_List.json + // this example is just showing the usage of "ApiKeys_List" 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 NginxDeploymentResource created on azure + // for more information of creating NginxDeploymentResource, please refer to the document of NginxDeploymentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + ResourceIdentifier nginxDeploymentResourceId = NginxDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName); + NginxDeploymentResource nginxDeployment = client.GetNginxDeploymentResource(nginxDeploymentResourceId); + + // get the collection of this NginxDeploymentApiKeyResource + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + + // invoke the operation and iterate over the result + await foreach (NginxDeploymentApiKeyResource 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 + NginxDeploymentApiKeyData 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_ApiKeysGet() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Get.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentResource created on azure + // for more information of creating NginxDeploymentResource, please refer to the document of NginxDeploymentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + ResourceIdentifier nginxDeploymentResourceId = NginxDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName); + NginxDeploymentResource nginxDeployment = client.GetNginxDeploymentResource(nginxDeploymentResourceId); + + // get the collection of this NginxDeploymentApiKeyResource + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + + // invoke the operation + string apiKeyName = "myApiKey"; + bool result = await collection.ExistsAsync(apiKeyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiKeysGet() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Get.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentResource created on azure + // for more information of creating NginxDeploymentResource, please refer to the document of NginxDeploymentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + ResourceIdentifier nginxDeploymentResourceId = NginxDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName); + NginxDeploymentResource nginxDeployment = client.GetNginxDeploymentResource(nginxDeploymentResourceId); + + // get the collection of this NginxDeploymentApiKeyResource + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + + // invoke the operation + string apiKeyName = "myApiKey"; + NullableResponse response = await collection.GetIfExistsAsync(apiKeyName); + NginxDeploymentApiKeyResource 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 + NginxDeploymentApiKeyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyResource.cs new file mode 100644 index 0000000000000..83a79c4cce9e0 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentApiKeyResource.cs @@ -0,0 +1,110 @@ +// 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.Nginx.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Nginx.Samples +{ + public partial class Sample_NginxDeploymentApiKeyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiKeysGet() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Get.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentApiKeyResource created on azure + // for more information of creating NginxDeploymentApiKeyResource, please refer to the document of NginxDeploymentApiKeyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + string apiKeyName = "myApiKey"; + ResourceIdentifier nginxDeploymentApiKeyResourceId = NginxDeploymentApiKeyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = client.GetNginxDeploymentApiKeyResource(nginxDeploymentApiKeyResourceId); + + // invoke the operation + NginxDeploymentApiKeyResource result = await nginxDeploymentApiKey.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 + NginxDeploymentApiKeyData 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_ApiKeysDelete() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Delete.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentApiKeyResource created on azure + // for more information of creating NginxDeploymentApiKeyResource, please refer to the document of NginxDeploymentApiKeyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + string apiKeyName = "myApiKey"; + ResourceIdentifier nginxDeploymentApiKeyResourceId = NginxDeploymentApiKeyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = client.GetNginxDeploymentApiKeyResource(nginxDeploymentApiKeyResourceId); + + // invoke the operation + await nginxDeploymentApiKey.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiKeysCreateOrUpdate() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_CreateOrUpdate.json + // this example is just showing the usage of "ApiKeys_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 NginxDeploymentApiKeyResource created on azure + // for more information of creating NginxDeploymentApiKeyResource, please refer to the document of NginxDeploymentApiKeyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + string apiKeyName = "myApiKey"; + ResourceIdentifier nginxDeploymentApiKeyResourceId = NginxDeploymentApiKeyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = client.GetNginxDeploymentApiKeyResource(nginxDeploymentApiKeyResourceId); + + // invoke the operation + NginxDeploymentApiKeyCreateOrUpdateContent content = new NginxDeploymentApiKeyCreateOrUpdateContent(); + ArmOperation lro = await nginxDeploymentApiKey.UpdateAsync(WaitUntil.Completed, content); + NginxDeploymentApiKeyResource 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 + NginxDeploymentApiKeyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentCollection.cs index 16c9c2e312083..f8017738e6e41 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentCollection.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NginxDeploymentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DeploymentsCreate() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Create.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Create.json // this example is just showing the usage of "Deployments_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_DeploymentsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_DeploymentsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get.json // this example is just showing the usage of "Deployments_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 @@ -88,7 +88,7 @@ public async Task Get_DeploymentsGet() [Ignore("Only validating compilation of examples")] public async Task Get_DeploymentsGetAutoScale() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get_AutoScale.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get_AutoScale.json // this example is just showing the usage of "Deployments_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 @@ -121,7 +121,7 @@ public async Task Get_DeploymentsGetAutoScale() [Ignore("Only validating compilation of examples")] public async Task GetAll_DeploymentsListByResourceGroup() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_ListByResourceGroup.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_ListByResourceGroup.json // this example is just showing the usage of "Deployments_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 @@ -156,7 +156,7 @@ public async Task GetAll_DeploymentsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_DeploymentsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get.json // this example is just showing the usage of "Deployments_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 @@ -185,7 +185,7 @@ public async Task Exists_DeploymentsGet() [Ignore("Only validating compilation of examples")] public async Task Exists_DeploymentsGetAutoScale() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get_AutoScale.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get_AutoScale.json // this example is just showing the usage of "Deployments_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 @@ -214,7 +214,7 @@ public async Task Exists_DeploymentsGetAutoScale() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DeploymentsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get.json // this example is just showing the usage of "Deployments_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 @@ -255,7 +255,7 @@ public async Task GetIfExists_DeploymentsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DeploymentsGetAutoScale() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get_AutoScale.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get_AutoScale.json // this example is just showing the usage of "Deployments_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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentResource.cs index 57bdb981c5008..b2df491b0c836 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_NginxDeploymentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NginxDeploymentResource [Ignore("Only validating compilation of examples")] public async Task Get_DeploymentsGet() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get.json // this example is just showing the usage of "Deployments_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 @@ -50,7 +50,7 @@ public async Task Get_DeploymentsGet() [Ignore("Only validating compilation of examples")] public async Task Get_DeploymentsGetAutoScale() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Get_AutoScale.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get_AutoScale.json // this example is just showing the usage of "Deployments_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 @@ -80,7 +80,7 @@ public async Task Get_DeploymentsGetAutoScale() [Ignore("Only validating compilation of examples")] public async Task Delete_DeploymentsDelete() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Delete.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Delete.json // this example is just showing the usage of "Deployments_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 @@ -106,7 +106,39 @@ public async Task Delete_DeploymentsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DeploymentsUpdate() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_Update.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Update.json + // this example is just showing the usage of "Deployments_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 NginxDeploymentResource created on azure + // for more information of creating NginxDeploymentResource, please refer to the document of NginxDeploymentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string deploymentName = "myDeployment"; + ResourceIdentifier nginxDeploymentResourceId = NginxDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, deploymentName); + NginxDeploymentResource nginxDeployment = client.GetNginxDeploymentResource(nginxDeploymentResourceId); + + // invoke the operation + NginxDeploymentPatch patch = new NginxDeploymentPatch(); + ArmOperation lro = await nginxDeployment.UpdateAsync(WaitUntil.Completed, patch); + NginxDeploymentResource 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 + NginxDeploymentData 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_DeploymentsUpdateSubnet() + { + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_UpdateSubnet.json // this example is just showing the usage of "Deployments_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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 3c39a31b4a680..d267633d0a585 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetNginxDeployments_DeploymentsList() { - // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-06-01-preview/examples/Deployments_List.json + // Generated from example definition: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_List.json // this example is just showing the usage of "Deployments_List" 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 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/ArmNginxModelFactory.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/ArmNginxModelFactory.cs index 50f83643f9408..5a4261bcd3568 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/ArmNginxModelFactory.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/ArmNginxModelFactory.cs @@ -16,6 +16,51 @@ namespace Azure.ResourceManager.Nginx.Models /// Model factory for models. public static partial class ArmNginxModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// A new instance for mocking. + public static NginxDeploymentApiKeyCreateOrUpdateContent NginxDeploymentApiKeyCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NginxDeploymentApiKeyRequestProperties properties = null) + { + return new NginxDeploymentApiKeyCreateOrUpdateContent( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// A new instance for mocking. + public static NginxDeploymentApiKeyData NginxDeploymentApiKeyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NginxDeploymentApiKeyResponseProperties properties = null) + { + return new NginxDeploymentApiKeyData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The first three characters of the secret text to help identify it in use. This property is read-only. + /// The time after which this Dataplane API Key is no longer valid. + /// A new instance for mocking. + public static NginxDeploymentApiKeyResponseProperties NginxDeploymentApiKeyResponseProperties(string hint = null, DateTimeOffset? endOn = null) + { + return new NginxDeploymentApiKeyResponseProperties(hint, endOn, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -66,9 +111,8 @@ public static NginxCertificateProperties NginxCertificateProperties(NginxProvisi /// The resourceType. /// The systemData. /// - /// /// A new instance for mocking. - public static NginxConfigurationData NginxConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NginxConfigurationProperties properties = null, AzureLocation? location = null) + public static NginxConfigurationData NginxConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NginxConfigurationResponseProperties properties = null) { return new NginxConfigurationData( id, @@ -76,7 +120,54 @@ public static NginxConfigurationData NginxConfigurationData(ResourceIdentifier i resourceType, systemData, properties, - location, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static NginxConfigurationResponseProperties NginxConfigurationResponseProperties(NginxProvisioningState? provisioningState = null, IEnumerable files = null, IEnumerable protectedFiles = null, NginxConfigurationPackage package = null, string rootFile = null) + { + files ??= new List(); + protectedFiles ??= new List(); + + return new NginxConfigurationResponseProperties( + provisioningState, + files?.ToList(), + protectedFiles?.ToList(), + package, + rootFile, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual path of the protected file. + /// The hash of the content of the file. This value is used to determine if the file has changed. + /// A new instance for mocking. + public static NginxConfigurationProtectedFileResult NginxConfigurationProtectedFileResult(string virtualPath = null, string contentHash = null) + { + return new NginxConfigurationProtectedFileResult(virtualPath, contentHash, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// A new instance for mocking. + public static NginxConfigurationCreateOrUpdateContent NginxConfigurationCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NginxConfigurationProperties properties = null) + { + return new NginxConfigurationCreateOrUpdateContent( + id, + name, + resourceType, + systemData, + properties, serializedAdditionalRawData: null); } @@ -87,10 +178,10 @@ public static NginxConfigurationData NginxConfigurationData(ResourceIdentifier i /// /// /// A new instance for mocking. - public static NginxConfigurationProperties NginxConfigurationProperties(NginxProvisioningState? provisioningState = null, IEnumerable files = null, IEnumerable protectedFiles = null, NginxConfigurationPackage package = null, string rootFile = null) + public static NginxConfigurationProperties NginxConfigurationProperties(NginxProvisioningState? provisioningState = null, IEnumerable files = null, IEnumerable protectedFiles = null, NginxConfigurationPackage package = null, string rootFile = null) { files ??= new List(); - protectedFiles ??= new List(); + protectedFiles ??= new List(); return new NginxConfigurationProperties( provisioningState, @@ -103,13 +194,23 @@ public static NginxConfigurationProperties NginxConfigurationProperties(NginxPro /// Initializes a new instance of . /// The status of the analysis. - /// + /// /// A new instance for mocking. - public static NginxAnalysisResult NginxAnalysisResult(string status = null, IEnumerable dataErrors = null) + public static NginxAnalysisResult NginxAnalysisResult(string status = null, NginxAnalysisResultDetails data = null) + { + return new NginxAnalysisResult(status, data, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static NginxAnalysisResultDetails NginxAnalysisResultDetails(IEnumerable errors = null, IEnumerable diagnostics = null) { - dataErrors ??= new List(); + errors ??= new List(); + diagnostics ??= new List(); - return new NginxAnalysisResult(status, dataErrors != null ? new AnalysisResultData(dataErrors?.ToList(), serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + return new NginxAnalysisResultDetails(errors?.ToList(), diagnostics?.ToList(), serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -134,6 +235,32 @@ public static NginxAnalysisDiagnostic NginxAnalysisDiagnostic(string id = null, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Unique identifier for the diagnostic. + /// + /// + /// The filepath of the most relevant config file. + /// + /// + /// + /// Warning or Info. + /// Category of warning like Best-practices, Recommendation, Security etc. + /// A new instance for mocking. + public static DiagnosticItem DiagnosticItem(string id = null, string directive = null, string description = null, string file = null, float line = default, string message = null, string rule = null, Level level = default, string category = null) + { + return new DiagnosticItem( + id, + directive, + description, + file, + line, + message, + rule, + level, + category, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -165,7 +292,6 @@ public static NginxDeploymentData NginxDeploymentData(ResourceIdentifier id = nu /// Initializes a new instance of . /// /// - /// The managed resource group to deploy VNet injection related network resources. /// /// The IP address of the deployment. /// @@ -174,13 +300,13 @@ public static NginxDeploymentData NginxDeploymentData(ResourceIdentifier id = nu /// Autoupgrade settings of a deployment. /// /// Settings for NGINX App Protect (NAP). + /// Dataplane API endpoint for the caller to update the NGINX state of the deployment. /// A new instance for mocking. - public static NginxDeploymentProperties NginxDeploymentProperties(NginxProvisioningState? provisioningState = null, string nginxVersion = null, string managedResourceGroup = null, NginxNetworkProfile networkProfile = null, string ipAddress = null, bool? enableDiagnosticsSupport = null, NginxStorageAccount loggingStorageAccount = null, NginxDeploymentScalingProperties scalingProperties = null, string upgradeChannel = null, string userPreferredEmail = null, NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = null) + public static NginxDeploymentProperties NginxDeploymentProperties(NginxProvisioningState? provisioningState = null, string nginxVersion = null, NginxNetworkProfile networkProfile = null, string ipAddress = null, bool? enableDiagnosticsSupport = null, NginxStorageAccount loggingStorageAccount = null, NginxDeploymentScalingProperties scalingProperties = null, string upgradeChannel = null, string userPreferredEmail = null, NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = null, string dataplaneApiEndpoint = null) { return new NginxDeploymentProperties( provisioningState, nginxVersion, - managedResourceGroup, networkProfile, ipAddress, enableDiagnosticsSupport, @@ -189,6 +315,7 @@ public static NginxDeploymentProperties NginxDeploymentProperties(NginxProvision upgradeChannel != null ? new AutoUpgradeProfile(upgradeChannel, serializedAdditionalRawData: null) : null, userPreferredEmail != null ? new NginxDeploymentUserProfile(userPreferredEmail, serializedAdditionalRawData: null) : null, nginxAppProtect, + dataplaneApiEndpoint, serializedAdditionalRawData: null); } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxArmClient.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxArmClient.cs index 3597b892f947c..ab02ff1c82339 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxArmClient.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// 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 NginxDeploymentApiKeyResource GetNginxDeploymentApiKeyResource(ResourceIdentifier id) + { + NginxDeploymentApiKeyResource.ValidateResourceId(id); + return new NginxDeploymentApiKeyResource(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. diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxResourceGroupResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxResourceGroupResource.cs index f232f3e57a71f..6b390ed027daf 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxResourceGroupResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual NginxDeploymentCollection GetNginxDeployments() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetNginxDeploymentA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxSubscriptionResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxSubscriptionResource.cs index 2232a2667e456..73fd8ca54df40 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxSubscriptionResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/MockableNginxSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetNginxDeploymentsAsync(C /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/NginxExtensions.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/NginxExtensions.cs index 3d2a48654fd18..3eb46d8eeaeb7 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/NginxExtensions.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Extensions/NginxExtensions.cs @@ -32,6 +32,25 @@ private static MockableNginxSubscriptionResource GetMockableNginxSubscriptionRes return resource.GetCachedClient(client => new MockableNginxSubscriptionResource(client, resource.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. + /// + /// Mocking + /// 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 NginxDeploymentApiKeyResource GetNginxDeploymentApiKeyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNginxArmClient(client).GetNginxDeploymentApiKeyResource(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. @@ -119,7 +138,7 @@ public static NginxDeploymentCollection GetNginxDeployments(this ResourceGroupRe /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -157,7 +176,7 @@ public static async Task> GetNginxDeploymentAs /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -195,7 +214,7 @@ public static Response GetNginxDeployment(this Resource /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -231,7 +250,7 @@ public static AsyncPageable GetNginxDeploymentsAsync(th /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.Serialization.cs new file mode 100644 index 0000000000000..9058b79b33e27 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.Serialization.cs @@ -0,0 +1,206 @@ +// 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.Nginx.Models +{ + public partial class DiagnosticItem : 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(DiagnosticItem)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("directive"u8); + writer.WriteStringValue(Directive); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("file"u8); + writer.WriteStringValue(File); + writer.WritePropertyName("line"u8); + writer.WriteNumberValue(Line); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + writer.WritePropertyName("rule"u8); + writer.WriteStringValue(Rule); + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + 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 + } + } + } + + DiagnosticItem 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(DiagnosticItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiagnosticItem(document.RootElement, options); + } + + internal static DiagnosticItem DeserializeDiagnosticItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string directive = default; + string description = default; + string file = default; + float line = default; + string message = default; + string rule = default; + Level level = default; + string category = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("directive"u8)) + { + directive = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("file"u8)) + { + file = property.Value.GetString(); + continue; + } + if (property.NameEquals("line"u8)) + { + line = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("rule"u8)) + { + rule = property.Value.GetString(); + continue; + } + if (property.NameEquals("level"u8)) + { + level = new Level(property.Value.GetString()); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiagnosticItem( + id, + directive, + description, + file, + line, + message, + rule, + level, + category, + 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(DiagnosticItem)} does not support writing '{options.Format}' format."); + } + } + + DiagnosticItem 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 DeserializeDiagnosticItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiagnosticItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.cs new file mode 100644 index 0000000000000..95ba93aa6a56d --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/DiagnosticItem.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// A diagnostic is a message associated with an NGINX config. The Analyzer returns diagnostics with a level indicating the importance of the diagnostic with optional category. + public partial class DiagnosticItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// + /// The filepath of the most relevant config file. + /// + /// + /// + /// Warning or Info. + /// , , , or is null. + internal DiagnosticItem(string directive, string description, string file, float line, string message, string rule, Level level) + { + Argument.AssertNotNull(directive, nameof(directive)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(file, nameof(file)); + Argument.AssertNotNull(message, nameof(message)); + Argument.AssertNotNull(rule, nameof(rule)); + + Directive = directive; + Description = description; + File = file; + Line = line; + Message = message; + Rule = rule; + Level = level; + } + + /// Initializes a new instance of . + /// Unique identifier for the diagnostic. + /// + /// + /// The filepath of the most relevant config file. + /// + /// + /// + /// Warning or Info. + /// Category of warning like Best-practices, Recommendation, Security etc. + /// Keeps track of any properties unknown to the library. + internal DiagnosticItem(string id, string directive, string description, string file, float line, string message, string rule, Level level, string category, IDictionary serializedAdditionalRawData) + { + Id = id; + Directive = directive; + Description = description; + File = file; + Line = line; + Message = message; + Rule = rule; + Level = level; + Category = category; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DiagnosticItem() + { + } + + /// Unique identifier for the diagnostic. + public string Id { get; } + /// Gets the directive. + public string Directive { get; } + /// Gets the description. + public string Description { get; } + /// The filepath of the most relevant config file. + public string File { get; } + /// Gets the line. + public float Line { get; } + /// Gets the message. + public string Message { get; } + /// Gets the rule. + public string Rule { get; } + /// Warning or Info. + public Level Level { get; } + /// Category of warning like Best-practices, Recommendation, Security etc. + public string Category { get; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/Level.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/Level.cs new file mode 100644 index 0000000000000..c465f6140d633 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/Level.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.Nginx.Models +{ + /// Warning or Info. + public readonly partial struct Level : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Level(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfoValue = "Info"; + private const string WarningValue = "Warning"; + + /// Info. + public static Level Info { get; } = new Level(InfoValue); + /// Warning. + public static Level Warning { get; } = new Level(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(Level left, Level right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Level left, Level right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Level(string value) => new Level(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Level other && Equals(other); + /// + public bool Equals(Level 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/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.Serialization.cs index 97bc69cc01fd0..47c7de6566c39 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.Serialization.cs @@ -103,7 +103,7 @@ internal static NginxAnalysisConfig DeserializeNginxAnalysisConfig(JsonElement e } string rootFile = default; IList files = default; - IList protectedFiles = default; + IList protectedFiles = default; NginxConfigurationPackage package = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -134,10 +134,10 @@ internal static NginxAnalysisConfig DeserializeNginxAnalysisConfig(JsonElement e { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NginxConfigurationFile.DeserializeNginxConfigurationFile(item, options)); + array.Add(NginxConfigurationProtectedFileContent.DeserializeNginxConfigurationProtectedFileContent(item, options)); } protectedFiles = array; continue; @@ -157,7 +157,7 @@ internal static NginxAnalysisConfig DeserializeNginxAnalysisConfig(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new NginxAnalysisConfig(rootFile, files ?? new ChangeTrackingList(), protectedFiles ?? new ChangeTrackingList(), package, serializedAdditionalRawData); + return new NginxAnalysisConfig(rootFile, files ?? new ChangeTrackingList(), protectedFiles ?? new ChangeTrackingList(), package, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.cs index 15856db658465..c9d1d680d4df5 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisConfig.cs @@ -49,7 +49,7 @@ public partial class NginxAnalysisConfig public NginxAnalysisConfig() { Files = new ChangeTrackingList(); - ProtectedFiles = new ChangeTrackingList(); + ProtectedFiles = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -58,7 +58,7 @@ public NginxAnalysisConfig() /// /// /// Keeps track of any properties unknown to the library. - internal NginxAnalysisConfig(string rootFile, IList files, IList protectedFiles, NginxConfigurationPackage package, IDictionary serializedAdditionalRawData) + internal NginxAnalysisConfig(string rootFile, IList files, IList protectedFiles, NginxConfigurationPackage package, IDictionary serializedAdditionalRawData) { RootFile = rootFile; Files = files; @@ -72,7 +72,7 @@ internal NginxAnalysisConfig(string rootFile, IList file /// Gets the files. public IList Files { get; } /// Gets the protected files. - public IList ProtectedFiles { get; } + public IList ProtectedFiles { get; } /// Gets or sets the package. public NginxConfigurationPackage Package { get; set; } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.Serialization.cs index 5b6b1e4214259..027834613085d 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.Serialization.cs @@ -79,7 +79,7 @@ internal static NginxAnalysisResult DeserializeNginxAnalysisResult(JsonElement e return null; } string status = default; - AnalysisResultData data = default; + NginxAnalysisResultDetails data = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -95,7 +95,7 @@ internal static NginxAnalysisResult DeserializeNginxAnalysisResult(JsonElement e { continue; } - data = AnalysisResultData.DeserializeAnalysisResultData(property.Value, options); + data = NginxAnalysisResultDetails.DeserializeNginxAnalysisResultDetails(property.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.cs index 8b0fa1d58ddd0..f815b9f124b9d 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResult.cs @@ -59,7 +59,7 @@ internal NginxAnalysisResult(string status) /// The status of the analysis. /// /// Keeps track of any properties unknown to the library. - internal NginxAnalysisResult(string status, AnalysisResultData data, IDictionary serializedAdditionalRawData) + internal NginxAnalysisResult(string status, NginxAnalysisResultDetails data, IDictionary serializedAdditionalRawData) { Status = status; Data = data; @@ -74,11 +74,6 @@ internal NginxAnalysisResult() /// The status of the analysis. public string Status { get; } /// Gets the data. - internal AnalysisResultData Data { get; } - /// Gets the data errors. - public IReadOnlyList DataErrors - { - get => Data?.Errors; - } + public NginxAnalysisResultDetails Data { get; } } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/AnalysisResultData.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResultDetails.Serialization.cs similarity index 56% rename from sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/AnalysisResultData.Serialization.cs rename to sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResultDetails.Serialization.cs index ee1b67680b6b8..8da505ee68389 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/AnalysisResultData.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResultDetails.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Nginx.Models { - internal partial class AnalysisResultData : IUtf8JsonSerializable, IJsonModel + public partial class NginxAnalysisResultDetails : 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, ModelReaderWrit /// 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(AnalysisResultData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(NginxAnalysisResultDetails)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Errors)) @@ -44,6 +44,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(Diagnostics)) + { + writer.WritePropertyName("diagnostics"u8); + writer.WriteStartArray(); + foreach (var item in Diagnostics) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -61,19 +71,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AnalysisResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + NginxAnalysisResultDetails 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(AnalysisResultData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(NginxAnalysisResultDetails)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAnalysisResultData(document.RootElement, options); + return DeserializeNginxAnalysisResultDetails(document.RootElement, options); } - internal static AnalysisResultData DeserializeAnalysisResultData(JsonElement element, ModelReaderWriterOptions options = null) + internal static NginxAnalysisResultDetails DeserializeNginxAnalysisResultDetails(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -82,6 +92,7 @@ internal static AnalysisResultData DeserializeAnalysisResultData(JsonElement ele return null; } IReadOnlyList errors = default; + IReadOnlyList diagnostics = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -100,44 +111,58 @@ internal static AnalysisResultData DeserializeAnalysisResultData(JsonElement ele errors = array; continue; } + if (property.NameEquals("diagnostics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnosticItem.DeserializeDiagnosticItem(item, options)); + } + diagnostics = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AnalysisResultData(errors ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new NginxAnalysisResultDetails(errors ?? new ChangeTrackingList(), diagnostics ?? new ChangeTrackingList(), 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(AnalysisResultData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(NginxAnalysisResultDetails)} does not support writing '{options.Format}' format."); } } - AnalysisResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + NginxAnalysisResultDetails 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 DeserializeAnalysisResultData(document.RootElement, options); + return DeserializeNginxAnalysisResultDetails(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AnalysisResultData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(NginxAnalysisResultDetails)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/AnalysisResultData.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResultDetails.cs similarity index 71% rename from sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/AnalysisResultData.cs rename to sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResultDetails.cs index 188159ffa7955..e8c2ed7d6a1ef 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/AnalysisResultData.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxAnalysisResultDetails.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.Nginx.Models { - /// The AnalysisResultData. - internal partial class AnalysisResultData + /// The NginxAnalysisResultDetails. + public partial class NginxAnalysisResultDetails { /// /// Keeps track of any properties unknown to the library. @@ -45,22 +45,27 @@ internal partial class AnalysisResultData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal AnalysisResultData() + /// Initializes a new instance of . + internal NginxAnalysisResultDetails() { Errors = new ChangeTrackingList(); + Diagnostics = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// + /// /// Keeps track of any properties unknown to the library. - internal AnalysisResultData(IReadOnlyList errors, IDictionary serializedAdditionalRawData) + internal NginxAnalysisResultDetails(IReadOnlyList errors, IReadOnlyList diagnostics, IDictionary serializedAdditionalRawData) { Errors = errors; + Diagnostics = diagnostics; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the errors. public IReadOnlyList Errors { get; } + /// Gets the diagnostics. + public IReadOnlyList Diagnostics { get; } } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.Serialization.cs new file mode 100644 index 0000000000000..468b199cb2a80 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.Serialization.cs @@ -0,0 +1,154 @@ +// 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.Models; + +namespace Azure.ResourceManager.Nginx.Models +{ + public partial class NginxConfigurationCreateOrUpdateContent : 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 override 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(NginxConfigurationCreateOrUpdateContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NginxConfigurationCreateOrUpdateContent 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(NginxConfigurationCreateOrUpdateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxConfigurationCreateOrUpdateContent(document.RootElement, options); + } + + internal static NginxConfigurationCreateOrUpdateContent DeserializeNginxConfigurationCreateOrUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NginxConfigurationProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NginxConfigurationProperties.DeserializeNginxConfigurationProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxConfigurationCreateOrUpdateContent( + id, + name, + type, + systemData, + properties, + 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(NginxConfigurationCreateOrUpdateContent)} does not support writing '{options.Format}' format."); + } + } + + NginxConfigurationCreateOrUpdateContent 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 DeserializeNginxConfigurationCreateOrUpdateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxConfigurationCreateOrUpdateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.cs new file mode 100644 index 0000000000000..bd60c9bcf4145 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationCreateOrUpdateContent.cs @@ -0,0 +1,71 @@ +// 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.Models; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxConfigurationCreateOrUpdateContent. + public partial class NginxConfigurationCreateOrUpdateContent : ResourceData + { + /// + /// 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 NginxConfigurationCreateOrUpdateContent() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Keeps track of any properties unknown to the library. + internal NginxConfigurationCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NginxConfigurationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the properties. + public NginxConfigurationProperties Properties { get; set; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.Serialization.cs index be520c9f17e22..29243c2c22460 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.Serialization.cs @@ -108,7 +108,7 @@ internal static NginxConfigurationProperties DeserializeNginxConfigurationProper } NginxProvisioningState? provisioningState = default; IList files = default; - IList protectedFiles = default; + IList protectedFiles = default; NginxConfigurationPackage package = default; string rootFile = default; IDictionary serializedAdditionalRawData = default; @@ -144,10 +144,10 @@ internal static NginxConfigurationProperties DeserializeNginxConfigurationProper { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NginxConfigurationFile.DeserializeNginxConfigurationFile(item, options)); + array.Add(NginxConfigurationProtectedFileContent.DeserializeNginxConfigurationProtectedFileContent(item, options)); } protectedFiles = array; continue; @@ -175,7 +175,7 @@ internal static NginxConfigurationProperties DeserializeNginxConfigurationProper return new NginxConfigurationProperties( provisioningState, files ?? new ChangeTrackingList(), - protectedFiles ?? new ChangeTrackingList(), + protectedFiles ?? new ChangeTrackingList(), package, rootFile, serializedAdditionalRawData); diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.cs index 57e619578f572..3c4c963457471 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProperties.cs @@ -49,7 +49,7 @@ public partial class NginxConfigurationProperties public NginxConfigurationProperties() { Files = new ChangeTrackingList(); - ProtectedFiles = new ChangeTrackingList(); + ProtectedFiles = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -59,7 +59,7 @@ public NginxConfigurationProperties() /// /// /// Keeps track of any properties unknown to the library. - internal NginxConfigurationProperties(NginxProvisioningState? provisioningState, IList files, IList protectedFiles, NginxConfigurationPackage package, string rootFile, IDictionary serializedAdditionalRawData) + internal NginxConfigurationProperties(NginxProvisioningState? provisioningState, IList files, IList protectedFiles, NginxConfigurationPackage package, string rootFile, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; Files = files; @@ -74,7 +74,7 @@ internal NginxConfigurationProperties(NginxProvisioningState? provisioningState, /// Gets the files. public IList Files { get; } /// Gets the protected files. - public IList ProtectedFiles { get; } + public IList ProtectedFiles { get; } /// Gets or sets the package. public NginxConfigurationPackage Package { get; set; } /// Gets or sets the root file. diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.Serialization.cs new file mode 100644 index 0000000000000..ecd3a9b845b63 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Nginx.Models +{ + public partial class NginxConfigurationProtectedFileContent : 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(NginxConfigurationProtectedFileContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + if (Optional.IsDefined(VirtualPath)) + { + writer.WritePropertyName("virtualPath"u8); + writer.WriteStringValue(VirtualPath); + } + if (Optional.IsDefined(ContentHash)) + { + writer.WritePropertyName("contentHash"u8); + writer.WriteStringValue(ContentHash); + } + 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 + } + } + } + + NginxConfigurationProtectedFileContent 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(NginxConfigurationProtectedFileContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxConfigurationProtectedFileContent(document.RootElement, options); + } + + internal static NginxConfigurationProtectedFileContent DeserializeNginxConfigurationProtectedFileContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string content = default; + string virtualPath = default; + string contentHash = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualPath"u8)) + { + virtualPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("contentHash"u8)) + { + contentHash = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxConfigurationProtectedFileContent(content, virtualPath, contentHash, 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(NginxConfigurationProtectedFileContent)} does not support writing '{options.Format}' format."); + } + } + + NginxConfigurationProtectedFileContent 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 DeserializeNginxConfigurationProtectedFileContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxConfigurationProtectedFileContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.cs new file mode 100644 index 0000000000000..698160d1a8fbd --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileContent.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxConfigurationProtectedFileContent. + public partial class NginxConfigurationProtectedFileContent + { + /// + /// 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 NginxConfigurationProtectedFileContent() + { + } + + /// Initializes a new instance of . + /// The content of the protected file. This value is a PUT only value. If you perform a GET request on this value, it will be empty because it is a protected file. + /// The virtual path of the protected file. + /// The hash of the content of the file. This value is used to determine if the file has changed. + /// Keeps track of any properties unknown to the library. + internal NginxConfigurationProtectedFileContent(string content, string virtualPath, string contentHash, IDictionary serializedAdditionalRawData) + { + Content = content; + VirtualPath = virtualPath; + ContentHash = contentHash; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The content of the protected file. This value is a PUT only value. If you perform a GET request on this value, it will be empty because it is a protected file. + public string Content { get; set; } + /// The virtual path of the protected file. + public string VirtualPath { get; set; } + /// The hash of the content of the file. This value is used to determine if the file has changed. + public string ContentHash { get; set; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.Serialization.cs new file mode 100644 index 0000000000000..9b0bbdadfa063 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.Serialization.cs @@ -0,0 +1,140 @@ +// 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.Nginx.Models +{ + public partial class NginxConfigurationProtectedFileResult : 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(NginxConfigurationProtectedFileResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VirtualPath)) + { + writer.WritePropertyName("virtualPath"u8); + writer.WriteStringValue(VirtualPath); + } + if (Optional.IsDefined(ContentHash)) + { + writer.WritePropertyName("contentHash"u8); + writer.WriteStringValue(ContentHash); + } + 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 + } + } + } + + NginxConfigurationProtectedFileResult 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(NginxConfigurationProtectedFileResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxConfigurationProtectedFileResult(document.RootElement, options); + } + + internal static NginxConfigurationProtectedFileResult DeserializeNginxConfigurationProtectedFileResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string virtualPath = default; + string contentHash = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualPath"u8)) + { + virtualPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("contentHash"u8)) + { + contentHash = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxConfigurationProtectedFileResult(virtualPath, contentHash, 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(NginxConfigurationProtectedFileResult)} does not support writing '{options.Format}' format."); + } + } + + NginxConfigurationProtectedFileResult 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 DeserializeNginxConfigurationProtectedFileResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxConfigurationProtectedFileResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.cs new file mode 100644 index 0000000000000..612f155b22427 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationProtectedFileResult.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxConfigurationProtectedFileResult. + public partial class NginxConfigurationProtectedFileResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NginxConfigurationProtectedFileResult() + { + } + + /// Initializes a new instance of . + /// The virtual path of the protected file. + /// The hash of the content of the file. This value is used to determine if the file has changed. + /// Keeps track of any properties unknown to the library. + internal NginxConfigurationProtectedFileResult(string virtualPath, string contentHash, IDictionary serializedAdditionalRawData) + { + VirtualPath = virtualPath; + ContentHash = contentHash; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The virtual path of the protected file. + public string VirtualPath { get; } + /// The hash of the content of the file. This value is used to determine if the file has changed. + public string ContentHash { get; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.Serialization.cs new file mode 100644 index 0000000000000..ba0062a0c3745 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.Serialization.cs @@ -0,0 +1,215 @@ +// 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.Nginx.Models +{ + public partial class NginxConfigurationResponseProperties : 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(NginxConfigurationResponseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Files)) + { + writer.WritePropertyName("files"u8); + writer.WriteStartArray(); + foreach (var item in Files) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ProtectedFiles)) + { + writer.WritePropertyName("protectedFiles"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Package)) + { + writer.WritePropertyName("package"u8); + writer.WriteObjectValue(Package, options); + } + if (Optional.IsDefined(RootFile)) + { + writer.WritePropertyName("rootFile"u8); + writer.WriteStringValue(RootFile); + } + 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 + } + } + } + + NginxConfigurationResponseProperties 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(NginxConfigurationResponseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxConfigurationResponseProperties(document.RootElement, options); + } + + internal static NginxConfigurationResponseProperties DeserializeNginxConfigurationResponseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NginxProvisioningState? provisioningState = default; + IReadOnlyList files = default; + IReadOnlyList protectedFiles = default; + NginxConfigurationPackage package = default; + string rootFile = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NginxProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NginxConfigurationFile.DeserializeNginxConfigurationFile(item, options)); + } + files = array; + continue; + } + if (property.NameEquals("protectedFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NginxConfigurationProtectedFileResult.DeserializeNginxConfigurationProtectedFileResult(item, options)); + } + protectedFiles = array; + continue; + } + if (property.NameEquals("package"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + package = NginxConfigurationPackage.DeserializeNginxConfigurationPackage(property.Value, options); + continue; + } + if (property.NameEquals("rootFile"u8)) + { + rootFile = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxConfigurationResponseProperties( + provisioningState, + files ?? new ChangeTrackingList(), + protectedFiles ?? new ChangeTrackingList(), + package, + rootFile, + 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(NginxConfigurationResponseProperties)} does not support writing '{options.Format}' format."); + } + } + + NginxConfigurationResponseProperties 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 DeserializeNginxConfigurationResponseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxConfigurationResponseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.cs new file mode 100644 index 0000000000000..fbb45f8aca0df --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxConfigurationResponseProperties.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxConfigurationResponseProperties. + public partial class NginxConfigurationResponseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NginxConfigurationResponseProperties() + { + Files = new ChangeTrackingList(); + ProtectedFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// Keeps track of any properties unknown to the library. + internal NginxConfigurationResponseProperties(NginxProvisioningState? provisioningState, IReadOnlyList files, IReadOnlyList protectedFiles, NginxConfigurationPackage package, string rootFile, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Files = files; + ProtectedFiles = protectedFiles; + Package = package; + RootFile = rootFile; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the provisioning state. + public NginxProvisioningState? ProvisioningState { get; } + /// Gets the files. + public IReadOnlyList Files { get; } + /// Gets the protected files. + public IReadOnlyList ProtectedFiles { get; } + /// Gets the package. + public NginxConfigurationPackage Package { get; } + /// Gets the root file. + public string RootFile { get; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.Serialization.cs new file mode 100644 index 0000000000000..4d28548f33315 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.Serialization.cs @@ -0,0 +1,154 @@ +// 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.Models; + +namespace Azure.ResourceManager.Nginx.Models +{ + public partial class NginxDeploymentApiKeyCreateOrUpdateContent : 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 override 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(NginxDeploymentApiKeyCreateOrUpdateContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NginxDeploymentApiKeyCreateOrUpdateContent 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(NginxDeploymentApiKeyCreateOrUpdateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxDeploymentApiKeyCreateOrUpdateContent(document.RootElement, options); + } + + internal static NginxDeploymentApiKeyCreateOrUpdateContent DeserializeNginxDeploymentApiKeyCreateOrUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NginxDeploymentApiKeyRequestProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NginxDeploymentApiKeyRequestProperties.DeserializeNginxDeploymentApiKeyRequestProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxDeploymentApiKeyCreateOrUpdateContent( + id, + name, + type, + systemData, + properties, + 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(NginxDeploymentApiKeyCreateOrUpdateContent)} does not support writing '{options.Format}' format."); + } + } + + NginxDeploymentApiKeyCreateOrUpdateContent 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 DeserializeNginxDeploymentApiKeyCreateOrUpdateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxDeploymentApiKeyCreateOrUpdateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.cs new file mode 100644 index 0000000000000..ebeb32b6260eb --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyCreateOrUpdateContent.cs @@ -0,0 +1,71 @@ +// 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.Models; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxDeploymentApiKeyCreateOrUpdateContent. + public partial class NginxDeploymentApiKeyCreateOrUpdateContent : ResourceData + { + /// + /// 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 NginxDeploymentApiKeyCreateOrUpdateContent() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Keeps track of any properties unknown to the library. + internal NginxDeploymentApiKeyCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NginxDeploymentApiKeyRequestProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the properties. + public NginxDeploymentApiKeyRequestProperties Properties { get; set; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.Serialization.cs new file mode 100644 index 0000000000000..ea2192f0cf844 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.Serialization.cs @@ -0,0 +1,154 @@ +// 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.Nginx.Models +{ + internal partial class NginxDeploymentApiKeyListResponse : 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(NginxDeploymentApiKeyListResponse)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + 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 + } + } + } + + NginxDeploymentApiKeyListResponse 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(NginxDeploymentApiKeyListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxDeploymentApiKeyListResponse(document.RootElement, options); + } + + internal static NginxDeploymentApiKeyListResponse DeserializeNginxDeploymentApiKeyListResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxDeploymentApiKeyListResponse(value ?? new ChangeTrackingList(), nextLink, 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(NginxDeploymentApiKeyListResponse)} does not support writing '{options.Format}' format."); + } + } + + NginxDeploymentApiKeyListResponse 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 DeserializeNginxDeploymentApiKeyListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxDeploymentApiKeyListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.cs new file mode 100644 index 0000000000000..090ddc3a210d6 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyListResponse.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxDeploymentApiKeyListResponse. + internal partial class NginxDeploymentApiKeyListResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NginxDeploymentApiKeyListResponse() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal NginxDeploymentApiKeyListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.Serialization.cs new file mode 100644 index 0000000000000..46fbe9a2ae91f --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Nginx.Models +{ + public partial class NginxDeploymentApiKeyRequestProperties : 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(NginxDeploymentApiKeyRequestProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SecretText)) + { + writer.WritePropertyName("secretText"u8); + writer.WriteStringValue(SecretText); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + 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 + } + } + } + + NginxDeploymentApiKeyRequestProperties 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(NginxDeploymentApiKeyRequestProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxDeploymentApiKeyRequestProperties(document.RootElement, options); + } + + internal static NginxDeploymentApiKeyRequestProperties DeserializeNginxDeploymentApiKeyRequestProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretText = default; + DateTimeOffset? endDateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretText"u8)) + { + secretText = property.Value.GetString(); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxDeploymentApiKeyRequestProperties(secretText, endDateTime, 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(NginxDeploymentApiKeyRequestProperties)} does not support writing '{options.Format}' format."); + } + } + + NginxDeploymentApiKeyRequestProperties 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 DeserializeNginxDeploymentApiKeyRequestProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxDeploymentApiKeyRequestProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.cs new file mode 100644 index 0000000000000..87daab6705481 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyRequestProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxDeploymentApiKeyRequestProperties. + public partial class NginxDeploymentApiKeyRequestProperties + { + /// + /// 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 NginxDeploymentApiKeyRequestProperties() + { + } + + /// Initializes a new instance of . + /// Secret text to be used as a Dataplane API Key. This is a write only property that can never be read back, but the first three characters will be returned in the 'hint' property. + /// The time after which this Dataplane API Key is no longer valid. + /// Keeps track of any properties unknown to the library. + internal NginxDeploymentApiKeyRequestProperties(string secretText, DateTimeOffset? endOn, IDictionary serializedAdditionalRawData) + { + SecretText = secretText; + EndOn = endOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Secret text to be used as a Dataplane API Key. This is a write only property that can never be read back, but the first three characters will be returned in the 'hint' property. + public string SecretText { get; set; } + /// The time after which this Dataplane API Key is no longer valid. + public DateTimeOffset? EndOn { get; set; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.Serialization.cs new file mode 100644 index 0000000000000..ed6d896fba3a3 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Nginx.Models +{ + public partial class NginxDeploymentApiKeyResponseProperties : 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(NginxDeploymentApiKeyResponseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Hint)) + { + writer.WritePropertyName("hint"u8); + writer.WriteStringValue(Hint); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endDateTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + 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 + } + } + } + + NginxDeploymentApiKeyResponseProperties 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(NginxDeploymentApiKeyResponseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxDeploymentApiKeyResponseProperties(document.RootElement, options); + } + + internal static NginxDeploymentApiKeyResponseProperties DeserializeNginxDeploymentApiKeyResponseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hint = default; + DateTimeOffset? endDateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hint"u8)) + { + hint = property.Value.GetString(); + continue; + } + if (property.NameEquals("endDateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endDateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxDeploymentApiKeyResponseProperties(hint, endDateTime, 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(NginxDeploymentApiKeyResponseProperties)} does not support writing '{options.Format}' format."); + } + } + + NginxDeploymentApiKeyResponseProperties 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 DeserializeNginxDeploymentApiKeyResponseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxDeploymentApiKeyResponseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.cs new file mode 100644 index 0000000000000..6ed4254f92c39 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentApiKeyResponseProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Nginx.Models +{ + /// The NginxDeploymentApiKeyResponseProperties. + public partial class NginxDeploymentApiKeyResponseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NginxDeploymentApiKeyResponseProperties() + { + } + + /// Initializes a new instance of . + /// The first three characters of the secret text to help identify it in use. This property is read-only. + /// The time after which this Dataplane API Key is no longer valid. + /// Keeps track of any properties unknown to the library. + internal NginxDeploymentApiKeyResponseProperties(string hint, DateTimeOffset? endOn, IDictionary serializedAdditionalRawData) + { + Hint = hint; + EndOn = endOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The first three characters of the secret text to help identify it in use. This property is read-only. + public string Hint { get; } + /// The time after which this Dataplane API Key is no longer valid. + public DateTimeOffset? EndOn { get; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.Serialization.cs index 1524b2c5091d0..a50ffaebce0d5 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.Serialization.cs @@ -44,11 +44,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("nginxVersion"u8); writer.WriteStringValue(NginxVersion); } - if (Optional.IsDefined(ManagedResourceGroup)) - { - writer.WritePropertyName("managedResourceGroup"u8); - writer.WriteStringValue(ManagedResourceGroup); - } if (Optional.IsDefined(NetworkProfile)) { writer.WritePropertyName("networkProfile"u8); @@ -89,6 +84,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("nginxAppProtect"u8); writer.WriteObjectValue(NginxAppProtect, options); } + if (options.Format != "W" && Optional.IsDefined(DataplaneApiEndpoint)) + { + writer.WritePropertyName("dataplaneApiEndpoint"u8); + writer.WriteStringValue(DataplaneApiEndpoint); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -128,7 +128,6 @@ internal static NginxDeploymentProperties DeserializeNginxDeploymentProperties(J } NginxProvisioningState? provisioningState = default; string nginxVersion = default; - string managedResourceGroup = default; NginxNetworkProfile networkProfile = default; string ipAddress = default; bool? enableDiagnosticsSupport = default; @@ -137,6 +136,7 @@ internal static NginxDeploymentProperties DeserializeNginxDeploymentProperties(J AutoUpgradeProfile autoUpgradeProfile = default; NginxDeploymentUserProfile userProfile = default; NginxDeploymentPropertiesNginxAppProtect nginxAppProtect = default; + string dataplaneApiEndpoint = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -155,11 +155,6 @@ internal static NginxDeploymentProperties DeserializeNginxDeploymentProperties(J nginxVersion = property.Value.GetString(); continue; } - if (property.NameEquals("managedResourceGroup"u8)) - { - managedResourceGroup = property.Value.GetString(); - continue; - } if (property.NameEquals("networkProfile"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -228,6 +223,11 @@ internal static NginxDeploymentProperties DeserializeNginxDeploymentProperties(J nginxAppProtect = NginxDeploymentPropertiesNginxAppProtect.DeserializeNginxDeploymentPropertiesNginxAppProtect(property.Value, options); continue; } + if (property.NameEquals("dataplaneApiEndpoint"u8)) + { + dataplaneApiEndpoint = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -237,7 +237,6 @@ internal static NginxDeploymentProperties DeserializeNginxDeploymentProperties(J return new NginxDeploymentProperties( provisioningState, nginxVersion, - managedResourceGroup, networkProfile, ipAddress, enableDiagnosticsSupport, @@ -246,6 +245,7 @@ internal static NginxDeploymentProperties DeserializeNginxDeploymentProperties(J autoUpgradeProfile, userProfile, nginxAppProtect, + dataplaneApiEndpoint, serializedAdditionalRawData); } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.cs index cd641611d91fc..42a740e140e19 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentProperties.cs @@ -53,7 +53,6 @@ public NginxDeploymentProperties() /// Initializes a new instance of . /// /// - /// The managed resource group to deploy VNet injection related network resources. /// /// The IP address of the deployment. /// @@ -62,12 +61,12 @@ public NginxDeploymentProperties() /// Autoupgrade settings of a deployment. /// /// Settings for NGINX App Protect (NAP). + /// Dataplane API endpoint for the caller to update the NGINX state of the deployment. /// Keeps track of any properties unknown to the library. - internal NginxDeploymentProperties(NginxProvisioningState? provisioningState, string nginxVersion, string managedResourceGroup, NginxNetworkProfile networkProfile, string ipAddress, bool? enableDiagnosticsSupport, NginxLogging logging, NginxDeploymentScalingProperties scalingProperties, AutoUpgradeProfile autoUpgradeProfile, NginxDeploymentUserProfile userProfile, NginxDeploymentPropertiesNginxAppProtect nginxAppProtect, IDictionary serializedAdditionalRawData) + internal NginxDeploymentProperties(NginxProvisioningState? provisioningState, string nginxVersion, NginxNetworkProfile networkProfile, string ipAddress, bool? enableDiagnosticsSupport, NginxLogging logging, NginxDeploymentScalingProperties scalingProperties, AutoUpgradeProfile autoUpgradeProfile, NginxDeploymentUserProfile userProfile, NginxDeploymentPropertiesNginxAppProtect nginxAppProtect, string dataplaneApiEndpoint, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; NginxVersion = nginxVersion; - ManagedResourceGroup = managedResourceGroup; NetworkProfile = networkProfile; IPAddress = ipAddress; EnableDiagnosticsSupport = enableDiagnosticsSupport; @@ -76,6 +75,7 @@ internal NginxDeploymentProperties(NginxProvisioningState? provisioningState, st AutoUpgradeProfile = autoUpgradeProfile; UserProfile = userProfile; NginxAppProtect = nginxAppProtect; + DataplaneApiEndpoint = dataplaneApiEndpoint; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -83,8 +83,6 @@ internal NginxDeploymentProperties(NginxProvisioningState? provisioningState, st public NginxProvisioningState? ProvisioningState { get; } /// Gets the nginx version. public string NginxVersion { get; } - /// The managed resource group to deploy VNet injection related network resources. - public string ManagedResourceGroup { get; set; } /// Gets or sets the network profile. public NginxNetworkProfile NetworkProfile { get; set; } /// The IP address of the deployment. @@ -132,5 +130,7 @@ public string UserPreferredEmail /// Settings for NGINX App Protect (NAP). public NginxDeploymentPropertiesNginxAppProtect NginxAppProtect { get; set; } + /// Dataplane API endpoint for the caller to update the NGINX state of the deployment. + public string DataplaneApiEndpoint { get; } } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.Serialization.cs index 92c123e4ce454..0020df814b07f 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("userProfile"u8); writer.WriteObjectValue(UserProfile, options); } + if (Optional.IsDefined(NetworkProfile)) + { + writer.WritePropertyName("networkProfile"u8); + writer.WriteObjectValue(NetworkProfile, options); + } if (Optional.IsDefined(AutoUpgradeProfile)) { writer.WritePropertyName("autoUpgradeProfile"u8); @@ -105,6 +110,7 @@ internal static NginxDeploymentUpdateProperties DeserializeNginxDeploymentUpdate NginxLogging logging = default; NginxDeploymentScalingProperties scalingProperties = default; NginxDeploymentUserProfile userProfile = default; + NginxNetworkProfile networkProfile = default; AutoUpgradeProfile autoUpgradeProfile = default; NginxDeploymentUpdatePropertiesNginxAppProtect nginxAppProtect = default; IDictionary serializedAdditionalRawData = default; @@ -147,6 +153,15 @@ internal static NginxDeploymentUpdateProperties DeserializeNginxDeploymentUpdate userProfile = NginxDeploymentUserProfile.DeserializeNginxDeploymentUserProfile(property.Value, options); continue; } + if (property.NameEquals("networkProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkProfile = NginxNetworkProfile.DeserializeNginxNetworkProfile(property.Value, options); + continue; + } if (property.NameEquals("autoUpgradeProfile"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -176,6 +191,7 @@ internal static NginxDeploymentUpdateProperties DeserializeNginxDeploymentUpdate logging, scalingProperties, userProfile, + networkProfile, autoUpgradeProfile, nginxAppProtect, serializedAdditionalRawData); diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.cs index 7eb179d4605c1..3c2759835cf0d 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/Models/NginxDeploymentUpdateProperties.cs @@ -55,15 +55,17 @@ public NginxDeploymentUpdateProperties() /// /// Information on how the deployment will be scaled. /// + /// /// Autoupgrade settings of a deployment. /// Update settings for NGINX App Protect (NAP). /// Keeps track of any properties unknown to the library. - internal NginxDeploymentUpdateProperties(bool? enableDiagnosticsSupport, NginxLogging logging, NginxDeploymentScalingProperties scalingProperties, NginxDeploymentUserProfile userProfile, AutoUpgradeProfile autoUpgradeProfile, NginxDeploymentUpdatePropertiesNginxAppProtect nginxAppProtect, IDictionary serializedAdditionalRawData) + internal NginxDeploymentUpdateProperties(bool? enableDiagnosticsSupport, NginxLogging logging, NginxDeploymentScalingProperties scalingProperties, NginxDeploymentUserProfile userProfile, NginxNetworkProfile networkProfile, AutoUpgradeProfile autoUpgradeProfile, NginxDeploymentUpdatePropertiesNginxAppProtect nginxAppProtect, IDictionary serializedAdditionalRawData) { EnableDiagnosticsSupport = enableDiagnosticsSupport; Logging = logging; ScalingProperties = scalingProperties; UserProfile = userProfile; + NetworkProfile = networkProfile; AutoUpgradeProfile = autoUpgradeProfile; NginxAppProtect = nginxAppProtect; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -101,6 +103,8 @@ public string UserPreferredEmail } } + /// Gets or sets the network profile. + public NginxNetworkProfile NetworkProfile { get; set; } /// Autoupgrade settings of a deployment. internal AutoUpgradeProfile AutoUpgradeProfile { get; set; } /// Channel used for autoupgrade. diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateCollection.cs index fd81de614994c..c59f891dfa08b 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateCollection.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string ce /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string certificateName, Ca /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string certificateName, Ca /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string certificateName, CancellationToken c /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.cs index f7ea5ec83423a..24dacf4764074 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationCollection.cs index eeeb014bdcad1..058253f9cafc6 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationCollection.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationCollection.cs @@ -14,6 +14,7 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.Nginx.Models; namespace Azure.ResourceManager.Nginx { @@ -64,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -74,21 +75,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. - /// The NGINX configuration. + /// The NGINX configuration. /// 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 configurationName, NginxConfigurationData data, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string configurationName, NginxConfigurationCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _nginxConfigurationConfigurationsClientDiagnostics.CreateScope("NginxConfigurationCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _nginxConfigurationConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken).ConfigureAwait(false); - var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _nginxConfigurationConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, content, cancellationToken).ConfigureAwait(false); + var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -123,21 +124,21 @@ public virtual async Task> CreateOrUpda /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. - /// The NGINX configuration. + /// The NGINX configuration. /// 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 configurationName, NginxConfigurationData data, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string configurationName, NginxConfigurationCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _nginxConfigurationConfigurationsClientDiagnostics.CreateScope("NginxConfigurationCollection.CreateOrUpdate"); scope.Start(); try { - var response = _nginxConfigurationConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken); - var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _nginxConfigurationConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, content, cancellationToken); + var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -207,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -252,7 +253,7 @@ public virtual Response Get(string configurationName /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -282,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -312,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -355,7 +356,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -398,7 +399,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -443,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.Serialization.cs index 0e21c99590d64..e109b2ca2d527 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.Serialization.cs @@ -42,11 +42,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } } NginxConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -69,8 +64,7 @@ internal static NginxConfigurationData DeserializeNginxConfigurationData(JsonEle { return null; } - NginxConfigurationProperties properties = default; - AzureLocation? location = default; + NginxConfigurationResponseProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -85,16 +79,7 @@ internal static NginxConfigurationData DeserializeNginxConfigurationData(JsonEle { continue; } - properties = NginxConfigurationProperties.DeserializeNginxConfigurationProperties(property.Value, options); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); + properties = NginxConfigurationResponseProperties.DeserializeNginxConfigurationResponseProperties(property.Value, options); continue; } if (property.NameEquals("id"u8)) @@ -133,7 +118,6 @@ internal static NginxConfigurationData DeserializeNginxConfigurationData(JsonEle type, systemData, properties, - location, serializedAdditionalRawData); } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.cs index cfece67294e1b..6bb551bb5a9ea 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationData.cs @@ -49,7 +49,7 @@ public partial class NginxConfigurationData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public NginxConfigurationData() + internal NginxConfigurationData() { } @@ -59,18 +59,14 @@ public NginxConfigurationData() /// The resourceType. /// The systemData. /// - /// /// Keeps track of any properties unknown to the library. - internal NginxConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NginxConfigurationProperties properties, AzureLocation? location, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal NginxConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NginxConfigurationResponseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; - Location = location; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the properties. - public NginxConfigurationProperties Properties { get; set; } - /// Gets or sets the location. - public AzureLocation? Location { get; set; } + /// Gets the properties. + public NginxConfigurationResponseProperties Properties { get; } } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.cs index 802995b6b8e1d..83f3fa796ac64 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -275,19 +275,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The NGINX configuration. + /// The NGINX configuration. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, NginxConfigurationData data, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NginxConfigurationCreateOrUpdateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _nginxConfigurationConfigurationsClientDiagnostics.CreateScope("NginxConfigurationResource.Update"); scope.Start(); try { - var response = await _nginxConfigurationConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _nginxConfigurationConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -321,19 +321,19 @@ public virtual async Task> UpdateAsync( /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The NGINX configuration. + /// The NGINX configuration. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, NginxConfigurationData data, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NginxConfigurationCreateOrUpdateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); using var scope = _nginxConfigurationConfigurationsClientDiagnostics.CreateScope("NginxConfigurationResource.Update"); scope.Start(); try { - var response = _nginxConfigurationConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _nginxConfigurationConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new NginxArmOperation(new NginxConfigurationOperationSource(Client), _nginxConfigurationConfigurationsClientDiagnostics, Pipeline, _nginxConfigurationConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> AnalysisAsync(NginxAnal /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyCollection.cs new file mode 100644 index 0000000000000..2c19040c5561c --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyCollection.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Nginx.Models; + +namespace Azure.ResourceManager.Nginx +{ + /// + /// 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 GetNginxDeploymentApiKeys method from an instance of . + /// + public partial class NginxDeploymentApiKeyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _nginxDeploymentApiKeyApiKeysClientDiagnostics; + private readonly ApiKeysRestOperations _nginxDeploymentApiKeyApiKeysRestClient; + + /// Initializes a new instance of the class for mocking. + protected NginxDeploymentApiKeyCollection() + { + } + + /// 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 NginxDeploymentApiKeyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _nginxDeploymentApiKeyApiKeysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Nginx", NginxDeploymentApiKeyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NginxDeploymentApiKeyResource.ResourceType, out string nginxDeploymentApiKeyApiKeysApiVersion); + _nginxDeploymentApiKeyApiKeysRestClient = new ApiKeysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, nginxDeploymentApiKeyApiKeysApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NginxDeploymentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NginxDeploymentResource.ResourceType), nameof(id)); + } + + /// + /// Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource name of the API key. + /// The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. + /// 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 apiKeyName, NginxDeploymentApiKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, content, cancellationToken).ConfigureAwait(false); + var uri = _nginxDeploymentApiKeyApiKeysRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, content); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NginxArmOperation(Response.FromValue(new NginxDeploymentApiKeyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource name of the API key. + /// The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. + /// 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 apiKeyName, NginxDeploymentApiKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, content, cancellationToken); + var uri = _nginxDeploymentApiKeyApiKeysRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, content); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NginxArmOperation(Response.FromValue(new NginxDeploymentApiKeyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified API Key of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.Get"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NginxDeploymentApiKeyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified API Key of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.Get"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NginxDeploymentApiKeyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all API Keys of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys + /// + /// + /// Operation Id + /// ApiKeys_List + /// + /// + /// Default Api Version + /// 2024-11-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) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _nginxDeploymentApiKeyApiKeysRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nginxDeploymentApiKeyApiKeysRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NginxDeploymentApiKeyResource(Client, NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(e)), _nginxDeploymentApiKeyApiKeysClientDiagnostics, Pipeline, "NginxDeploymentApiKeyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all API Keys of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys + /// + /// + /// Operation Id + /// ApiKeys_List + /// + /// + /// Default Api Version + /// 2024-11-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) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _nginxDeploymentApiKeyApiKeysRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nginxDeploymentApiKeyApiKeysRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NginxDeploymentApiKeyResource(Client, NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(e)), _nginxDeploymentApiKeyApiKeysClientDiagnostics, Pipeline, "NginxDeploymentApiKeyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.Exists"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.Exists"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NginxDeploymentApiKeyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, apiKeyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NginxDeploymentApiKeyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.Serialization.cs new file mode 100644 index 0000000000000..9d23f152ead72 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.Nginx.Models; + +namespace Azure.ResourceManager.Nginx +{ + public partial class NginxDeploymentApiKeyData : 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 override 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(NginxDeploymentApiKeyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NginxDeploymentApiKeyData 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(NginxDeploymentApiKeyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNginxDeploymentApiKeyData(document.RootElement, options); + } + + internal static NginxDeploymentApiKeyData DeserializeNginxDeploymentApiKeyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NginxDeploymentApiKeyResponseProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NginxDeploymentApiKeyResponseProperties.DeserializeNginxDeploymentApiKeyResponseProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NginxDeploymentApiKeyData( + id, + name, + type, + systemData, + properties, + 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(NginxDeploymentApiKeyData)} does not support writing '{options.Format}' format."); + } + } + + NginxDeploymentApiKeyData 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 DeserializeNginxDeploymentApiKeyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NginxDeploymentApiKeyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.cs new file mode 100644 index 0000000000000..dea73c73e84fe --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyData.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Nginx.Models; + +namespace Azure.ResourceManager.Nginx +{ + /// A class representing the NginxDeploymentApiKey data model. + public partial class NginxDeploymentApiKeyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NginxDeploymentApiKeyData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Keeps track of any properties unknown to the library. + internal NginxDeploymentApiKeyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NginxDeploymentApiKeyResponseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the properties. + public NginxDeploymentApiKeyResponseProperties Properties { get; } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs new file mode 100644 index 0000000000000..8ccf8ade328fb --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.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.Nginx +{ + public partial class NginxDeploymentApiKeyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NginxDeploymentApiKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NginxDeploymentApiKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.cs new file mode 100644 index 0000000000000..34156f1d23524 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Nginx.Models; + +namespace Azure.ResourceManager.Nginx +{ + /// + /// A Class representing a NginxDeploymentApiKey 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 GetNginxDeploymentApiKeyResource method. + /// Otherwise you can get one from its parent resource using the GetNginxDeploymentApiKey method. + /// + public partial class NginxDeploymentApiKeyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The deploymentName. + /// The apiKeyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _nginxDeploymentApiKeyApiKeysClientDiagnostics; + private readonly ApiKeysRestOperations _nginxDeploymentApiKeyApiKeysRestClient; + private readonly NginxDeploymentApiKeyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Nginx.NginxPlus/nginxDeployments/apiKeys"; + + /// Initializes a new instance of the class for mocking. + protected NginxDeploymentApiKeyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NginxDeploymentApiKeyResource(ArmClient client, NginxDeploymentApiKeyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// 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 NginxDeploymentApiKeyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _nginxDeploymentApiKeyApiKeysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Nginx", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string nginxDeploymentApiKeyApiKeysApiVersion); + _nginxDeploymentApiKeyApiKeysRestClient = new ApiKeysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, nginxDeploymentApiKeyApiKeysApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NginxDeploymentApiKeyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the specified API Key of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyResource.Get"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.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 NginxDeploymentApiKeyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified API Key of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyResource.Get"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NginxDeploymentApiKeyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete API key for Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Delete + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyResource.Delete"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _nginxDeploymentApiKeyApiKeysRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NginxArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete API key for Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Delete + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyResource.Delete"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _nginxDeploymentApiKeyApiKeysRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NginxArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NginxDeploymentApiKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyResource.Update"); + scope.Start(); + try + { + var response = await _nginxDeploymentApiKeyApiKeysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var uri = _nginxDeploymentApiKeyApiKeysRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NginxArmOperation(Response.FromValue(new NginxDeploymentApiKeyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NginxDeploymentApiKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _nginxDeploymentApiKeyApiKeysClientDiagnostics.CreateScope("NginxDeploymentApiKeyResource.Update"); + scope.Start(); + try + { + var response = _nginxDeploymentApiKeyApiKeysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var uri = _nginxDeploymentApiKeyApiKeysRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NginxArmOperation(Response.FromValue(new NginxDeploymentApiKeyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentCollection.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentCollection.cs index 559ad26e7e131..cd9bd9f13b7b5 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentCollection.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string dep /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string deploymentName, Canc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string deploymentName, Can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string deploymentName, CancellationToken ca /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.cs index 6b9ee7c0659a1..04a7ce73d44af 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.cs @@ -90,6 +90,75 @@ 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 NginxDeploymentApiKeyResources in the NginxDeployment. + /// An object representing collection of NginxDeploymentApiKeyResources and their operations over a NginxDeploymentApiKeyResource. + public virtual NginxDeploymentApiKeyCollection GetNginxDeploymentApiKeys() + { + return GetCachedClient(client => new NginxDeploymentApiKeyCollection(client, Id)); + } + + /// + /// Get the specified API Key of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNginxDeploymentApiKeyAsync(string apiKeyName, CancellationToken cancellationToken = default) + { + return await GetNginxDeploymentApiKeys().GetAsync(apiKeyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the specified API Key of the given Nginx deployment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName} + /// + /// + /// Operation Id + /// ApiKeys_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource name of the API key. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNginxDeploymentApiKey(string apiKeyName, CancellationToken cancellationToken = default) + { + return GetNginxDeploymentApiKeys().Get(apiKeyName, cancellationToken); + } + /// Gets a collection of NginxCertificateResources in the NginxDeployment. /// An object representing collection of NginxCertificateResources and their operations over a NginxCertificateResource. public virtual NginxCertificateCollection GetNginxCertificates() @@ -110,7 +179,7 @@ public virtual NginxCertificateCollection GetNginxCertificates() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -141,7 +210,7 @@ public virtual async Task> GetNginxCertificat /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -179,7 +248,7 @@ public virtual NginxConfigurationCollection GetNginxConfigurations() /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -210,7 +279,7 @@ public virtual async Task> GetNginxConfigur /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -241,7 +310,7 @@ public virtual Response GetNginxConfiguration(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -281,7 +350,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -321,7 +390,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -363,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -405,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -451,7 +520,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -497,7 +566,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -559,7 +628,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -621,7 +690,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -678,7 +747,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -735,7 +804,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource @@ -795,7 +864,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ApiKeysRestOperations.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ApiKeysRestOperations.cs new file mode 100644 index 0000000000000..0321d05fc3889 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ApiKeysRestOperations.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Nginx.Models; + +namespace Azure.ResourceManager.Nginx +{ + internal partial class ApiKeysRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiKeysRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ApiKeysRestOperations(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 ?? "2024-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName, NginxDeploymentApiKeyCreateOrUpdateContent content) + { + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys/", false); + uri.AppendPath(apiKeyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName, NginxDeploymentApiKeyCreateOrUpdateContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys/", false); + uri.AppendPath(apiKeyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The resource name of the API key. + /// The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. + /// 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 deploymentName, string apiKeyName, NginxDeploymentApiKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, deploymentName, apiKeyName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + NginxDeploymentApiKeyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The resource name of the API key. + /// The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. + /// 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 deploymentName, string apiKeyName, NginxDeploymentApiKeyCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, deploymentName, apiKeyName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + NginxDeploymentApiKeyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) + { + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys/", false); + uri.AppendPath(apiKeyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys/", false); + uri.AppendPath(apiKeyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete API key for Nginx deployment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The resource name of the API key. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete API key for Nginx deployment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The resource name of the API key. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) + { + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys/", false); + uri.AppendPath(apiKeyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string deploymentName, string apiKeyName) + { + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys/", false); + uri.AppendPath(apiKeyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the specified API Key of the given Nginx deployment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The resource name of the API key. + /// 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 deploymentName, string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NginxDeploymentApiKeyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NginxDeploymentApiKeyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the specified API Key of the given Nginx deployment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The resource name of the API key. + /// 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 deploymentName, string apiKeyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNullOrEmpty(apiKeyName, nameof(apiKeyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, deploymentName, apiKeyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NginxDeploymentApiKeyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NginxDeploymentApiKeyData.DeserializeNginxDeploymentApiKeyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NginxDeploymentApiKeyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string deploymentName) + { + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string deploymentName) + { + 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/Nginx.NginxPlus/nginxDeployments/", false); + uri.AppendPath(deploymentName, true); + uri.AppendPath("/apiKeys", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all API Keys of the given Nginx deployment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, deploymentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NginxDeploymentApiKeyListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NginxDeploymentApiKeyListResponse.DeserializeNginxDeploymentApiKeyListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Keys of the given Nginx deployment. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NginxDeploymentApiKeyListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NginxDeploymentApiKeyListResponse.DeserializeNginxDeploymentApiKeyListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string deploymentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string deploymentName) + { + 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 all API Keys of the given Nginx deployment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, deploymentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NginxDeploymentApiKeyListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NginxDeploymentApiKeyListResponse.DeserializeNginxDeploymentApiKeyListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Keys of the given Nginx deployment. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of targeted NGINX deployment. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, deploymentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NginxDeploymentApiKeyListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NginxDeploymentApiKeyListResponse.DeserializeNginxDeploymentApiKeyListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/CertificatesRestOperations.cs index b205036d6b376..8d96e8f3b35e6 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -32,7 +32,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a certificate of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of certificate. @@ -108,7 +108,7 @@ public async Task> GetAsync(string subscriptionId } /// Get a certificate of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of certificate. @@ -183,7 +183,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update the NGINX certificates for given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of certificate. @@ -212,7 +212,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update the NGINX certificates for given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of certificate. @@ -279,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a certificate from the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of certificate. @@ -307,7 +307,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a certificate from the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of certificate. @@ -371,7 +371,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List all certificates of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -400,7 +400,7 @@ public async Task> ListAsync(string subsc } /// List all certificates of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -452,7 +452,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List all certificates of given NGINX deployment. /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -483,7 +483,7 @@ public async Task> ListNextPageAsync(stri /// List all certificates of given NGINX deployment. /// 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 name of targeted NGINX deployment. /// The cancellation token to use. diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ConfigurationsRestOperations.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ConfigurationsRestOperations.cs index e4f07f4f95a1f..0124ae444e9a6 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ConfigurationsRestOperations.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/ConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public ConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,7 +73,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List the NGINX configuration of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> ListAsync(string sub } /// List the NGINX configuration of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -169,7 +169,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the NGINX configuration of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. @@ -202,7 +202,7 @@ public async Task> GetAsync(string subscription } /// Get the NGINX configuration of given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. @@ -234,7 +234,7 @@ public Response Get(string subscriptionId, string resour } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationCreateOrUpdateContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +250,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationCreateOrUpdateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -269,31 +269,31 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } /// Create or update the NGINX configuration for given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. - /// The NGINX configuration. + /// The NGINX configuration. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, deploymentName, configurationName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, deploymentName, configurationName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -306,23 +306,23 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update the NGINX configuration for given NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. - /// The NGINX configuration. + /// The NGINX configuration. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string deploymentName, string configurationName, NginxConfigurationCreateOrUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, deploymentName, configurationName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, deploymentName, configurationName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -373,7 +373,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Reset the NGINX configuration of given NGINX deployment to default. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. @@ -401,7 +401,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Reset the NGINX configuration of given NGINX deployment to default. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. @@ -476,7 +476,7 @@ internal HttpMessage CreateAnalysisRequest(string subscriptionId, string resourc } /// Analyze an NGINX configuration without applying it to the NGINXaaS deployment. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. @@ -508,7 +508,7 @@ public async Task> AnalysisAsync(string subscripti } /// Analyze an NGINX configuration without applying it to the NGINXaaS deployment. - /// 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 name of targeted NGINX deployment. /// The name of configuration, only 'default' is supported value due to the singleton of NGINX conf. @@ -563,7 +563,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List the NGINX configuration of given NGINX deployment. /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -594,7 +594,7 @@ public async Task> ListNextPageAsync(st /// List the NGINX configuration of given NGINX deployment. /// 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 name of targeted NGINX deployment. /// The cancellation token to use. diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/DeploymentsRestOperations.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/DeploymentsRestOperations.cs index 1726bd0bb6119..d2451cfd1a877 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -32,7 +32,7 @@ public DeploymentsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,7 +71,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -102,7 +102,7 @@ public async Task> GetAsync(string subscriptionId, } /// Get the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -171,7 +171,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The to use. @@ -198,7 +198,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The to use. @@ -263,7 +263,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The to use. @@ -290,7 +290,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update the NGINX deployment. - /// 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 name of targeted NGINX deployment. /// The to use. @@ -351,7 +351,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete the NGINX deployment resource. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -377,7 +377,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete the NGINX deployment resource. - /// 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 name of targeted NGINX deployment. /// The cancellation token to use. @@ -431,7 +431,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// List the NGINX deployments resources. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -456,7 +456,7 @@ public async Task> ListAsync(string subscr } /// List the NGINX deployments resources. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -513,7 +513,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all NGINX deployments under the specified resource group. - /// 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. @@ -540,7 +540,7 @@ public async Task> ListByResourceGroupAsyn } /// List all NGINX deployments under the specified resource group. - /// 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. @@ -590,7 +590,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List the NGINX deployments resources. /// 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 an empty string, and was expected to be non-empty. @@ -617,7 +617,7 @@ public async Task> ListNextPageAsync(strin /// List the NGINX deployments resources. /// 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 an empty string, and was expected to be non-empty. @@ -666,7 +666,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all NGINX deployments under the specified 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. @@ -695,7 +695,7 @@ public async Task> ListByResourceGroupNext /// List all NGINX deployments under the specified 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. diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/autorest.md b/sdk/nginx/Azure.ResourceManager.Nginx/src/autorest.md index 04063bef3c563..53f36ef1d0c3a 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/autorest.md +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: Nginx namespace: Azure.ResourceManager.Nginx -require: https://github.com/Azure/azure-rest-api-specs/blob/eea7584434f9225cad0327d83d5c6d84257a4d7d/specification/nginx/resource-manager/readme.md -tag: package-2024-06-01-preview +require: https://github.com/Azure/azure-rest-api-specs/blob/7a3f210cf6924c6139e2493f5fd0625919af1f32/specification/nginx/resource-manager/readme.md +tag: package-2024-11-01-preview output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -31,6 +31,12 @@ rename-mapping: AnalysisCreateConfig: NginxAnalysisConfig NginxCertificateErrorResponseBody: NginxCertificateError ActivationState : WebApplicationFirewallActivationState + AnalysisResultData: NginxAnalysisResultDetails + NginxConfigurationResponse: NginxConfiguration + NginxDeploymentApiKeyResponse: NginxDeploymentApiKey + NginxConfigurationRequestProperties: NginxConfigurationProperties + NginxConfigurationProtectedFileRequest: NginxConfigurationProtectedFileContent + NginxConfigurationProtectedFileResponse: NginxConfigurationProtectedFileResult prepend-rp-prefix: - ProvisioningState diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Helpers/ResourceDataHelper.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Helpers/ResourceDataHelper.cs index dc9d1315d8a13..90540e31b3dc1 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Helpers/ResourceDataHelper.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Helpers/ResourceDataHelper.cs @@ -11,7 +11,7 @@ internal static class ResourceDataHelper public static void AssertTrackedResourceData(TrackedResourceData r1, TrackedResourceData r2) { Assert.AreEqual(r1.Id, r2.Id); - Assert.AreEqual(r1.Name, r2.Name); + Assert.AreEqual(r1.Name.ToLowerInvariant(), r2.Name.ToLowerInvariant()); Assert.AreEqual(r1.ResourceType, r2.ResourceType); Assert.AreEqual(r1.Location, r2.Location); Assert.AreEqual(r1.Tags, r2.Tags); @@ -20,7 +20,7 @@ public static void AssertTrackedResourceData(TrackedResourceData r1, TrackedReso public static void AssertResourceData(ResourceData r1, ResourceData r2) { Assert.AreEqual(r1.Id, r2.Id); - Assert.AreEqual(r1.Name, r2.Name); + Assert.AreEqual(r1.Name.ToLowerInvariant(), r2.Name.ToLowerInvariant()); Assert.AreEqual(r1.ResourceType, r2.ResourceType); } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/NginxManagementTestBase.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/NginxManagementTestBase.cs index 3d8438967af29..af0284aa6b7f8 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/NginxManagementTestBase.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/NginxManagementTestBase.cs @@ -26,6 +26,7 @@ public class NginxManagementTestBase : ManagementRecordedTestBase CreateResourceGroup(SubscriptionResource subscription, string resourceGroupNamePrefix, AzureLocation location) @@ -268,7 +270,7 @@ protected async Task CreateNginxDeployment(ResourceGrou return lro.Value; } - protected async Task CreateNginxConfiguration(AzureLocation location, NginxDeploymentResource nginxDeployment, string nginxConfigurationName, string virtualPath) + protected async Task CreateNginxConfiguration(NginxDeploymentResource nginxDeployment, string nginxConfigurationName, string virtualPath, string protectedFileVirtualPath = null) { if (nginxDeployment == null) { @@ -292,12 +294,21 @@ protected async Task CreateNginxConfiguration(AzureL }; configurationProperties.Files.Add(rootConfigFile); - NginxConfigurationData nginxConfigurationData = new NginxConfigurationData + if (protectedFileVirtualPath != null) + { + NginxConfigurationProtectedFileContent protectedFile = new NginxConfigurationProtectedFileContent + { + Content = NginxConfigurationContent, + VirtualPath = protectedFileVirtualPath + }; + configurationProperties.ProtectedFiles.Add(protectedFile); + } + + NginxConfigurationCreateOrUpdateContent nginxConfigurationCreateOrUpdateContent = new NginxConfigurationCreateOrUpdateContent { - Location = location, Properties = configurationProperties }; - ArmOperation lro = await nginxDeployment.GetNginxConfigurations().CreateOrUpdateAsync(WaitUntil.Completed, nginxConfigurationName, nginxConfigurationData); + ArmOperation lro = await nginxDeployment.GetNginxConfigurations().CreateOrUpdateAsync(WaitUntil.Completed, nginxConfigurationName, nginxConfigurationCreateOrUpdateContent); return lro.Value; } @@ -329,6 +340,33 @@ protected async Task CreateNginxCertificate(AzureLocat return lro.Value; } + protected async Task CreateNginxDeploymentApiKey(NginxDeploymentResource nginxDeployment, string nginxDeploymentApiKeyName) + { + if (nginxDeployment == null) + { + throw new ArgumentNullException(nameof(nginxDeployment)); + } + + if (nginxDeploymentApiKeyName == null) + { + throw new ArgumentNullException(nameof(nginxDeploymentApiKeyName)); + } + + NginxDeploymentApiKeyRequestProperties apiKeyProperties = new NginxDeploymentApiKeyRequestProperties + { + SecretText = NginxDeploymentApiKeySecretText, + EndOn = DateTimeOffset.UtcNow.AddDays(180) + }; + + NginxDeploymentApiKeyCreateOrUpdateContent nginxDeploymentApiKeyCreateOrUpdateContent = new NginxDeploymentApiKeyCreateOrUpdateContent + { + Properties = apiKeyProperties + }; + + ArmOperation lro = await nginxDeployment.GetNginxDeploymentApiKeys().CreateOrUpdateAsync(WaitUntil.Completed, nginxDeploymentApiKeyName, nginxDeploymentApiKeyCreateOrUpdateContent); + return lro.Value; + } + private void IgnoreTestInLiveMode() { if (Mode == RecordedTestMode.Live) diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs index b631658534ffe..b8ce031f9e0ef 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs @@ -56,14 +56,23 @@ public async Task Data() const string certificateVirtualPath = "/etc/nginx/nginx.cert"; const string keyVirtualPath = "/etc/nginx/nginx.key"; NginxCertificateResource nginxCertificate = await CreateNginxCertificate(Location, nginxDeployment, nginxCertificateName, certificateVirtualPath, keyVirtualPath); + ResourceIdentifier nginxCertificateResourceIdentifier = NginxCertificateResource.CreateResourceIdentifier(Subscription.Data.SubscriptionId, ResGroup.Data.Name, nginxDeploymentName, nginxCertificateName); Assert.IsTrue(nginxCertificate.HasData); Assert.NotNull(nginxCertificate.Data); Assert.IsTrue(nginxCertificate.Data.Name.Equals(nginxCertificateName, StringComparison.InvariantCultureIgnoreCase)); + Assert.IsTrue(nginxCertificate.Data.Id.Equals(nginxCertificateResourceIdentifier)); + Assert.IsTrue(nginxCertificate.Data.ResourceType.Equals(NginxCertificateResource.ResourceType)); + Assert.IsNotNull(nginxCertificate.Data.SystemData); + Assert.IsNotNull(nginxCertificate.Data.Location); Assert.IsNotNull(nginxCertificate.Data.Properties.ProvisioningState); Assert.IsTrue(nginxCertificate.Data.Properties.CertificateVirtualPath.Equals(certificateVirtualPath)); Assert.IsTrue(nginxCertificate.Data.Properties.KeyVirtualPath.Equals(keyVirtualPath)); Assert.IsTrue(nginxCertificate.Data.Properties.KeyVaultSecretId.Equals(TestEnvironment.KeyVaultSecretId)); + Assert.IsNotNull(nginxCertificate.Data.Properties.Sha1Thumbprint); + Assert.IsNotNull(nginxCertificate.Data.Properties.KeyVaultSecretVersion); + Assert.IsNotNull(nginxCertificate.Data.Properties.KeyVaultSecretCreated); + Assert.IsNull(nginxCertificate.Data.Properties.CertificateError); } [TestCase] diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationCollectionTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationCollectionTests.cs index 4aaefdd6d49da..972495de5f1e1 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationCollectionTests.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationCollectionTests.cs @@ -4,6 +4,7 @@ using System; using System.Threading.Tasks; using Azure.Core.TestFramework; +using Azure.ResourceManager.Nginx.Models; using Azure.ResourceManager.Nginx.Tests.Helpers; using Azure.ResourceManager.Resources; using NUnit.Framework; @@ -40,16 +41,13 @@ public async Task CreateOrUpdate() const string nginxConfigurationName = "default"; const string virtualPath = "/etc/nginx/nginx.conf"; - NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); Assert.IsTrue(nginxConfigurationName.Equals(nginxConfiguration.Data.Name)); Assert.ThrowsAsync(async () => _ = (await nginxDeployment.GetNginxConfigurations().CreateOrUpdateAsync(WaitUntil.Completed, nginxConfigurationName, null)).Value); - NginxConfigurationData nginxConfigurationData = new NginxConfigurationData - { - Location = Location - }; - Assert.ThrowsAsync(async () => _ = (await nginxDeployment.GetNginxConfigurations().CreateOrUpdateAsync(WaitUntil.Completed, null, nginxConfigurationData)).Value); + NginxConfigurationCreateOrUpdateContent nginxConfigurationCreateOrUpdateContent = new NginxConfigurationCreateOrUpdateContent(); + Assert.ThrowsAsync(async () => _ = (await nginxDeployment.GetNginxConfigurations().CreateOrUpdateAsync(WaitUntil.Completed, null, nginxConfigurationCreateOrUpdateContent)).Value); } [TestCase] @@ -63,7 +61,7 @@ public async Task Exists() const string nginxConfigurationName = "default"; Assert.IsFalse(await collection.ExistsAsync(nginxConfigurationName)); const string virtualPath = "/etc/nginx/nginx.conf"; - _ = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + _ = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); Assert.IsTrue(await collection.ExistsAsync(nginxConfigurationName)); Assert.ThrowsAsync(async () => _ = await collection.ExistsAsync(null)); @@ -82,7 +80,7 @@ public async Task GetIfExists() Assert.False(nginxConfigurationResponse.HasValue); const string virtualPath = "/etc/nginx/nginx.conf"; - NginxConfigurationResource nginxConfiguration1 = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + NginxConfigurationResource nginxConfiguration1 = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); NullableResponse nginxConfigurationResponse2 = await collection.GetIfExistsAsync(nginxConfigurationName); Assert.True(nginxConfigurationResponse2.HasValue); NginxConfigurationResource nginxConfiguration2 = nginxConfigurationResponse2.Value; @@ -90,5 +88,28 @@ public async Task GetIfExists() ResourceDataHelper.AssertResourceData(nginxConfiguration1.Data, nginxConfiguration2.Data); Assert.ThrowsAsync(async () => _ = await collection.GetIfExistsAsync(null)); } + + [TestCase] + [RecordedTest] + public async Task GetAll() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + NginxConfigurationCollection collection = nginxDeployment.GetNginxConfigurations(); + const string nginxConfigurationName = "default"; + const string virtualPath1 = "/etc/nginx/nginx.conf"; + const string virtualPath2 = "/etc/nginx/custom-nginx.conf"; + _ = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath1); + _ = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath2); + + AsyncPageable configurations = collection.GetAllAsync(); + int count = 0; + await foreach (NginxConfigurationResource configuration in configurations) + { + count++; + } + Assert.AreEqual(1, count); + } } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationResourceTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationResourceTests.cs index 0bc3913e3bbeb..0b5dee403ff3b 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationResourceTests.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxConfigurationResourceTests.cs @@ -54,14 +54,26 @@ public async Task Data() const string nginxConfigurationName = "default"; const string virtualPath = "/etc/nginx/nginx.conf"; - NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + const string protectedVirtualPath = "/etc/nginx/protected.conf"; + NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath, protectedVirtualPath); + ResourceIdentifier nginxConfigurationResourceIdentifier = NginxConfigurationResource.CreateResourceIdentifier(Subscription.Data.SubscriptionId, ResGroup.Data.Name, nginxDeploymentName, nginxConfigurationName); Assert.IsTrue(nginxConfiguration.HasData); Assert.NotNull(nginxConfiguration.Data); Assert.IsTrue(nginxConfiguration.Data.Name.Equals(nginxConfigurationName)); + Assert.IsTrue(nginxConfiguration.Data.Id.Equals(nginxConfigurationResourceIdentifier)); + Assert.IsTrue(nginxConfiguration.Data.ResourceType.Equals(NginxConfigurationResource.ResourceType)); + Assert.IsNull(nginxConfiguration.Data.SystemData); Assert.IsNotNull(nginxConfiguration.Data.Properties.ProvisioningState); Assert.True(nginxConfiguration.Data.Properties.RootFile.Equals(virtualPath)); Assert.True(nginxConfiguration.Data.Properties.Files.Count != 0); + Assert.True(nginxConfiguration.Data.Properties.Files[0].VirtualPath.Equals(virtualPath)); + Assert.True(nginxConfiguration.Data.Properties.Files[0].Content.Equals(NginxConfigurationContent)); + Assert.True(nginxConfiguration.Data.Properties.ProtectedFiles.Count != 0); + Assert.True(nginxConfiguration.Data.Properties.ProtectedFiles[0].VirtualPath.Equals(protectedVirtualPath)); + Assert.IsNotNull(nginxConfiguration.Data.Properties.ProtectedFiles[0].ContentHash); + Assert.IsNull(nginxConfiguration.Data.Properties.Package.Data); + Assert.True(nginxConfiguration.Data.Properties.Package.ProtectedFiles.Count == 0); } [TestCase] @@ -73,7 +85,7 @@ public async Task Get() const string nginxConfigurationName = "default"; const string virtualPath = "/etc/nginx/nginx.conf"; - NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); NginxConfigurationResource response = await nginxConfiguration.GetAsync(); ResourceDataHelper.AssertResourceData(nginxConfiguration.Data, response.Data); @@ -89,7 +101,7 @@ public async Task Delete() const string nginxConfigurationName = "default"; const string virtualPath = "/etc/nginx/nginx.conf"; - NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); Assert.IsTrue(await collection.ExistsAsync(nginxConfigurationName)); await nginxConfiguration.DeleteAsync(WaitUntil.Completed); @@ -105,7 +117,7 @@ public async Task Update() const string nginxConfigurationName = "default"; const string virtualPath = "/etc/nginx/nginx.conf"; - NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); NginxConfigurationFile rootConfigFile = new NginxConfigurationFile { @@ -119,15 +131,54 @@ public async Task Update() }; configurationProperties.Files.Add(rootConfigFile); - NginxConfigurationData nginxConfigurationData = new NginxConfigurationData + NginxConfigurationCreateOrUpdateContent nginxConfigurationCreateOrUpdateContent = new NginxConfigurationCreateOrUpdateContent { - Location = Location, Properties = configurationProperties }; - NginxConfigurationResource nginxConfiguration2 = (await nginxConfiguration.UpdateAsync(WaitUntil.Completed, nginxConfigurationData)).Value; + NginxConfigurationResource nginxConfiguration2 = (await nginxConfiguration.UpdateAsync(WaitUntil.Completed, nginxConfigurationCreateOrUpdateContent)).Value; Assert.AreNotEqual(nginxConfiguration.Data.Properties.RootFile, nginxConfiguration2.Data.Properties.RootFile); Assert.ThrowsAsync(async () => _ = (await nginxConfiguration.UpdateAsync(WaitUntil.Completed, null)).Value); } + + [TestCase] + [RecordedTest] + public async Task Analysis() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + const string nginxConfigurationName = "default"; + const string virtualPath = "/etc/nginx/nginx.conf"; + const string protectedFileVirtualPath = "/etc/nginx/protected.conf"; + NginxConfigurationResource nginxConfiguration = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); + + NginxConfigurationFile rootConfigFile = new NginxConfigurationFile + { + Content = NginxConfigurationContent, + VirtualPath = virtualPath + }; + + NginxConfigurationProtectedFileContent protectedFile = new NginxConfigurationProtectedFileContent + { + Content = NginxConfigurationContent, + VirtualPath = protectedFileVirtualPath + }; + + NginxAnalysisConfig nginxAnalysisConfig = new NginxAnalysisConfig + { + RootFile = rootConfigFile.VirtualPath, + }; + nginxAnalysisConfig.Files.Add(rootConfigFile); + nginxAnalysisConfig.ProtectedFiles.Add(protectedFile); + + NginxAnalysisContent nginxAnalysisContent = new NginxAnalysisContent(nginxAnalysisConfig); + NginxAnalysisResult analysisResult = await nginxConfiguration.AnalysisAsync(nginxAnalysisContent); + + Assert.IsNotNull(analysisResult); + Assert.IsNotNull(analysisResult.Status); + Assert.IsNotNull(analysisResult.Data.Errors); + Assert.IsNotNull(analysisResult.Data.Diagnostics); + } } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyCollectionTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyCollectionTests.cs new file mode 100644 index 0000000000000..e34d5cff986c3 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyCollectionTests.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Nginx.Models; +using Azure.ResourceManager.Nginx.Tests.Helpers; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Nginx.Tests.Scenario +{ + internal class NginxDeploymentApiKeyCollectionTests : NginxManagementTestBase + { + protected ResourceGroupResource ResGroup { get; set; } + + public NginxDeploymentApiKeyCollectionTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) + { + } + + public NginxDeploymentApiKeyCollectionTests(bool isAsync) : base(isAsync) + { + } + + [SetUp] + public async Task TestSetUp() + { + if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) + { + ResGroup = await CreateResourceGroup(Subscription, ResourceGroupPrefix, Location); + } + } + + [TestCase] + [RecordedTest] + public async Task CreateOrUpdate() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + + Assert.IsTrue(nginxDeploymentApiKeyName.Equals(nginxDeploymentApiKey.Data.Name)); + Assert.ThrowsAsync(async () => _ = (await nginxDeployment.GetNginxDeploymentApiKeys().CreateOrUpdateAsync(WaitUntil.Completed, nginxDeploymentApiKeyName, null)).Value); + + NginxDeploymentApiKeyRequestProperties apiKeyProperties = new NginxDeploymentApiKeyRequestProperties + { + SecretText = NginxDeploymentApiKeySecretText, + EndOn = DateTimeOffset.UtcNow.AddDays(180) + }; + + NginxDeploymentApiKeyCreateOrUpdateContent nginxDeploymentApiKeyCreateOrUpdateContent = new NginxDeploymentApiKeyCreateOrUpdateContent + { + Properties = apiKeyProperties + }; + Assert.ThrowsAsync(async () => _ = (await nginxDeployment.GetNginxDeploymentApiKeys().CreateOrUpdateAsync(WaitUntil.Completed, null, nginxDeploymentApiKeyCreateOrUpdateContent)).Value); + } + + [TestCase] + [RecordedTest] + public async Task Get() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey1 = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + NginxDeploymentApiKeyResource nginxDeploymentApiKey2 = await collection.GetAsync(nginxDeploymentApiKeyName); + + ResourceDataHelper.AssertResourceData(nginxDeploymentApiKey1.Data, nginxDeploymentApiKey2.Data); + Assert.ThrowsAsync(async () => _ = await collection.GetAsync(nginxDeploymentApiKeyName + "1")); + Assert.ThrowsAsync(async () => _ = await collection.GetAsync(null)); + } + + [TestCase] + [RecordedTest] + public async Task GetAll() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + List nginxDeploymentApiKeys = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(0, nginxDeploymentApiKeys.Count); + + string nginxDeploymentApiKeyName1 = Recording.GenerateAssetName("testDeploymentApiKey-"); + string nginxDeploymentApiKeyName2 = Recording.GenerateAssetName("testDeploymentApiKey-"); + _ = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName1); + _ = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName2); + + nginxDeploymentApiKeys = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(2, nginxDeploymentApiKeys.Count); + } + + [TestCase] + [RecordedTest] + public async Task Exists() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + _ = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + + Assert.IsTrue(await collection.ExistsAsync(nginxDeploymentApiKeyName)); + Assert.IsFalse(await collection.ExistsAsync(nginxDeploymentApiKeyName + "1")); + Assert.ThrowsAsync(async () => _ = await collection.ExistsAsync(null)); + } + + [TestCase] + [RecordedTest] + public async Task GetIfExists() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey1 = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + NullableResponse nginxDeploymentApiKeyResponse = await collection.GetIfExistsAsync(nginxDeploymentApiKeyName); + + Assert.True(nginxDeploymentApiKeyResponse.HasValue); + NginxDeploymentApiKeyResource nginxDeploymentApiKey2 = nginxDeploymentApiKeyResponse.Value; + ResourceDataHelper.AssertResourceData(nginxDeploymentApiKey1.Data, nginxDeploymentApiKey2.Data); + + NullableResponse nginxDeploymentApiKeyResponse2 = await collection.GetIfExistsAsync(nginxDeploymentApiKeyName + "1"); + Assert.False(nginxDeploymentApiKeyResponse2.HasValue); + Assert.ThrowsAsync(async () => _ = await collection.GetIfExistsAsync(null)); + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyResourceTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyResourceTests.cs new file mode 100644 index 0000000000000..da5d1700fbaa1 --- /dev/null +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentApiKeyResourceTests.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Nginx.Models; +using Azure.ResourceManager.Nginx.Tests.Helpers; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Nginx.Tests.Scenario +{ + internal class NginxDeploymentApiKeyResourceTests : NginxManagementTestBase + { + protected ResourceGroupResource ResGroup { get; set; } + + public NginxDeploymentApiKeyResourceTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) + { + } + + public NginxDeploymentApiKeyResourceTests(bool isAsync) : base(isAsync) + { + } + + [SetUp] + public async Task TestSetUp() + { + if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) + { + ResGroup = await CreateResourceGroup(Subscription, ResourceGroupPrefix, Location); + } + } + + [TestCase] + [RecordedTest] + public void CreateResourceIdentifier() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + ResourceIdentifier nginxDeploymentApiKeyResourceIdentifier = NginxDeploymentApiKeyResource.CreateResourceIdentifier(Subscription.Data.SubscriptionId, ResGroup.Data.Name, nginxDeploymentName, nginxDeploymentApiKeyName); + NginxDeploymentApiKeyResource.ValidateResourceId(nginxDeploymentApiKeyResourceIdentifier); + + Assert.IsTrue(nginxDeploymentApiKeyResourceIdentifier.ResourceType.Equals(NginxDeploymentApiKeyResource.ResourceType)); + Assert.Throws(() => NginxDeploymentApiKeyResource.ValidateResourceId(ResGroup.Data.Id)); + } + + [TestCase] + [RecordedTest] + public async Task Data() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + ResourceIdentifier nginxDeploymentApiKeyResourceIdentifier = NginxDeploymentApiKeyResource.CreateResourceIdentifier(Subscription.Data.SubscriptionId, ResGroup.Data.Name, nginxDeploymentName, nginxDeploymentApiKeyName); + + Assert.IsTrue(nginxDeploymentApiKey.HasData); + Assert.NotNull(nginxDeploymentApiKey.Data); + Assert.IsTrue(nginxDeploymentApiKey.Data.Name.Equals(nginxDeploymentApiKeyName, StringComparison.InvariantCultureIgnoreCase)); + Assert.IsTrue(nginxDeploymentApiKey.Data.Id.Equals(nginxDeploymentApiKeyResourceIdentifier)); + Assert.IsTrue(nginxDeploymentApiKey.Data.Id.ResourceType.Equals(NginxDeploymentApiKeyResource.ResourceType)); + Assert.Null(nginxDeploymentApiKey.Data.SystemData); + Assert.NotNull(nginxDeploymentApiKey.Data.Properties.Hint); + Assert.NotNull(nginxDeploymentApiKey.Data.Properties.EndOn); + } + + [TestCase] + [RecordedTest] + public async Task Get() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + NginxDeploymentApiKeyResource response = await nginxDeploymentApiKey.GetAsync(); + + Assert.NotNull(response); + Assert.IsTrue(response.Data.Name.Equals(nginxDeploymentApiKeyName, StringComparison.InvariantCultureIgnoreCase)); + ResourceDataHelper.AssertResourceData(nginxDeploymentApiKey.Data, response.Data); + } + + [TestCase] + [RecordedTest] + public async Task Delete() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + Assert.IsTrue(await collection.ExistsAsync(nginxDeploymentApiKeyName)); + + await nginxDeploymentApiKey.DeleteAsync(WaitUntil.Completed); + Assert.IsFalse(await collection.ExistsAsync(nginxDeploymentApiKeyName)); + } + + [TestCase] + [RecordedTest] + public async Task Update() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testDeploymentApiKey-"); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + + NginxDeploymentApiKeyRequestProperties apiKeyProperties = new NginxDeploymentApiKeyRequestProperties + { + SecretText = NginxDeploymentApiKeySecretText, + EndOn = DateTimeOffset.UtcNow.AddDays(90) + }; + NginxDeploymentApiKeyCreateOrUpdateContent nginxDeploymentApiKeyCreateOrUpdateContent = new NginxDeploymentApiKeyCreateOrUpdateContent + { + Properties = apiKeyProperties + }; + NginxDeploymentApiKeyResource updatedNginxDeploymentApiKey = (await nginxDeploymentApiKey.UpdateAsync(WaitUntil.Completed, nginxDeploymentApiKeyCreateOrUpdateContent)).Value; + Assert.AreEqual(apiKeyProperties.EndOn, updatedNginxDeploymentApiKey.Data.Properties.EndOn); + Assert.ThrowsAsync(async () => _ = (await nginxDeploymentApiKey.UpdateAsync(WaitUntil.Completed, null)).Value); + } + } +} diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentResourceTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentResourceTests.cs index 2e658b82d8151..973208d2301f9 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentResourceTests.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxDeploymentResourceTests.cs @@ -52,24 +52,65 @@ public void CreateResourceIdentifier() public async Task Data() { string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + ResourceIdentifier nginxResourceIdentifier = NginxDeploymentResource.CreateResourceIdentifier(Subscription.Data.SubscriptionId, ResGroup.Data.Name, nginxDeploymentName); NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); Assert.IsTrue(nginxDeployment.HasData); Assert.NotNull(nginxDeployment.Data); Assert.IsTrue(nginxDeployment.Data.Name.Equals(nginxDeploymentName)); + Assert.IsTrue(nginxDeployment.Data.Id.Equals(nginxResourceIdentifier)); + Assert.IsTrue(nginxDeployment.Data.ResourceType.Equals(NginxDeploymentResource.ResourceType)); + Assert.IsTrue(nginxDeployment.Data.Location.Equals(Location)); + Assert.IsNotNull(nginxDeployment.Data.SystemData); + Assert.IsNotNull(nginxDeployment.Data.Tags); Assert.IsNotNull(nginxDeployment.Data.Identity); + Assert.IsNotNull(nginxDeployment.Data.Sku); Assert.IsNotNull(nginxDeployment.Data.SkuName); Assert.IsNotNull(nginxDeployment.Data.Properties.ProvisioningState); Assert.IsNotNull(nginxDeployment.Data.Properties.NginxVersion); - Assert.IsNotNull(nginxDeployment.Data.Properties.NetworkProfile.FrontEndIPConfiguration); - Assert.IsNotNull(nginxDeployment.Data.Properties.NetworkProfile.NetworkInterfaceConfiguration); + Assert.IsNotNull(nginxDeployment.Data.Properties.NetworkProfile.FrontEndIPConfiguration.PublicIPAddresses); + Assert.IsNotNull(nginxDeployment.Data.Properties.NetworkProfile.FrontEndIPConfiguration.PrivateIPAddresses); + Assert.IsNotNull(nginxDeployment.Data.Properties.NetworkProfile.NetworkInterfaceConfiguration.SubnetId); Assert.IsNotNull(nginxDeployment.Data.Properties.NetworkProfile.NetworkInterfaceSubnetId); Assert.IsNotNull(nginxDeployment.Data.Properties.IPAddress); Assert.IsNotNull(nginxDeployment.Data.Properties.EnableDiagnosticsSupport); - Assert.IsNotNull(nginxDeployment.Data.Properties.ScalingProperties); - Assert.IsNotNull(nginxDeployment.Data.Properties.AutoUpgradeProfile); + Assert.IsNull(nginxDeployment.Data.Properties.Logging); + Assert.IsNull(nginxDeployment.Data.Properties.LoggingStorageAccount); + Assert.IsNotNull(nginxDeployment.Data.Properties.ScalingProperties.Capacity); + Assert.IsNotNull(nginxDeployment.Data.Properties.ScalingProperties.Profiles); + Assert.IsNotNull(nginxDeployment.Data.Properties.AutoUpgradeProfile.UpgradeChannel); + Assert.IsNotNull(nginxDeployment.Data.Properties.UserProfile.PreferredEmail); Assert.IsNotNull(nginxDeployment.Data.Properties.UserPreferredEmail); Assert.IsNull(nginxDeployment.Data.Properties.NginxAppProtect); + Assert.IsNotNull(nginxDeployment.Data.Properties.DataplaneApiEndpoint); + } + + [TestCase] + [RecordedTest] + public async Task GetNginxDeploymentApiKeys() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + NginxDeploymentApiKeyCollection collection = nginxDeployment.GetNginxDeploymentApiKeys(); + Assert.NotNull(collection); + } + + [TestCase] + [RecordedTest] + public async Task GetNginxDeploymentApiKey() + { + string nginxDeploymentName = Recording.GenerateAssetName("testDeployment-"); + NginxDeploymentResource nginxDeployment = await CreateNginxDeployment(ResGroup, Location, nginxDeploymentName); + + string nginxDeploymentApiKeyName = Recording.GenerateAssetName("testApiKey-"); + _ = await CreateNginxDeploymentApiKey(nginxDeployment, nginxDeploymentApiKeyName); + NginxDeploymentApiKeyResource nginxDeploymentApiKey = await nginxDeployment.GetNginxDeploymentApiKeyAsync(nginxDeploymentApiKeyName); + + Assert.NotNull(nginxDeploymentApiKey); + Assert.IsTrue(nginxDeploymentApiKeyName.Equals(nginxDeploymentApiKey.Data.Name, StringComparison.InvariantCultureIgnoreCase)); + Assert.ThrowsAsync(async () => _ = await nginxDeployment.GetNginxDeploymentApiKeyAsync(nginxDeploymentApiKeyName + "1")); + Assert.ThrowsAsync(async () => _ = await nginxDeployment.GetNginxDeploymentApiKeyAsync(null)); } [TestCase] @@ -122,7 +163,7 @@ public async Task GetNginxConfiguration() const string nginxConfigurationName = "default"; const string virtualPath = "/etc/nginx/nginx.conf"; - _ = await CreateNginxConfiguration(Location, nginxDeployment, nginxConfigurationName, virtualPath); + _ = await CreateNginxConfiguration(nginxDeployment, nginxConfigurationName, virtualPath); NginxConfigurationResource nginxConfiguration = await nginxDeployment.GetNginxConfigurationAsync(nginxConfigurationName); Assert.NotNull(nginxConfiguration); @@ -264,7 +305,14 @@ public async Task UpdateWebApplicationFirewall() deploymentPatch.Properties.NginxAppProtect = nginxAppProtect; NginxDeploymentResource nginxDeployment3 = (await nginxDeployment.UpdateAsync(WaitUntil.Completed, deploymentPatch)).Value; + Assert.IsNotNull(nginxDeployment.Data.Properties.NginxAppProtect.WebApplicationFirewallActivationState); Assert.AreEqual(nginxDeployment3.Data.Properties.NginxAppProtect.WebApplicationFirewallActivationState, WebApplicationFirewallActivationState.Enabled); + Assert.IsNotNull(nginxDeployment.Data.Properties.NginxAppProtect.WebApplicationFirewallSettings.ActivationState); + Assert.AreEqual(nginxDeployment3.Data.Properties.NginxAppProtect.WebApplicationFirewallSettings.ActivationState, WebApplicationFirewallActivationState.Enabled); + Assert.IsNotNull(nginxDeployment.Data.Properties.NginxAppProtect.WebApplicationFirewallStatus.AttackSignaturesPackage); + Assert.IsNotNull(nginxDeployment.Data.Properties.NginxAppProtect.WebApplicationFirewallStatus.BotSignaturesPackage); + Assert.IsNotNull(nginxDeployment.Data.Properties.NginxAppProtect.WebApplicationFirewallStatus.ThreatCampaignsPackage); + Assert.IsNotNull(nginxDeployment.Data.Properties.NginxAppProtect.WebApplicationFirewallStatus.ComponentVersions); nginxAppProtect.WebApplicationFirewallActivationState = WebApplicationFirewallActivationState.Disabled; deploymentPatch.Properties.NginxAppProtect = nginxAppProtect; From 2f75efbb2fe5e310f0ccff62a14fd9972642179b Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Tue, 4 Feb 2025 18:50:19 +0300 Subject: [PATCH 2/3] Update assets --- sdk/nginx/Azure.ResourceManager.Nginx/assets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/assets.json b/sdk/nginx/Azure.ResourceManager.Nginx/assets.json index 5e495a1b083f5..7e70f4ca9aeb6 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/assets.json +++ b/sdk/nginx/Azure.ResourceManager.Nginx/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/nginx/Azure.ResourceManager.Nginx", - "Tag": "net/nginx/Azure.ResourceManager.Nginx_86ae8139a8" + "Tag": "net/nginx/Azure.ResourceManager.Nginx_9615640290" } From a524c3d487bc7e678d59318dc78032bff53618ad Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Tue, 4 Feb 2025 22:01:27 +0300 Subject: [PATCH 3/3] Update Nginx Certificate Resource Tests --- sdk/nginx/Azure.ResourceManager.Nginx/assets.json | 2 +- .../src/Azure.ResourceManager.Nginx.csproj | 2 +- .../tests/Scenario/NginxCertificateResourceTests.cs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/assets.json b/sdk/nginx/Azure.ResourceManager.Nginx/assets.json index 7e70f4ca9aeb6..436c184928082 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/assets.json +++ b/sdk/nginx/Azure.ResourceManager.Nginx/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/nginx/Azure.ResourceManager.Nginx", - "Tag": "net/nginx/Azure.ResourceManager.Nginx_9615640290" + "Tag": "net/nginx/Azure.ResourceManager.Nginx_2f45071f7f" } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj b/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj index ecec5069bd8da..5c8a770f040c1 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Azure.ResourceManager.Nginx.csproj @@ -1,4 +1,4 @@ - + 1.1.0-beta.3 diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs index b8ce031f9e0ef..5336f9b57474d 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/tests/Scenario/NginxCertificateResourceTests.cs @@ -63,8 +63,8 @@ public async Task Data() Assert.IsTrue(nginxCertificate.Data.Name.Equals(nginxCertificateName, StringComparison.InvariantCultureIgnoreCase)); Assert.IsTrue(nginxCertificate.Data.Id.Equals(nginxCertificateResourceIdentifier)); Assert.IsTrue(nginxCertificate.Data.ResourceType.Equals(NginxCertificateResource.ResourceType)); - Assert.IsNotNull(nginxCertificate.Data.SystemData); - Assert.IsNotNull(nginxCertificate.Data.Location); + Assert.IsNull(nginxCertificate.Data.SystemData); + Assert.IsNull(nginxCertificate.Data.Location); Assert.IsNotNull(nginxCertificate.Data.Properties.ProvisioningState); Assert.IsTrue(nginxCertificate.Data.Properties.CertificateVirtualPath.Equals(certificateVirtualPath)); Assert.IsTrue(nginxCertificate.Data.Properties.KeyVirtualPath.Equals(keyVirtualPath)); @@ -72,7 +72,7 @@ public async Task Data() Assert.IsNotNull(nginxCertificate.Data.Properties.Sha1Thumbprint); Assert.IsNotNull(nginxCertificate.Data.Properties.KeyVaultSecretVersion); Assert.IsNotNull(nginxCertificate.Data.Properties.KeyVaultSecretCreated); - Assert.IsNull(nginxCertificate.Data.Properties.CertificateError); + Assert.IsNotNull(nginxCertificate.Data.Properties.CertificateError); } [TestCase]