From f2fd2716151fafc02e8a248eee3bb62fee2896ff Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 9 Oct 2025 13:51:55 +0000 Subject: [PATCH 1/2] Configurations: 'specification/nginx/Nginx.Management/tspconfig.yaml', API Version: 2025-03-01-preview, SDK Release Type: beta, and CommitSHA: 'aae85aa3e7e4fda95ea2d3abac0ba1d8159db214' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5433741 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-resourcemanager-nginx/CHANGELOG.md | 272 +++++- .../azure-resourcemanager-nginx/README.md | 2 +- .../azure-resourcemanager-nginx/SAMPLE.md | 192 +++- sdk/nginx/azure-resourcemanager-nginx/pom.xml | 5 +- .../resourcemanager/nginx/NginxManager.java | 90 +- .../nginx/fluent/ApiKeysClient.java | 50 +- .../nginx/fluent/CertificatesClient.java | 14 +- .../nginx/fluent/ConfigurationsClient.java | 66 +- .../fluent/DefaultWafPoliciesClient.java | 44 + .../nginx/fluent/DeploymentsClient.java | 56 +- .../nginx/fluent/NginxManagementClient.java | 58 +- .../nginx/fluent/OperationsClient.java | 16 +- .../nginx/fluent/WafPoliciesClient.java | 200 ++++ .../fluent/models/AnalysisResultInner.java | 48 +- .../fluent/models/NginxCertificateInner.java | 31 +- .../NginxConfigurationResponseInner.java | 40 +- .../NginxDeploymentApiKeyResponseInner.java | 43 +- ...mentDefaultWafPolicyListResponseInner.java | 97 ++ .../fluent/models/NginxDeploymentInner.java | 77 +- ...entScalingPropertiesAutoScaleSettings.java | 21 +- .../models/NginxDeploymentWafPolicyInner.java | 157 ++++ ...NginxDeploymentWafPolicyMetadataInner.java | 143 +++ .../nginx/fluent/models/OperationInner.java | 150 +++ .../fluent/models/OperationResultInner.java | 153 --- .../nginx/fluent/models/package-info.java | 5 +- .../nginx/fluent/package-info.java | 5 +- .../implementation/AnalysisResultImpl.java | 2 +- .../implementation/ApiKeysClientImpl.java | 544 ++++------- .../nginx/implementation/ApiKeysImpl.java | 20 +- .../CertificatesClientImpl.java | 554 +++++------ .../implementation/CertificatesImpl.java | 2 +- .../ConfigurationsClientImpl.java | 793 ++++++---------- .../implementation/ConfigurationsImpl.java | 32 +- .../DefaultWafPoliciesClientImpl.java | 150 +++ .../DefaultWafPoliciesImpl.java | 58 ++ .../implementation/DeploymentsClientImpl.java | 888 ++++++++---------- .../nginx/implementation/DeploymentsImpl.java | 20 +- .../implementation/NginxCertificateImpl.java | 2 +- .../NginxConfigurationResponseImpl.java | 5 +- .../NginxDeploymentApiKeyResponseImpl.java | 10 +- ...ymentDefaultWafPolicyListResponseImpl.java | 45 + .../implementation/NginxDeploymentImpl.java | 22 +- .../NginxDeploymentWafPolicyImpl.java | 105 +++ .../NginxDeploymentWafPolicyMetadataImpl.java | 50 + .../NginxManagementClientBuilder.java | 28 +- .../NginxManagementClientImpl.java | 150 ++- ...tionResultImpl.java => OperationImpl.java} | 28 +- .../implementation/OperationsClientImpl.java | 165 ++-- .../nginx/implementation/OperationsImpl.java | 18 +- .../implementation/ResourceManagerUtils.java | 2 +- .../implementation/WafPoliciesClientImpl.java | 826 ++++++++++++++++ .../nginx/implementation/WafPoliciesImpl.java | 163 ++++ .../models/NginxCertificateListResponse.java | 54 +- .../NginxConfigurationListResponse.java | 52 +- .../NginxDeploymentApiKeyListResponse.java | 54 +- .../models/NginxDeploymentListResponse.java | 54 +- .../NginxDeploymentWafPolicyListResponse.java | 98 ++ .../models/OperationListResult.java | 64 +- .../nginx/implementation/package-info.java | 5 +- .../nginx/models/ActionType.java | 46 + .../nginx/models/ActivationState.java | 2 +- .../nginx/models/AnalysisCreate.java | 19 +- .../nginx/models/AnalysisCreateConfig.java | 25 +- .../nginx/models/AnalysisDiagnostic.java | 124 +-- .../nginx/models/AnalysisResult.java | 2 +- .../nginx/models/AnalysisResultData.java | 44 +- .../resourcemanager/nginx/models/ApiKeys.java | 32 +- .../nginx/models/AutoUpgradeProfile.java | 18 +- .../nginx/models/Certificates.java | 6 +- .../nginx/models/Configurations.java | 48 +- .../nginx/models/DefaultWafPolicies.java | 39 + .../nginx/models/Deployments.java | 32 +- .../nginx/models/DiagnosticItem.java | 150 +-- .../nginx/models/IdentityProperties.java | 25 +- .../nginx/models/IdentityType.java | 4 +- .../resourcemanager/nginx/models/Level.java | 2 +- .../nginx/models/NginxCertificate.java | 20 +- .../NginxCertificateErrorResponseBody.java | 12 +- .../models/NginxCertificateProperties.java | 25 +- .../nginx/models/NginxConfigurationFile.java | 12 +- .../models/NginxConfigurationPackage.java | 12 +- ...ginxConfigurationProtectedFileRequest.java | 12 +- ...inxConfigurationProtectedFileResponse.java | 41 +- .../models/NginxConfigurationRequest.java | 87 +- .../NginxConfigurationRequestProperties.java | 31 +- .../models/NginxConfigurationResponse.java | 14 +- .../NginxConfigurationResponseProperties.java | 80 +- .../nginx/models/NginxDeployment.java | 58 +- .../models/NginxDeploymentApiKeyRequest.java | 82 +- ...ginxDeploymentApiKeyRequestProperties.java | 12 +- .../models/NginxDeploymentApiKeyResponse.java | 20 +- ...inxDeploymentApiKeyResponseProperties.java | 29 +- ...eploymentDefaultWafPolicyListResponse.java | 35 + ...xDeploymentDefaultWafPolicyProperties.java | 92 ++ .../models/NginxDeploymentProperties.java | 52 +- ...nxDeploymentPropertiesNginxAppProtect.java | 23 +- .../NginxDeploymentScalingProperties.java | 13 +- .../NginxDeploymentUpdateParameters.java | 45 +- .../NginxDeploymentUpdateProperties.java | 48 +- ...oymentUpdatePropertiesNginxAppProtect.java | 13 +- .../models/NginxDeploymentUserProfile.java | 12 +- .../models/NginxDeploymentWafPolicy.java | 137 +++ ...ginxDeploymentWafPolicyApplyingStatus.java | 109 +++ ...DeploymentWafPolicyApplyingStatusCode.java | 67 ++ ...inxDeploymentWafPolicyCompilingStatus.java | 110 +++ ...eploymentWafPolicyCompilingStatusCode.java | 62 ++ .../NginxDeploymentWafPolicyMetadata.java | 55 ++ ...DeploymentWafPolicyMetadataProperties.java | 126 +++ .../NginxDeploymentWafPolicyProperties.java | 166 ++++ .../models/NginxFrontendIpConfiguration.java | 18 +- .../nginx/models/NginxLogging.java | 21 +- .../NginxNetworkInterfaceConfiguration.java | 12 +- .../nginx/models/NginxNetworkProfile.java | 30 +- .../nginx/models/NginxPrivateIpAddress.java | 18 +- .../NginxPrivateIpAllocationMethod.java | 4 +- .../nginx/models/NginxPublicIpAddress.java | 12 +- .../nginx/models/NginxStorageAccount.java | 12 +- .../nginx/models/Operation.java | 58 ++ .../nginx/models/OperationDisplay.java | 89 +- .../nginx/models/OperationResult.java | 40 - .../nginx/models/Operations.java | 14 +- .../resourcemanager/nginx/models/Origin.java | 57 ++ .../nginx/models/ProvisioningState.java | 4 +- .../nginx/models/ResourceSku.java | 19 +- .../nginx/models/ScaleProfile.java | 23 +- .../nginx/models/ScaleProfileCapacity.java | 10 +- .../nginx/models/UserIdentityProperties.java | 12 +- .../nginx/models/WafPolicies.java | 145 +++ ...bApplicationFirewallComponentVersions.java | 52 +- .../models/WebApplicationFirewallPackage.java | 51 +- .../WebApplicationFirewallSettings.java | 10 +- .../models/WebApplicationFirewallStatus.java | 43 +- .../nginx/models/package-info.java | 5 +- .../resourcemanager/nginx/package-info.java | 5 +- .../src/main/java/module-info.java | 3 +- ...ourcemanager-nginx_apiview_properties.json | 129 +++ .../azure-resourcemanager-nginx_metadata.json | 1 + .../proxy-config.json | 2 +- .../ApiKeysCreateOrUpdateSamples.java | 6 +- .../nginx/generated/ApiKeysDeleteSamples.java | 5 +- .../nginx/generated/ApiKeysGetSamples.java | 5 +- .../nginx/generated/ApiKeysListSamples.java | 5 +- .../CertificatesCreateOrUpdateSamples.java | 5 +- .../generated/CertificatesDeleteSamples.java | 5 +- .../generated/CertificatesGetSamples.java | 5 +- .../generated/CertificatesListSamples.java | 5 +- .../ConfigurationsAnalysisSamples.java | 6 +- .../ConfigurationsCreateOrUpdateSamples.java | 5 +- .../ConfigurationsDeleteSamples.java | 6 +- .../generated/ConfigurationsGetSamples.java | 5 +- .../generated/ConfigurationsListSamples.java | 5 +- .../DefaultWafPolicyListSamples.java | 23 + .../DeploymentsCreateOrUpdateSamples.java | 5 +- .../generated/DeploymentsDeleteSamples.java | 5 +- .../DeploymentsGetByResourceGroupSamples.java | 8 +- ...DeploymentsListByResourceGroupSamples.java | 5 +- .../generated/DeploymentsListSamples.java | 5 +- .../generated/DeploymentsUpdateSamples.java | 9 +- .../generated/OperationsListSamples.java | 5 +- .../generated/WafPolicyCreateSamples.java | 25 + .../generated/WafPolicyDeleteSamples.java | 23 + .../nginx/generated/WafPolicyGetSamples.java | 23 + .../nginx/generated/WafPolicyListSamples.java | 22 + .../generated/AnalysisCreateConfigTests.java | 60 +- .../nginx/generated/AnalysisCreateTests.java | 65 +- .../generated/AnalysisDiagnosticTests.java | 37 +- .../generated/AnalysisResultDataTests.java | 102 +- .../generated/AnalysisResultInnerTests.java | 123 +-- .../ApiKeysDeleteWithResponseMockTests.java | 4 +- .../ApiKeysGetWithResponseMockTests.java | 8 +- .../nginx/generated/ApiKeysListMockTests.java | 8 +- .../generated/AutoUpgradeProfileTests.java | 10 +- .../CertificatesDeleteMockTests.java | 33 - ...urationsAnalysisWithResponseMockTests.java | 66 +- ...ConfigurationsCreateOrUpdateMockTests.java | 48 +- .../ConfigurationsDeleteMockTests.java | 33 - ...onfigurationsGetWithResponseMockTests.java | 20 +- .../ConfigurationsListMockTests.java | 22 +- ...WafPoliciesListWithResponseMockTests.java} | 16 +- .../DeploymentsCreateOrUpdateMockTests.java | 76 +- ...tByResourceGroupWithResponseMockTests.java | 36 +- ...ploymentsListByResourceGroupMockTests.java | 36 +- .../generated/DeploymentsListMockTests.java | 35 +- .../nginx/generated/DiagnosticItemTests.java | 43 +- .../generated/IdentityPropertiesTests.java | 8 +- .../NginxConfigurationFileTests.java | 14 +- .../NginxConfigurationListResponseTests.java | 61 +- .../NginxConfigurationPackageTests.java | 18 +- ...onfigurationProtectedFileRequestTests.java | 26 +- ...nfigurationProtectedFileResponseTests.java | 17 +- ...nxConfigurationRequestPropertiesTests.java | 62 +- .../NginxConfigurationRequestTests.java | 59 +- .../NginxConfigurationResponseInnerTests.java | 50 +- ...xConfigurationResponsePropertiesTests.java | 46 +- ...ginxDeploymentApiKeyListResponseTests.java | 27 +- ...inxDeploymentApiKeyResponseInnerTests.java | 16 +- ...ploymentApiKeyResponsePropertiesTests.java | 14 +- ...efaultWafPolicyListResponseInnerTests.java | 19 + ...oymentDefaultWafPolicyPropertiesTests.java | 16 + .../generated/NginxDeploymentInnerTests.java | 155 +-- .../NginxDeploymentListResponseTests.java | 256 +---- ...loymentPropertiesNginxAppProtectTests.java | 4 +- .../NginxDeploymentPropertiesTests.java | 107 ++- ...alingPropertiesAutoScaleSettingsTests.java | 26 +- ...NginxDeploymentScalingPropertiesTests.java | 34 +- .../NginxDeploymentUpdateParametersTests.java | 147 ++- ...tUpdatePropertiesNginxAppProtectTests.java | 10 +- .../NginxDeploymentUpdatePropertiesTests.java | 105 ++- .../NginxDeploymentUserProfileTests.java | 10 +- .../NginxFrontendIpConfigurationTests.java | 36 +- .../nginx/generated/NginxLoggingTests.java | 16 +- ...inxNetworkInterfaceConfigurationTests.java | 10 +- .../generated/NginxNetworkProfileTests.java | 43 +- .../generated/NginxPrivateIpAddressTests.java | 25 +- .../generated/NginxPublicIpAddressTests.java | 11 +- .../generated/NginxStorageAccountTests.java | 14 +- .../generated/OperationDisplayTests.java | 22 +- .../nginx/generated/OperationInnerTests.java | 17 + .../generated/OperationListResultTests.java | 49 +- .../generated/OperationResultInnerTests.java | 42 - .../generated/OperationsListMockTests.java | 15 +- .../nginx/generated/ResourceSkuTests.java | 10 +- .../generated/ScaleProfileCapacityTests.java | 14 +- .../nginx/generated/ScaleProfileTests.java | 20 +- .../UserIdentityPropertiesTests.java | 4 +- ...icationFirewallComponentVersionsTests.java | 18 +- .../WebApplicationFirewallPackageTests.java | 17 +- .../WebApplicationFirewallSettingsTests.java | 2 +- .../WebApplicationFirewallStatusTests.java | 12 +- .../tsp-location.yaml | 4 + 230 files changed, 7361 insertions(+), 5781 deletions(-) create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DefaultWafPoliciesClient.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/WafPoliciesClient.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentDefaultWafPolicyListResponseInner.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyInner.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyMetadataInner.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationInner.java delete mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesClientImpl.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesImpl.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentDefaultWafPolicyListResponseImpl.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyImpl.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyMetadataImpl.java rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/{OperationResultImpl.java => OperationImpl.java} (52%) create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesClientImpl.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesImpl.java rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/{ => implementation}/models/NginxCertificateListResponse.java (67%) rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/{ => implementation}/models/NginxConfigurationListResponse.java (67%) rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/{ => implementation}/models/NginxDeploymentApiKeyListResponse.java (68%) rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/{ => implementation}/models/NginxDeploymentListResponse.java (67%) create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentWafPolicyListResponse.java rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/{ => implementation}/models/OperationListResult.java (55%) create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActionType.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DefaultWafPolicies.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyListResponse.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyProperties.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicy.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatus.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatusCode.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatus.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatusCode.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadata.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadataProperties.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyProperties.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operation.java delete mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationResult.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Origin.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WafPolicies.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_apiview_properties.json create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_metadata.json create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/samples/java/com/azure/resourcemanager/nginx/generated/DefaultWafPolicyListSamples.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/samples/java/com/azure/resourcemanager/nginx/generated/WafPolicyCreateSamples.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/samples/java/com/azure/resourcemanager/nginx/generated/WafPolicyDeleteSamples.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/samples/java/com/azure/resourcemanager/nginx/generated/WafPolicyGetSamples.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/samples/java/com/azure/resourcemanager/nginx/generated/WafPolicyListSamples.java delete mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/CertificatesDeleteMockTests.java delete mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsDeleteMockTests.java rename sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/{DeploymentsDeleteMockTests.java => DefaultWafPoliciesListWithResponseMockTests.java} (59%) create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyListResponseInnerTests.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyPropertiesTests.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationInnerTests.java delete mode 100644 sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationResultInnerTests.java create mode 100644 sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml diff --git a/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md b/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md index 6023bd0fb9f0..f72ab4ff3095 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md +++ b/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md @@ -1,14 +1,278 @@ # Release History -## 1.1.0-beta.4 (Unreleased) +## 1.1.0-beta.4 (2025-10-09) -### Features Added +- Azure Resource Manager Nginx client library for Java. This package contains Microsoft Azure SDK for Nginx Management SDK. Package api-version 2025-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.NginxConfigurationListResponse` was removed + +#### `models.OperationResult` was removed + +#### `models.NginxDeploymentApiKeyListResponse` was removed + +#### `models.NginxCertificateListResponse` was removed + +#### `models.OperationListResult` was removed + +#### `models.NginxDeploymentListResponse` was removed + +#### `models.UserIdentityProperties` was modified + +* `validate()` was removed + +#### `models.ScaleProfileCapacity` was modified + +* `validate()` was removed + +#### `models.NginxNetworkInterfaceConfiguration` was modified + +* `validate()` was removed + +#### `models.WebApplicationFirewallSettings` was modified + +* `validate()` was removed + +#### `models.NginxDeploymentScalingProperties` was modified + +* `validate()` was removed + +#### `models.AnalysisDiagnostic` was modified + +* `withRule(java.lang.String)` was removed +* `float line()` -> `double line()` +* `withFile(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `validate()` was removed +* `withId(java.lang.String)` was removed +* `withLine(float)` was removed +* `withMessage(java.lang.String)` was removed +* `withDirective(java.lang.String)` was removed + +#### `models.NginxFrontendIpConfiguration` was modified + +* `validate()` was removed + +#### `models.NginxCertificateErrorResponseBody` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `withResource(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed +* `validate()` was removed +* `withDescription(java.lang.String)` was removed + +#### `models.NginxDeploymentUserProfile` was modified + +* `validate()` was removed + +#### `models.DiagnosticItem` was modified + +* `withLine(float)` was removed +* `withMessage(java.lang.String)` was removed +* `withRule(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withLevel(models.Level)` was removed +* `withDirective(java.lang.String)` was removed +* `withCategory(java.lang.String)` was removed +* `validate()` was removed +* `withFile(java.lang.String)` was removed +* `withId(java.lang.String)` was removed +* `float line()` -> `double line()` + +#### `models.NginxDeploymentUpdateProperties` was modified + +* `validate()` was removed + +#### `models.NginxLogging` was modified + +* `validate()` was removed + +#### `models.NginxDeploymentProperties` was modified + +* `validate()` was removed + +#### `models.NginxCertificateProperties` was modified + +* `validate()` was removed + +#### `models.NginxNetworkProfile` was modified + +* `validate()` was removed + +#### `models.NginxDeploymentApiKeyRequest` was modified + +* `validate()` was removed + +#### `models.ScaleProfile` was modified + +* `validate()` was removed + +#### `models.AnalysisResultData` was modified + +* `validate()` was removed +* `withErrors(java.util.List)` was removed +* `withDiagnostics(java.util.List)` was removed + +#### `models.NginxConfigurationRequestProperties` was modified + +* `validate()` was removed + +#### `models.AnalysisCreateConfig` was modified + +* `validate()` was removed + +#### `models.NginxConfigurationResponseProperties` was modified + +* `withFiles(java.util.List)` was removed +* `withProtectedFiles(java.util.List)` was removed +* `validate()` was removed +* `withRootFile(java.lang.String)` was removed +* `withPackageProperty(models.NginxConfigurationPackage)` was removed + +#### `models.IdentityProperties` was modified + +* `validate()` was removed + +#### `models.NginxConfigurationFile` was modified + +* `validate()` was removed + +#### `models.NginxConfigurationRequest` was modified + +* `validate()` was removed + +#### `models.NginxDeploymentApiKeyResponseProperties` was modified + +* `validate()` was removed +* `withEndDateTime(java.time.OffsetDateTime)` was removed + +#### `models.NginxDeploymentUpdateParameters` was modified + +* `validate()` was removed + +#### `models.NginxDeploymentPropertiesNginxAppProtect` was modified + +* `validate()` was removed + +#### `models.WebApplicationFirewallComponentVersions` was modified + +* `validate()` was removed +* `withWafEngineVersion(java.lang.String)` was removed +* `withWafNginxVersion(java.lang.String)` was removed + +#### `models.NginxConfigurationProtectedFileRequest` was modified + +* `validate()` was removed + +#### `models.WebApplicationFirewallStatus` was modified + +* `validate()` was removed + +#### `models.NginxPublicIpAddress` was modified + +* `validate()` was removed + +#### `models.NginxConfigurationPackage` was modified + +* `validate()` was removed + +#### `models.ResourceSku` was modified + +* `validate()` was removed + +#### `models.WebApplicationFirewallPackage` was modified + +* `withVersion(java.lang.String)` was removed +* `withRevisionDatetime(java.time.OffsetDateTime)` was removed +* `validate()` was removed + +#### `models.AutoUpgradeProfile` was modified + +* `validate()` was removed + +#### `models.NginxStorageAccount` was modified + +* `validate()` was removed + +#### `models.NginxDeploymentUpdatePropertiesNginxAppProtect` was modified + +* `validate()` was removed + +#### `models.AnalysisCreate` was modified + +* `validate()` was removed + +#### `models.NginxConfigurationProtectedFileResponse` was modified + +* `validate()` was removed +* `withContentHash(java.lang.String)` was removed +* `withVirtualPath(java.lang.String)` was removed + +#### `models.NginxDeploymentApiKeyRequestProperties` was modified + +* `validate()` was removed + +#### `models.NginxPrivateIpAddress` was modified + +* `validate()` was removed + +### Features Added + +* `models.NginxDeploymentDefaultWafPolicyListResponse` was added + +* `models.NginxDeploymentWafPolicy$Definition` was added + +* `models.WafPolicies` was added + +* `models.ActionType` was added + +* `models.NginxDeploymentWafPolicyMetadataProperties` was added + +* `models.NginxDeploymentWafPolicyApplyingStatusCode` was added + +* `models.NginxDeploymentWafPolicy` was added + +* `models.NginxDeploymentDefaultWafPolicyProperties` was added + +* `models.NginxDeploymentWafPolicyCompilingStatus` was added + +* `models.NginxDeploymentWafPolicyProperties` was added + +* `models.NginxDeploymentWafPolicyCompilingStatusCode` was added + +* `models.Origin` was added + +* `models.NginxDeploymentWafPolicyMetadata` was added + +* `models.Operation` was added + +* `models.NginxDeploymentWafPolicy$DefinitionStages` was added + +* `models.NginxDeploymentWafPolicyApplyingStatus` was added + +* `models.DefaultWafPolicies` was added + +#### `models.NginxDeploymentApiKeyRequest` was modified + +* `systemData()` was added + +#### `models.NginxDeploymentApiKeyResponse` was modified + +* `systemData()` was added + +#### `NginxManager` was modified + +* `defaultWafPolicies()` was added +* `wafPolicies()` was added + +#### `models.WebApplicationFirewallStatus` was modified -### Other Changes +* `wafRelease()` was added ## 1.1.0-beta.3 (2025-02-26) diff --git a/sdk/nginx/azure-resourcemanager-nginx/README.md b/sdk/nginx/azure-resourcemanager-nginx/README.md index a4cef05c1551..affe8564570e 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/README.md +++ b/sdk/nginx/azure-resourcemanager-nginx/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Nginx client library for Java. -This package contains Microsoft Azure SDK for Nginx Management SDK. Package tag package-2024-11-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Nginx Management SDK. Package api-version 2025-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback diff --git a/sdk/nginx/azure-resourcemanager-nginx/SAMPLE.md b/sdk/nginx/azure-resourcemanager-nginx/SAMPLE.md index 690718f9390c..bf5b3aafe1d7 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/SAMPLE.md +++ b/sdk/nginx/azure-resourcemanager-nginx/SAMPLE.md @@ -23,6 +23,10 @@ - [Get](#configurations_get) - [List](#configurations_list) +## DefaultWafPolicy + +- [List](#defaultwafpolicy_list) + ## Deployments - [CreateOrUpdate](#deployments_createorupdate) @@ -35,6 +39,13 @@ ## Operations - [List](#operations_list) + +## WafPolicy + +- [Create](#wafpolicy_create) +- [Delete](#wafpolicy_delete) +- [Get](#wafpolicy_get) +- [List](#wafpolicy_list) ### ApiKeys_CreateOrUpdate ```java @@ -43,9 +54,7 @@ */ public final class ApiKeysCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_CreateOrUpdate. - * json + * x-ms-original-file: 2025-03-01-preview/ApiKeys_CreateOrUpdate.json */ /** * Sample code: ApiKeys_CreateOrUpdate. @@ -66,8 +75,7 @@ public final class ApiKeysCreateOrUpdateSamples { */ public final class ApiKeysDeleteSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Delete.json + * x-ms-original-file: 2025-03-01-preview/ApiKeys_Delete.json */ /** * Sample code: ApiKeys_Delete. @@ -89,8 +97,7 @@ public final class ApiKeysDeleteSamples { */ public final class ApiKeysGetSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_Get.json + * x-ms-original-file: 2025-03-01-preview/ApiKeys_Get.json */ /** * Sample code: ApiKeys_Get. @@ -112,8 +119,7 @@ public final class ApiKeysGetSamples { */ public final class ApiKeysListSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ApiKeys_List.json + * x-ms-original-file: 2025-03-01-preview/ApiKeys_List.json */ /** * Sample code: ApiKeys_List. @@ -134,8 +140,7 @@ public final class ApiKeysListSamples { */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ - * Certificates_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01-preview/Certificates_CreateOrUpdate.json */ /** * Sample code: Certificates_CreateOrUpdate. @@ -159,8 +164,7 @@ public final class CertificatesCreateOrUpdateSamples { */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Delete.json + * x-ms-original-file: 2025-03-01-preview/Certificates_Delete.json */ /** * Sample code: Certificates_Delete. @@ -181,8 +185,7 @@ public final class CertificatesDeleteSamples { */ public final class CertificatesGetSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_Get.json + * x-ms-original-file: 2025-03-01-preview/Certificates_Get.json */ /** * Sample code: Certificates_Get. @@ -204,8 +207,7 @@ public final class CertificatesGetSamples { */ public final class CertificatesListSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Certificates_List.json + * x-ms-original-file: 2025-03-01-preview/Certificates_List.json */ /** * Sample code: Certificates_List. @@ -227,9 +229,7 @@ public final class CertificatesListSamples { */ public final class ConfigurationsAnalysisSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Analysis. - * json + * x-ms-original-file: 2025-03-01-preview/Configurations_Analysis.json */ /** * Sample code: Configurations_Analysis. @@ -251,8 +251,7 @@ public final class ConfigurationsAnalysisSamples { */ public final class ConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ - * Configurations_CreateOrUpdate.json + * x-ms-original-file: 2025-03-01-preview/Configurations_CreateOrUpdate.json */ /** * Sample code: Configurations_CreateOrUpdate. @@ -276,9 +275,7 @@ public final class ConfigurationsCreateOrUpdateSamples { */ public final class ConfigurationsDeleteSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Delete. - * json + * x-ms-original-file: 2025-03-01-preview/Configurations_Delete.json */ /** * Sample code: Configurations_Delete. @@ -299,8 +296,7 @@ public final class ConfigurationsDeleteSamples { */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_Get.json + * x-ms-original-file: 2025-03-01-preview/Configurations_Get.json */ /** * Sample code: Configurations_Get. @@ -322,8 +318,7 @@ public final class ConfigurationsGetSamples { */ public final class ConfigurationsListSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Configurations_List.json + * x-ms-original-file: 2025-03-01-preview/Configurations_List.json */ /** * Sample code: Configurations_List. @@ -336,6 +331,28 @@ public final class ConfigurationsListSamples { } ``` +### DefaultWafPolicy_List + +```java +/** + * Samples for DefaultWafPolicy List. + */ +public final class DefaultWafPolicyListSamples { + /* + * x-ms-original-file: 2025-03-01-preview/DefaultWafPolicy_List.json + */ + /** + * Sample code: DefaultWafPolicy_List. + * + * @param manager Entry point to NginxManager. + */ + public static void defaultWafPolicyList(com.azure.resourcemanager.nginx.NginxManager manager) { + manager.defaultWafPolicies() + .listWithResponse("myResourceGroup", "myDeployment", com.azure.core.util.Context.NONE); + } +} +``` + ### Deployments_CreateOrUpdate ```java @@ -344,8 +361,7 @@ public final class ConfigurationsListSamples { */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Create.json + * x-ms-original-file: 2025-03-01-preview/Deployments_Create.json */ /** * Sample code: Deployments_Create. @@ -370,8 +386,7 @@ public final class DeploymentsCreateOrUpdateSamples { */ public final class DeploymentsDeleteSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Delete.json + * x-ms-original-file: 2025-03-01-preview/Deployments_Delete.json */ /** * Sample code: Deployments_Delete. @@ -392,8 +407,7 @@ public final class DeploymentsDeleteSamples { */ public final class DeploymentsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Get.json + * x-ms-original-file: 2025-03-01-preview/Deployments_Get.json */ /** * Sample code: Deployments_Get. @@ -406,8 +420,7 @@ public final class DeploymentsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ - * Deployments_Get_AutoScale.json + * x-ms-original-file: 2025-03-01-preview/Deployments_Get_AutoScale.json */ /** * Sample code: Deployments_Get_AutoScale. @@ -429,8 +442,7 @@ public final class DeploymentsGetByResourceGroupSamples { */ public final class DeploymentsListSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_List.json + * x-ms-original-file: 2025-03-01-preview/Deployments_List.json */ /** * Sample code: Deployments_List. @@ -451,8 +463,7 @@ public final class DeploymentsListSamples { */ public final class DeploymentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/ - * Deployments_ListByResourceGroup.json + * x-ms-original-file: 2025-03-01-preview/Deployments_ListByResourceGroup.json */ /** * Sample code: Deployments_ListByResourceGroup. @@ -475,8 +486,7 @@ import com.azure.resourcemanager.nginx.models.NginxDeployment; */ public final class DeploymentsUpdateSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_Update.json + * x-ms-original-file: 2025-03-01-preview/Deployments_Update.json */ /** * Sample code: Deployments_Update. @@ -491,9 +501,7 @@ public final class DeploymentsUpdateSamples { } /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Deployments_UpdateSubnet - * .json + * x-ms-original-file: 2025-03-01-preview/Deployments_UpdateSubnet.json */ /** * Sample code: Deployments_UpdateSubnet. @@ -517,8 +525,7 @@ public final class DeploymentsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2024-11-01-preview/examples/Operations_List.json + * x-ms-original-file: 2025-03-01-preview/Operations_List.json */ /** * Sample code: Operations_List. @@ -531,3 +538,92 @@ public final class OperationsListSamples { } ``` +### WafPolicy_Create + +```java +/** + * Samples for WafPolicy Create. + */ +public final class WafPolicyCreateSamples { + /* + * x-ms-original-file: 2025-03-01-preview/WafPolicy_Create.json + */ + /** + * Sample code: WafPolicy_Create. + * + * @param manager Entry point to NginxManager. + */ + public static void wafPolicyCreate(com.azure.resourcemanager.nginx.NginxManager manager) { + manager.wafPolicies() + .define("myWafPolicy") + .withExistingNginxDeployment("myResourceGroup", "myDeployment") + .create(); + } +} +``` + +### WafPolicy_Delete + +```java +/** + * Samples for WafPolicy Delete. + */ +public final class WafPolicyDeleteSamples { + /* + * x-ms-original-file: 2025-03-01-preview/WafPolicy_Delete.json + */ + /** + * Sample code: WafPolicy_Delete. + * + * @param manager Entry point to NginxManager. + */ + public static void wafPolicyDelete(com.azure.resourcemanager.nginx.NginxManager manager) { + manager.wafPolicies() + .delete("myResourceGroup", "myDeployment", "myWafPolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### WafPolicy_Get + +```java +/** + * Samples for WafPolicy Get. + */ +public final class WafPolicyGetSamples { + /* + * x-ms-original-file: 2025-03-01-preview/WafPolicy_Get.json + */ + /** + * Sample code: WafPolicy_Get. + * + * @param manager Entry point to NginxManager. + */ + public static void wafPolicyGet(com.azure.resourcemanager.nginx.NginxManager manager) { + manager.wafPolicies() + .getWithResponse("myResourceGroup", "myDeployment", "myWafPolicy", com.azure.core.util.Context.NONE); + } +} +``` + +### WafPolicy_List + +```java +/** + * Samples for WafPolicy List. + */ +public final class WafPolicyListSamples { + /* + * x-ms-original-file: 2025-03-01-preview/WafPolicy_List.json + */ + /** + * Sample code: WafPolicy_List. + * + * @param manager Entry point to NginxManager. + */ + public static void wafPolicyList(com.azure.resourcemanager.nginx.NginxManager manager) { + manager.wafPolicies().list("myResourceGroup", "myDeployment", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/nginx/azure-resourcemanager-nginx/pom.xml b/sdk/nginx/azure-resourcemanager-nginx/pom.xml index d1126ae17043..9e02b7dd6f80 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/pom.xml +++ b/sdk/nginx/azure-resourcemanager-nginx/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Nginx Management - This package contains Microsoft Azure SDK for Nginx Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-11-01-preview. + This package contains Microsoft Azure SDK for Nginx Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2025-03-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -46,7 +46,6 @@ 0 0 true - false diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/NginxManager.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/NginxManager.java index 663857029f3a..06cdb65cff67 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/NginxManager.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/NginxManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx; @@ -28,14 +28,18 @@ import com.azure.resourcemanager.nginx.implementation.ApiKeysImpl; import com.azure.resourcemanager.nginx.implementation.CertificatesImpl; import com.azure.resourcemanager.nginx.implementation.ConfigurationsImpl; +import com.azure.resourcemanager.nginx.implementation.DefaultWafPoliciesImpl; import com.azure.resourcemanager.nginx.implementation.DeploymentsImpl; import com.azure.resourcemanager.nginx.implementation.NginxManagementClientBuilder; import com.azure.resourcemanager.nginx.implementation.OperationsImpl; +import com.azure.resourcemanager.nginx.implementation.WafPoliciesImpl; import com.azure.resourcemanager.nginx.models.ApiKeys; import com.azure.resourcemanager.nginx.models.Certificates; import com.azure.resourcemanager.nginx.models.Configurations; +import com.azure.resourcemanager.nginx.models.DefaultWafPolicies; import com.azure.resourcemanager.nginx.models.Deployments; import com.azure.resourcemanager.nginx.models.Operations; +import com.azure.resourcemanager.nginx.models.WafPolicies; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -48,15 +52,19 @@ * Entry point to NginxManager. */ public final class NginxManager { + private Operations operations; + private ApiKeys apiKeys; - private Certificates certificates; + private Deployments deployments; - private Configurations configurations; + private WafPolicies wafPolicies; - private Deployments deployments; + private DefaultWafPolicies defaultWafPolicies; - private Operations operations; + private Certificates certificates; + + private Configurations configurations; private final NginxManagementClient clientObject; @@ -273,6 +281,18 @@ public NginxManager authenticate(TokenCredential credential, AzureProfile profil } } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of ApiKeys. It manages NginxDeploymentApiKeyResponse. * @@ -286,51 +306,63 @@ public ApiKeys apiKeys() { } /** - * Gets the resource collection API of Certificates. It manages NginxCertificate. + * Gets the resource collection API of Deployments. It manages NginxDeployment. * - * @return Resource collection API of Certificates. + * @return Resource collection API of Deployments. */ - public Certificates certificates() { - if (this.certificates == null) { - this.certificates = new CertificatesImpl(clientObject.getCertificates(), this); + public Deployments deployments() { + if (this.deployments == null) { + this.deployments = new DeploymentsImpl(clientObject.getDeployments(), this); } - return certificates; + return deployments; } /** - * Gets the resource collection API of Configurations. It manages NginxConfigurationResponse. + * Gets the resource collection API of WafPolicies. It manages NginxDeploymentWafPolicy. * - * @return Resource collection API of Configurations. + * @return Resource collection API of WafPolicies. */ - public Configurations configurations() { - if (this.configurations == null) { - this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this); + public WafPolicies wafPolicies() { + if (this.wafPolicies == null) { + this.wafPolicies = new WafPoliciesImpl(clientObject.getWafPolicies(), this); } - return configurations; + return wafPolicies; } /** - * Gets the resource collection API of Deployments. It manages NginxDeployment. + * Gets the resource collection API of DefaultWafPolicies. * - * @return Resource collection API of Deployments. + * @return Resource collection API of DefaultWafPolicies. */ - public Deployments deployments() { - if (this.deployments == null) { - this.deployments = new DeploymentsImpl(clientObject.getDeployments(), this); + public DefaultWafPolicies defaultWafPolicies() { + if (this.defaultWafPolicies == null) { + this.defaultWafPolicies = new DefaultWafPoliciesImpl(clientObject.getDefaultWafPolicies(), this); } - return deployments; + return defaultWafPolicies; } /** - * Gets the resource collection API of Operations. + * Gets the resource collection API of Certificates. It manages NginxCertificate. * - * @return Resource collection API of Operations. + * @return Resource collection API of Certificates. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + public Certificates certificates() { + if (this.certificates == null) { + this.certificates = new CertificatesImpl(clientObject.getCertificates(), this); } - return operations; + return certificates; + } + + /** + * Gets the resource collection API of Configurations. It manages NginxConfigurationResponse. + * + * @return Resource collection API of Configurations. + */ + public Configurations configurations() { + if (this.configurations == null) { + this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this); + } + return configurations; } /** diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ApiKeysClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ApiKeysClient.java index ce0eef06bc5a..46a8bc14537c 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ApiKeysClient.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ApiKeysClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent; @@ -17,24 +17,23 @@ */ public interface ApiKeysClient { /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param apiKeyName The resource name of the API key. - * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the specified API Key of the given Nginx deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body, Context context); + Response getWithResponse(String resourceGroupName, String deploymentName, + String apiKeyName, Context context); /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -42,30 +41,30 @@ Response createOrUpdateWithResponse(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the specified API Key of the given Nginx deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - NginxDeploymentApiKeyResponseInner createOrUpdate(String resourceGroupName, String deploymentName, - String apiKeyName); + NginxDeploymentApiKeyResponseInner get(String resourceGroupName, String deploymentName, String apiKeyName); /** - * Delete API key for Nginx deployment. + * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param apiKeyName The resource name of the API key. + * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return nginx Deployment Api Key Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body, Context context); /** - * Delete API key for Nginx deployment. + * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -73,12 +72,14 @@ Response deleteWithResponse(String resourceGroupName, String deploymentNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Api Key Response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String deploymentName, String apiKeyName); + NginxDeploymentApiKeyResponseInner createOrUpdate(String resourceGroupName, String deploymentName, + String apiKeyName); /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -87,14 +88,14 @@ Response deleteWithResponse(String resourceGroupName, String deploymentNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String deploymentName, - String apiKeyName, Context context); + Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, + Context context); /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -102,10 +103,9 @@ Response getWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - NginxDeploymentApiKeyResponseInner get(String resourceGroupName, String deploymentName, String apiKeyName); + void delete(String resourceGroupName, String deploymentName, String apiKeyName); /** * List all API Keys of the given Nginx deployment. @@ -115,7 +115,7 @@ Response getWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String deploymentName); @@ -129,7 +129,7 @@ Response getWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String deploymentName, diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java index 9d7709226326..316e5c12d2b5 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent; @@ -56,7 +56,7 @@ Response getWithResponse(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxCertificateInner> beginCreateOrUpdate(String resourceGroupName, @@ -73,7 +73,7 @@ SyncPoller, NginxCertificateInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxCertificateInner> beginCreateOrUpdate(String resourceGroupName, @@ -88,7 +88,7 @@ SyncPoller, NginxCertificateInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxCertificateInner createOrUpdate(String resourceGroupName, String deploymentName, String certificateName); @@ -104,7 +104,7 @@ SyncPoller, NginxCertificateInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxCertificateInner createOrUpdate(String resourceGroupName, String deploymentName, String certificateName, @@ -176,7 +176,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Certificate List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String deploymentName); @@ -190,7 +190,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Certificate List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String deploymentName, Context context); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java index 3cfa48548954..edb9e4ed6f86 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent; @@ -20,34 +20,6 @@ * An instance of this class provides access to all the operations defined in ConfigurationsClient. */ public interface ConfigurationsClient { - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String deploymentName); - - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String deploymentName, - Context context); - /** * Get the NGINX configuration of given NGINX deployment. * @@ -90,7 +62,7 @@ Response getWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxConfigurationResponseInner> @@ -108,7 +80,7 @@ Response getWithResponse(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxConfigurationResponseInner> beginCreateOrUpdate( @@ -125,7 +97,7 @@ SyncPoller, NginxConfigurationRespon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String deploymentName, @@ -143,7 +115,7 @@ NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String deploymentName, @@ -211,6 +183,34 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String deploymentName, String configurationName, Context context); + /** + * List the NGINX configuration of given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String deploymentName); + + /** + * List the NGINX configuration of given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String deploymentName, + Context context); + /** * Analyze an NGINX configuration without applying it to the NGINXaaS deployment. * diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DefaultWafPoliciesClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DefaultWafPoliciesClient.java new file mode 100644 index 000000000000..788fecd8ff52 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DefaultWafPoliciesClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner; + +/** + * An instance of this class provides access to all the operations defined in DefaultWafPoliciesClient. + */ +public interface DefaultWafPoliciesClient { + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, + String deploymentName, Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NginxDeploymentDefaultWafPolicyListResponseInner list(String resourceGroupName, String deploymentName); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java index 085c67ff307f..32383144d4f8 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent; @@ -54,7 +54,7 @@ Response getByResourceGroupWithResponse(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxDeploymentInner> beginCreateOrUpdate(String resourceGroupName, @@ -65,12 +65,12 @@ SyncPoller, NginxDeploymentInner> beginCreateOr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxDeploymentInner> beginCreateOrUpdate(String resourceGroupName, @@ -84,7 +84,7 @@ SyncPoller, NginxDeploymentInner> beginCreateOr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentName); @@ -94,12 +94,12 @@ SyncPoller, NginxDeploymentInner> beginCreateOr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentName, NginxDeploymentInner body, @@ -113,7 +113,7 @@ NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxDeploymentInner> beginUpdate(String resourceGroupName, @@ -124,12 +124,12 @@ SyncPoller, NginxDeploymentInner> beginUpdate(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NginxDeploymentInner> beginUpdate(String resourceGroupName, @@ -143,7 +143,7 @@ SyncPoller, NginxDeploymentInner> beginUpdate(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxDeploymentInner update(String resourceGroupName, String deploymentName); @@ -153,12 +153,12 @@ SyncPoller, NginxDeploymentInner> beginUpdate(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) NginxDeploymentInner update(String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, @@ -217,49 +217,49 @@ NginxDeploymentInner update(String resourceGroupName, String deploymentName, Ngi void delete(String resourceGroupName, String deploymentName, Context context); /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable list(Context context); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java index 61c60ad89dff..79c50677bed0 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent; @@ -12,26 +12,26 @@ */ public interface NginxManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,6 +46,13 @@ public interface NginxManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the ApiKeysClient object to access its operations. * @@ -54,30 +61,37 @@ public interface NginxManagementClient { ApiKeysClient getApiKeys(); /** - * Gets the CertificatesClient object to access its operations. + * Gets the DeploymentsClient object to access its operations. * - * @return the CertificatesClient object. + * @return the DeploymentsClient object. */ - CertificatesClient getCertificates(); + DeploymentsClient getDeployments(); /** - * Gets the ConfigurationsClient object to access its operations. + * Gets the WafPoliciesClient object to access its operations. * - * @return the ConfigurationsClient object. + * @return the WafPoliciesClient object. */ - ConfigurationsClient getConfigurations(); + WafPoliciesClient getWafPolicies(); /** - * Gets the DeploymentsClient object to access its operations. + * Gets the DefaultWafPoliciesClient object to access its operations. * - * @return the DeploymentsClient object. + * @return the DefaultWafPoliciesClient object. */ - DeploymentsClient getDeployments(); + DefaultWafPoliciesClient getDefaultWafPolicies(); /** - * Gets the OperationsClient object to access its operations. + * Gets the CertificatesClient object to access its operations. * - * @return the OperationsClient object. + * @return the CertificatesClient object. */ - OperationsClient getOperations(); + CertificatesClient getCertificates(); + + /** + * Gets the ConfigurationsClient object to access its operations. + * + * @return the ConfigurationsClient object. + */ + ConfigurationsClient getConfigurations(); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java index 1613e2f07bea..154abe48c92e 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent; @@ -8,33 +8,33 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; /** * An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable list(); /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable list(Context context); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/WafPoliciesClient.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/WafPoliciesClient.java new file mode 100644 index 000000000000..f4c1f0d1e872 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/WafPoliciesClient.java @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner; + +/** + * An instance of this class provides access to all the operations defined in WafPoliciesClient. + */ +public interface WafPoliciesClient { + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String deploymentName); + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String deploymentName, + Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NginxDeploymentWafPolicyInner get(String resourceGroupName, String deploymentName, String wafPolicyName); + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NginxDeploymentWafPolicyInner> + beginCreate(String resourceGroupName, String deploymentName, String wafPolicyName); + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NginxDeploymentWafPolicyInner> beginCreate( + String resourceGroupName, String deploymentName, String wafPolicyName, NginxDeploymentWafPolicyInner body, + Context context); + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NginxDeploymentWafPolicyInner create(String resourceGroupName, String deploymentName, String wafPolicyName); + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NginxDeploymentWafPolicyInner create(String resourceGroupName, String deploymentName, String wafPolicyName, + NginxDeploymentWafPolicyInner body, Context context); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, + String wafPolicyName); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String deploymentName, String wafPolicyName); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String deploymentName, String wafPolicyName, Context context); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/AnalysisResultInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/AnalysisResultInner.java index 0e15a54b3d7c..132a47fc1cb6 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/AnalysisResultInner.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/AnalysisResultInner.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +15,7 @@ /** * The response body for an analysis request. Contains the status of the analysis and any errors. */ -@Fluent +@Immutable public final class AnalysisResultInner implements JsonSerializable { /* * The status of the analysis. @@ -31,7 +30,7 @@ public final class AnalysisResultInner implements JsonSerializable { + /* + * The value property. + */ + private List value; + + /* + * The nextLink property. + */ + private String nextLink; + + /** + * Creates an instance of NginxDeploymentDefaultWafPolicyListResponseInner class. + */ + private NginxDeploymentDefaultWafPolicyListResponseInner() { + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentDefaultWafPolicyListResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentDefaultWafPolicyListResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentDefaultWafPolicyListResponseInner. + */ + public static NginxDeploymentDefaultWafPolicyListResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentDefaultWafPolicyListResponseInner deserializedNginxDeploymentDefaultWafPolicyListResponseInner + = new NginxDeploymentDefaultWafPolicyListResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NginxDeploymentDefaultWafPolicyProperties.fromJson(reader1)); + deserializedNginxDeploymentDefaultWafPolicyListResponseInner.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNginxDeploymentDefaultWafPolicyListResponseInner.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentDefaultWafPolicyListResponseInner; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java index 64521a2b6b5d..60e9cb4428e8 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent.models; @@ -17,27 +17,27 @@ import java.util.Map; /** - * The NginxDeployment model. + * Nginx Deployment. */ @Fluent public final class NginxDeploymentInner extends Resource { /* - * The identity property. + * Nginx Deployment Properties */ - private IdentityProperties identity; + private NginxDeploymentProperties properties; /* - * The properties property. + * Identity Properties */ - private NginxDeploymentProperties properties; + private IdentityProperties identity; /* - * The sku property. + * Resource Sku */ private ResourceSku sku; /* - * Metadata pertaining to creation and last modification of the resource. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; @@ -63,47 +63,47 @@ public NginxDeploymentInner() { } /** - * Get the identity property: The identity property. + * Get the properties property: Nginx Deployment Properties. * - * @return the identity value. + * @return the properties value. */ - public IdentityProperties identity() { - return this.identity; + public NginxDeploymentProperties properties() { + return this.properties; } /** - * Set the identity property: The identity property. + * Set the properties property: Nginx Deployment Properties. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the NginxDeploymentInner object itself. */ - public NginxDeploymentInner withIdentity(IdentityProperties identity) { - this.identity = identity; + public NginxDeploymentInner withProperties(NginxDeploymentProperties properties) { + this.properties = properties; return this; } /** - * Get the properties property: The properties property. + * Get the identity property: Identity Properties. * - * @return the properties value. + * @return the identity value. */ - public NginxDeploymentProperties properties() { - return this.properties; + public IdentityProperties identity() { + return this.identity; } /** - * Set the properties property: The properties property. + * Set the identity property: Identity Properties. * - * @param properties the properties value to set. + * @param identity the identity value to set. * @return the NginxDeploymentInner object itself. */ - public NginxDeploymentInner withProperties(NginxDeploymentProperties properties) { - this.properties = properties; + public NginxDeploymentInner withIdentity(IdentityProperties identity) { + this.identity = identity; return this; } /** - * Get the sku property: The sku property. + * Get the sku property: Resource Sku. * * @return the sku value. */ @@ -112,7 +112,7 @@ public ResourceSku sku() { } /** - * Set the sku property: The sku property. + * Set the sku property: Resource Sku. * * @param sku the sku value to set. * @return the NginxDeploymentInner object itself. @@ -123,7 +123,7 @@ public NginxDeploymentInner withSku(ResourceSku sku) { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -179,23 +179,6 @@ public NginxDeploymentInner withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ @@ -204,8 +187,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -237,10 +220,10 @@ public static NginxDeploymentInner fromJson(JsonReader jsonReader) throws IOExce } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedNginxDeploymentInner.withTags(tags); - } else if ("identity".equals(fieldName)) { - deserializedNginxDeploymentInner.identity = IdentityProperties.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedNginxDeploymentInner.properties = NginxDeploymentProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedNginxDeploymentInner.identity = IdentityProperties.fromJson(reader); } else if ("sku".equals(fieldName)) { deserializedNginxDeploymentInner.sku = ResourceSku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentScalingPropertiesAutoScaleSettings.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentScalingPropertiesAutoScaleSettings.java index 18272c09b5c6..66e90f4c3134 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentScalingPropertiesAutoScaleSettings.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentScalingPropertiesAutoScaleSettings.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -52,24 +51,6 @@ public NginxDeploymentScalingPropertiesAutoScaleSettings withProfiles(List e.validate()); - } - } - - private static final ClientLogger LOGGER - = new ClientLogger(NginxDeploymentScalingPropertiesAutoScaleSettings.class); - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyInner.java new file mode 100644 index 000000000000..ecb2fc3110f4 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyInner.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyProperties; +import java.io.IOException; + +/** + * Nginx Deployment Waf Policy. + */ +@Fluent +public final class NginxDeploymentWafPolicyInner extends ProxyResource { + /* + * Nginx Deployment Waf Policy Properties + */ + private NginxDeploymentWafPolicyProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NginxDeploymentWafPolicyInner class. + */ + public NginxDeploymentWafPolicyInner() { + } + + /** + * Get the properties property: Nginx Deployment Waf Policy Properties. + * + * @return the properties value. + */ + public NginxDeploymentWafPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Nginx Deployment Waf Policy Properties. + * + * @param properties the properties value to set. + * @return the NginxDeploymentWafPolicyInner object itself. + */ + public NginxDeploymentWafPolicyInner withProperties(NginxDeploymentWafPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyInner. + */ + public static NginxDeploymentWafPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyInner deserializedNginxDeploymentWafPolicyInner + = new NginxDeploymentWafPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyInner.properties + = NginxDeploymentWafPolicyProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyInner; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyMetadataInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyMetadataInner.java new file mode 100644 index 000000000000..2f99c4f543ca --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyMetadataInner.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyMetadataProperties; +import java.io.IOException; + +/** + * Nginx Deployment Waf Policy Metadata. + */ +@Immutable +public final class NginxDeploymentWafPolicyMetadataInner + implements JsonSerializable { + /* + * The id property. + */ + private String id; + + /* + * The name property. + */ + private String name; + + /* + * The type property. + */ + private String type; + + /* + * Nginx Deployment Waf Policy Metadata Properties + */ + private NginxDeploymentWafPolicyMetadataProperties properties; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + private SystemData systemData; + + /** + * Creates an instance of NginxDeploymentWafPolicyMetadataInner class. + */ + private NginxDeploymentWafPolicyMetadataInner() { + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the properties property: Nginx Deployment Waf Policy Metadata Properties. + * + * @return the properties value. + */ + public NginxDeploymentWafPolicyMetadataProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyMetadataInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyMetadataInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyMetadataInner. + */ + public static NginxDeploymentWafPolicyMetadataInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyMetadataInner deserializedNginxDeploymentWafPolicyMetadataInner + = new NginxDeploymentWafPolicyMetadataInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataInner.properties + = NginxDeploymentWafPolicyMetadataProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyMetadataInner; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationInner.java new file mode 100644 index 000000000000..3d7d4d7b2858 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationInner.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.nginx.models.ActionType; +import com.azure.resourcemanager.nginx.models.OperationDisplay; +import com.azure.resourcemanager.nginx.models.Origin; +import java.io.IOException; + +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Immutable +public final class OperationInner implements JsonSerializable { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. + */ + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" + */ + private Origin origin; + + /* + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + private ActionType actionType; + + /** + * Creates an instance of OperationInner class. + */ + private OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.display); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = Origin.fromString(reader.getString()); + } else if ("actionType".equals(fieldName)) { + deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java deleted file mode 100644 index 624a3ec16a28..000000000000 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationResultInner.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.nginx.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.nginx.models.OperationDisplay; -import java.io.IOException; - -/** - * A Nginx.NginxPlus REST API operation. - */ -@Fluent -public final class OperationResultInner implements JsonSerializable { - /* - * Operation name: {provider}/{resource}/{operation} - */ - private String name; - - /* - * The object that represents the operation. - */ - private OperationDisplay display; - - /* - * Indicates whether the operation is a data action - */ - private Boolean isDataAction; - - /** - * Creates an instance of OperationResultInner class. - */ - public OperationResultInner() { - } - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the OperationResultInner object itself. - */ - public OperationResultInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: The object that represents the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: The object that represents the operation. - * - * @param display the display value to set. - * @return the OperationResultInner object itself. - */ - public OperationResultInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationResultInner object itself. - */ - public OperationResultInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("display", this.display); - jsonWriter.writeBooleanField("isDataAction", this.isDataAction); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationResultInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationResultInner. - */ - public static OperationResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationResultInner deserializedOperationResultInner = new OperationResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationResultInner.name = reader.getString(); - } else if ("display".equals(fieldName)) { - deserializedOperationResultInner.display = OperationDisplay.fromJson(reader); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationResultInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationResultInner; - }); - } -} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java index 4dfcbd3ace9a..a51fdb7f8b1b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for NginxManagementClient. - * null. + * Package containing the inner data models for Nginx. */ package com.azure.resourcemanager.nginx.fluent.models; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java index 817b872a38ee..e5b8c70e374b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for NginxManagementClient. - * null. + * Package containing the service clients for Nginx. */ package com.azure.resourcemanager.nginx.fluent; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/AnalysisResultImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/AnalysisResultImpl.java index b46c97fc6aea..ee432a09f116 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/AnalysisResultImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/AnalysisResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysClientImpl.java index d7bedf8a4f91..26ef310f0140 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysClientImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.nginx.fluent.ApiKeysClient; import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner; -import com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyListResponse; +import com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentApiKeyListResponse; import com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyRequest; import reactor.core.publisher.Mono; @@ -62,148 +62,130 @@ public final class ApiKeysClientImpl implements ApiKeysClient { * The interface defining all the services for NginxManagementClientApiKeys to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NginxManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientApiKeys") public interface ApiKeysService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NginxDeploymentApiKeyRequest body, @HeaderParam("Accept") String accept, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NginxDeploymentApiKeyRequest body, Context context); @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NginxDeploymentApiKeyRequest body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys/{apiKeyName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @PathParam("apiKeyName") String apiKeyName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/apiKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param apiKeyName The resource name of the API key. - * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the specified API Key of the given Nginx deployment along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (apiKeyName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiKeyName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String deploymentName, String apiKeyName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, apiKeyName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, apiKeyName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param apiKeyName The resource name of the API key. - * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (apiKeyName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiKeyName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, apiKeyName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -211,37 +193,37 @@ private Mono> createOrUpdateWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return the specified API Key of the given Nginx deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String deploymentName, String apiKeyName) { - final NginxDeploymentApiKeyRequest body = null; - return createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, apiKeyName, body) + private Mono getAsync(String resourceGroupName, String deploymentName, + String apiKeyName) { + return getWithResponseAsync(resourceGroupName, deploymentName, apiKeyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param apiKeyName The resource name of the API key. - * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the specified API Key of the given Nginx deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, apiKeyName, body, context).block(); + public Response getWithResponse(String resourceGroupName, String deploymentName, + String apiKeyName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, apiKeyName, accept, context); } /** - * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -249,95 +231,37 @@ public Response createOrUpdateWithResponse(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the specified API Key of the given Nginx deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NginxDeploymentApiKeyResponseInner createOrUpdate(String resourceGroupName, String deploymentName, - String apiKeyName) { - final NginxDeploymentApiKeyRequest body = null; - return createOrUpdateWithResponse(resourceGroupName, deploymentName, apiKeyName, body, Context.NONE).getValue(); + public NginxDeploymentApiKeyResponseInner get(String resourceGroupName, String deploymentName, String apiKeyName) { + return getWithResponse(resourceGroupName, deploymentName, apiKeyName, Context.NONE).getValue(); } /** - * Delete API key for Nginx deployment. + * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param apiKeyName The resource name of the API key. + * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return nginx Deployment Api Key Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String deploymentName, - String apiKeyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (apiKeyName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiKeyName is required and cannot be null.")); - } + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, apiKeyName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, apiKeyName, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete API key for Nginx deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param apiKeyName The resource name of the API key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String deploymentName, - String apiKeyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (apiKeyName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiKeyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, apiKeyName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete API key for Nginx deployment. + * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -345,33 +269,39 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return nginx Deployment Api Key Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String deploymentName, String apiKeyName) { - return deleteWithResponseAsync(resourceGroupName, deploymentName, apiKeyName).flatMap(ignored -> Mono.empty()); + private Mono createOrUpdateAsync(String resourceGroupName, + String deploymentName, String apiKeyName) { + final NginxDeploymentApiKeyRequest body = null; + return createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, apiKeyName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete API key for Nginx deployment. + * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param apiKeyName The resource name of the API key. + * @param body The API Key object containing fields (e.g. secret text, expiration date) to upsert the key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return nginx Deployment Api Key Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, deploymentName, apiKeyName, context).block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String deploymentName, String apiKeyName, NginxDeploymentApiKeyRequest body, Context context) { + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, apiKeyName, accept, body, context); } /** - * Delete API key for Nginx deployment. + * Create or update an API Key for the Nginx deployment in order to access the dataplane API endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -379,14 +309,17 @@ public Response deleteWithResponse(String resourceGroupName, String deploy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Api Key Response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String deploymentName, String apiKeyName) { - deleteWithResponse(resourceGroupName, deploymentName, apiKeyName, Context.NONE); + public NginxDeploymentApiKeyResponseInner createOrUpdate(String resourceGroupName, String deploymentName, + String apiKeyName) { + final NginxDeploymentApiKeyRequest body = null; + return createOrUpdateWithResponse(resourceGroupName, deploymentName, apiKeyName, body, Context.NONE).getValue(); } /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -394,79 +327,19 @@ public void delete(String resourceGroupName, String deploymentName, String apiKe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String deploymentName, String apiKeyName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (apiKeyName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiKeyName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono> deleteWithResponseAsync(String resourceGroupName, String deploymentName, + String apiKeyName) { return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, apiKeyName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, apiKeyName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the specified API Key of the given Nginx deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param apiKeyName The resource name of the API key. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String deploymentName, String apiKeyName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (apiKeyName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiKeyName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, apiKeyName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -474,17 +347,15 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String deploymentName, - String apiKeyName) { - return getWithResponseAsync(resourceGroupName, deploymentName, apiKeyName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String deploymentName, String apiKeyName) { + return deleteWithResponseAsync(resourceGroupName, deploymentName, apiKeyName).flatMap(ignored -> Mono.empty()); } /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -493,16 +364,17 @@ private Mono getAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String deploymentName, - String apiKeyName, Context context) { - return getWithResponseAsync(resourceGroupName, deploymentName, apiKeyName, context).block(); + public Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, apiKeyName, context); } /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -510,11 +382,10 @@ public Response getWithResponse(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NginxDeploymentApiKeyResponseInner get(String resourceGroupName, String deploymentName, String apiKeyName) { - return getWithResponse(resourceGroupName, deploymentName, apiKeyName, Context.NONE).getValue(); + public void delete(String resourceGroupName, String deploymentName, String apiKeyName) { + deleteWithResponse(resourceGroupName, deploymentName, apiKeyName, Context.NONE); } /** @@ -525,30 +396,16 @@ public NginxDeploymentApiKeyResponseInner get(String resourceGroupName, String d * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment Api Key List Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -559,37 +416,15 @@ private Mono> listSinglePageAs * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, deploymentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String deploymentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -600,12 +435,17 @@ private Mono> listSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Deployment Api Key List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String deploymentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String deploymentName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -617,13 +457,17 @@ private PagedFlux listAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Deployment Api Key List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String deploymentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String deploymentName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -634,11 +478,12 @@ private PagedFlux listAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String deploymentName) { - return new PagedIterable<>(listAsync(resourceGroupName, deploymentName)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName), + nextLink -> listNextSinglePage(nextLink)); } /** @@ -650,12 +495,13 @@ public PagedIterable list(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String deploymentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, deploymentName, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -665,17 +511,11 @@ public PagedIterable list(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment Api Key List Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -683,6 +523,24 @@ private Mono> listNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Api Key List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -691,22 +549,14 @@ private Mono> listNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment Api Key List Response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysImpl.java index f929b2607cc7..0ffff94f2aaf 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -26,15 +26,6 @@ public ApiKeysImpl(ApiKeysClient innerClient, com.azure.resourcemanager.nginx.Ng this.serviceManager = serviceManager; } - public Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, deploymentName, apiKeyName, context); - } - - public void delete(String resourceGroupName, String deploymentName, String apiKeyName) { - this.serviceClient().delete(resourceGroupName, deploymentName, apiKeyName); - } - public Response getWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, Context context) { Response inner @@ -57,6 +48,15 @@ public NginxDeploymentApiKeyResponse get(String resourceGroupName, String deploy } } + public Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, deploymentName, apiKeyName, context); + } + + public void delete(String resourceGroupName, String deploymentName, String apiKeyName) { + this.serviceClient().delete(resourceGroupName, deploymentName, apiKeyName); + } + public PagedIterable list(String resourceGroupName, String deploymentName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, deploymentName); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java index 14126560be26..1e87521e460b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -27,13 +27,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.nginx.fluent.CertificatesClient; import com.azure.resourcemanager.nginx.fluent.models.NginxCertificateInner; -import com.azure.resourcemanager.nginx.models.NginxCertificateListResponse; +import com.azure.resourcemanager.nginx.implementation.models.NginxCertificateListResponse; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,56 +68,103 @@ public final class CertificatesClientImpl implements CertificatesClient { * The interface defining all the services for NginxManagementClientCertificates to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NginxManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientCertificates") public interface CertificatesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("certificateName") String certificateName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") NginxCertificateInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, @BodyParam("application/json") NginxCertificateInner body, + Context context); @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("certificateName") String certificateName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NginxCertificateInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("certificateName") String certificateName, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -135,73 +183,13 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String deploymentName, String certificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, certificateName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a certificate of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param certificateName The name of certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a certificate of given NGINX deployment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String deploymentName, - String certificateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, certificateName, this.client.getApiVersion(), accept, context); - } - /** * Get a certificate of given NGINX deployment. * @@ -235,7 +223,9 @@ private Mono getAsync(String resourceGroupName, String de @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String deploymentName, String certificateName, Context context) { - return getWithResponseAsync(resourceGroupName, deploymentName, certificateName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, certificateName, accept, context); } /** @@ -264,40 +254,40 @@ public NginxCertificateInner get(String resourceGroupName, String deploymentName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, certificateName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Create or update the NGINX certificates for given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param certificateName The name of certificate. + * @param body The certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String deploymentName, + String certificateName, NginxCertificateInner body) { + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, accept, body, + Context.NONE); + } + /** * Create or update the NGINX certificates for given NGINX deployment. * @@ -309,37 +299,14 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String deploymentName, String certificateName, NginxCertificateInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String deploymentName, + String certificateName, NginxCertificateInner body, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, certificateName, this.client.getApiVersion(), body, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, accept, body, context); } /** @@ -352,7 +319,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxCertificateInner> beginCreateOrUpdateAsync( @@ -373,7 +340,7 @@ private PollerFlux, NginxCertificateInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxCertificateInner> @@ -393,21 +360,18 @@ private PollerFlux, NginxCertificateInner> beg * @param deploymentName The name of targeted NGINX deployment. * @param certificateName The name of certificate. * @param body The certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NginxCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, certificateName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NginxCertificateInner.class, NginxCertificateInner.class, context); + public SyncPoller, NginxCertificateInner> beginCreateOrUpdate( + String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentName, certificateName, body); + return this.client.getLroResult(response, + NginxCertificateInner.class, NginxCertificateInner.class, Context.NONE); } /** @@ -419,13 +383,16 @@ private PollerFlux, NginxCertificateInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxCertificateInner> beginCreateOrUpdate(String resourceGroupName, String deploymentName, String certificateName) { final NginxCertificateInner body = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, deploymentName, certificateName, body).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentName, certificateName, body); + return this.client.getLroResult(response, + NginxCertificateInner.class, NginxCertificateInner.class, Context.NONE); } /** @@ -439,14 +406,16 @@ private PollerFlux, NginxCertificateInner> beg * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Certificate. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxCertificateInner> beginCreateOrUpdate( String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, deploymentName, certificateName, body, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentName, certificateName, body, context); + return this.client.getLroResult(response, + NginxCertificateInner.class, NginxCertificateInner.class, context); } /** @@ -459,7 +428,7 @@ public SyncPoller, NginxCertificateInner> begi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, @@ -477,7 +446,7 @@ private Mono createOrUpdateAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, @@ -487,26 +456,6 @@ private Mono createOrUpdateAsync(String resourceGroupName .flatMap(this.client::getLroFinalResultOrError); } - /** - * Create or update the NGINX certificates for given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param certificateName The name of certificate. - * @param body The certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, - String certificateName, NginxCertificateInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, certificateName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Create or update the NGINX certificates for given NGINX deployment. * @@ -516,13 +465,13 @@ private Mono createOrUpdateAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) public NginxCertificateInner createOrUpdate(String resourceGroupName, String deploymentName, String certificateName) { final NginxCertificateInner body = null; - return createOrUpdateAsync(resourceGroupName, deploymentName, certificateName, body).block(); + return beginCreateOrUpdate(resourceGroupName, deploymentName, certificateName, body).getFinalResult(); } /** @@ -536,12 +485,12 @@ public NginxCertificateInner createOrUpdate(String resourceGroupName, String dep * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) public NginxCertificateInner createOrUpdate(String resourceGroupName, String deploymentName, String certificateName, NginxCertificateInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, deploymentName, certificateName, body, context).block(); + return beginCreateOrUpdate(resourceGroupName, deploymentName, certificateName, body, context).getFinalResult(); } /** @@ -558,29 +507,9 @@ public NginxCertificateInner createOrUpdate(String resourceGroupName, String dep @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName, String certificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, certificateName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -590,38 +519,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param certificateName The name of certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName, - String certificateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, certificateName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String deploymentName, + String certificateName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, Context.NONE); } /** @@ -630,18 +537,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param certificateName The name of certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName, - String certificateName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, deploymentName, certificateName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String deploymentName, + String certificateName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, certificateName, context); } /** @@ -650,7 +556,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param certificateName The name of certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -658,12 +563,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName, - String certificateName, Context context) { - context = this.client.mergeContext(context); + String certificateName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, deploymentName, certificateName, context); + = deleteWithResponseAsync(resourceGroupName, deploymentName, certificateName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -680,7 +584,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, String certificateName) { - return this.beginDeleteAsync(resourceGroupName, deploymentName, certificateName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, deploymentName, certificateName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -698,7 +603,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, String certificateName, Context context) { - return this.beginDeleteAsync(resourceGroupName, deploymentName, certificateName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, deploymentName, certificateName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -718,25 +624,6 @@ private Mono deleteAsync(String resourceGroupName, String deploymentName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Deletes a certificate from the NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param certificateName The name of certificate. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String deploymentName, String certificateName, - Context context) { - return beginDeleteAsync(resourceGroupName, deploymentName, certificateName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Deletes a certificate from the NGINX deployment. * @@ -749,7 +636,7 @@ private Mono deleteAsync(String resourceGroupName, String deploymentName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String deploymentName, String certificateName) { - deleteAsync(resourceGroupName, deploymentName, certificateName).block(); + beginDelete(resourceGroupName, deploymentName, certificateName).getFinalResult(); } /** @@ -765,7 +652,7 @@ public void delete(String resourceGroupName, String deploymentName, String certi */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String deploymentName, String certificateName, Context context) { - deleteAsync(resourceGroupName, deploymentName, certificateName, context).block(); + beginDelete(resourceGroupName, deploymentName, certificateName, context).getFinalResult(); } /** @@ -776,30 +663,16 @@ public void delete(String resourceGroupName, String deploymentName, String certi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Certificate List Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -810,37 +683,15 @@ private Mono> listSinglePageAsync(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Certificate List Response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, deploymentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String deploymentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -851,12 +702,16 @@ private Mono> listSinglePageAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Certificate List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String deploymentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String deploymentName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -868,13 +723,17 @@ private PagedFlux listAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Certificate List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String deploymentName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String deploymentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -885,11 +744,12 @@ private PagedFlux listAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Certificate List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String deploymentName) { - return new PagedIterable<>(listAsync(resourceGroupName, deploymentName)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName), + nextLink -> listNextSinglePage(nextLink)); } /** @@ -901,11 +761,12 @@ public PagedIterable list(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Certificate List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String deploymentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, deploymentName, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -915,17 +776,11 @@ public PagedIterable list(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Certificate List Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -933,6 +788,24 @@ private Mono> listNextSinglePageAsync(Strin .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Certificate List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -941,21 +814,14 @@ private Mono> listNextSinglePageAsync(Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Certificate List Response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java index 70fdd627b653..ea623d744450 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java index 1ce9464f24d0..0e8126b17896 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -28,6 +28,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,8 +36,8 @@ import com.azure.resourcemanager.nginx.fluent.ConfigurationsClient; import com.azure.resourcemanager.nginx.fluent.models.AnalysisResultInner; import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationResponseInner; +import com.azure.resourcemanager.nginx.implementation.models.NginxConfigurationListResponse; import com.azure.resourcemanager.nginx.models.AnalysisCreate; -import com.azure.resourcemanager.nginx.models.NginxConfigurationListResponse; import com.azure.resourcemanager.nginx.models.NginxConfigurationRequest; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,212 +72,128 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { * The interface defining all the services for NginxManagementClientConfigurations to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NginxManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientConfigurations") public interface ConfigurationsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentName") String deploymentName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, - @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, - @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NginxConfigurationRequest body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxConfigurationRequest body, Context context); @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxConfigurationRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, - @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") String configurationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, + @PathParam("configurationName") String configurationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> analysis(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AnalysisCreate body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/configurations/{configurationName}/analyze") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> analysis(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response analysisSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("deploymentName") String deploymentName, - @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AnalysisCreate body, @HeaderParam("Accept") String accept, Context context); + @PathParam("configurationName") String configurationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AnalysisCreate body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, deploymentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String deploymentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String deploymentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String deploymentName) { - return new PagedIterable<>(listAsync(resourceGroupName, deploymentName)); - } - - /** - * List the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String deploymentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, deploymentName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -295,74 +212,13 @@ public PagedIterable list(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String deploymentName, String configurationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, configurationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the NGINX configuration of given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of - * NGINX conf. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NGINX configuration of given NGINX deployment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String deploymentName, String configurationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, configurationName, this.client.getApiVersion(), accept, context); - } - /** * Get the NGINX configuration of given NGINX deployment. * @@ -398,7 +254,9 @@ private Mono getAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String deploymentName, String configurationName, Context context) { - return getWithResponseAsync(resourceGroupName, deploymentName, configurationName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, configurationName, accept, context); } /** @@ -430,41 +288,41 @@ public NginxConfigurationResponseInner get(String resourceGroupName, String depl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Configuration Response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationRequest body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, configurationName, this.client.getApiVersion(), body, accept, + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Create or update the NGINX configuration for given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of + * NGINX conf. + * @param body The NGINX configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Configuration Response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String deploymentName, + String configurationName, NginxConfigurationRequest body) { + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, accept, body, + Context.NONE); + } + /** * Create or update the NGINX configuration for given NGINX deployment. * @@ -477,37 +335,15 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Configuration Response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String deploymentName, String configurationName, NginxConfigurationRequest body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String deploymentName, + String configurationName, NginxConfigurationRequest body, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, configurationName, this.client.getApiVersion(), body, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, accept, body, + context); } /** @@ -521,7 +357,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxConfigurationResponseInner> @@ -544,7 +380,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxConfigurationResponseInner> @@ -565,22 +401,18 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. * @param body The NGINX configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NginxConfigurationResponseInner> - beginCreateOrUpdateAsync(String resourceGroupName, String deploymentName, String configurationName, - NginxConfigurationRequest body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, configurationName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, - context); + public SyncPoller, NginxConfigurationResponseInner> beginCreateOrUpdate( + String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationRequest body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentName, configurationName, body); + return this.client.getLroResult(response, + NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, Context.NONE); } /** @@ -593,14 +425,16 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxConfigurationResponseInner> beginCreateOrUpdate(String resourceGroupName, String deploymentName, String configurationName) { final NginxConfigurationRequest body = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentName, configurationName, body); + return this.client.getLroResult(response, + NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, Context.NONE); } /** @@ -615,14 +449,16 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxConfigurationResponseInner> beginCreateOrUpdate( String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationRequest body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, deploymentName, configurationName, body, context); + return this.client.getLroResult(response, + NginxConfigurationResponseInner.class, NginxConfigurationResponseInner.class, context); } /** @@ -636,7 +472,7 @@ public SyncPoller, NginxConfiguratio * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Configuration Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, @@ -655,7 +491,7 @@ private Mono createOrUpdateAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Configuration Response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, @@ -672,37 +508,16 @@ private Mono createOrUpdateAsync(String resourc * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. - * @param body The NGINX configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, - String configurationName, NginxConfigurationRequest body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the NGINX configuration for given NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of - * NGINX conf. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.SINGLE) public NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String deploymentName, String configurationName) { final NginxConfigurationRequest body = null; - return createOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body).block(); + return beginCreateOrUpdate(resourceGroupName, deploymentName, configurationName, body).getFinalResult(); } /** @@ -717,12 +532,13 @@ public NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Configuration Response. */ @ServiceMethod(returns = ReturnType.SINGLE) public NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, String deploymentName, String configurationName, NginxConfigurationRequest body, Context context) { - return createOrUpdateAsync(resourceGroupName, deploymentName, configurationName, body, context).block(); + return beginCreateOrUpdate(resourceGroupName, deploymentName, configurationName, body, context) + .getFinalResult(); } /** @@ -740,29 +556,9 @@ public NginxConfigurationResponseInner createOrUpdate(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName, String configurationName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, configurationName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -773,38 +569,16 @@ private Mono>> deleteWithResponseAsync(String resource * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName, - String configurationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, configurationName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String deploymentName, + String configurationName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, Context.NONE); } /** @@ -814,18 +588,17 @@ private Mono>> deleteWithResponseAsync(String resource * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName, - String configurationName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, deploymentName, configurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String deploymentName, + String configurationName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, context); } /** @@ -835,7 +608,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -843,12 +615,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName, - String configurationName, Context context) { - context = this.client.mergeContext(context); + String configurationName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, deploymentName, configurationName, context); + = deleteWithResponseAsync(resourceGroupName, deploymentName, configurationName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -866,7 +637,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, String configurationName) { - return this.beginDeleteAsync(resourceGroupName, deploymentName, configurationName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, deploymentName, configurationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -885,7 +657,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, String configurationName, Context context) { - return this.beginDeleteAsync(resourceGroupName, deploymentName, configurationName, context).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, deploymentName, configurationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -913,17 +687,13 @@ private Mono deleteAsync(String resourceGroupName, String deploymentName, * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String deploymentName, String configurationName, - Context context) { - return beginDeleteAsync(resourceGroupName, deploymentName, configurationName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String deploymentName, String configurationName) { + beginDelete(resourceGroupName, deploymentName, configurationName).getFinalResult(); } /** @@ -933,77 +703,129 @@ private Mono deleteAsync(String resourceGroupName, String deploymentName, * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String deploymentName, String configurationName) { - deleteAsync(resourceGroupName, deploymentName, configurationName).block(); + public void delete(String resourceGroupName, String deploymentName, String configurationName, Context context) { + beginDelete(resourceGroupName, deploymentName, configurationName, context).getFinalResult(); } /** - * Reset the NGINX configuration of given NGINX deployment to default. + * List the NGINX configuration of given NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of - * NGINX conf. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String deploymentName, String configurationName, Context context) { - deleteAsync(resourceGroupName, deploymentName, configurationName, context).block(); + private Mono> listSinglePageAsync(String resourceGroupName, + String deploymentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Analyze an NGINX configuration without applying it to the NGINXaaS deployment. + * List the NGINX configuration of given NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of - * NGINX conf. - * @param body The NGINX configuration to analyze. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body for an analysis request along with {@link Response} on successful completion of - * {@link Mono}. + * @return response of a list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String deploymentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the NGINX configuration of given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> analysisWithResponseAsync(String resourceGroupName, - String deploymentName, String configurationName, AnalysisCreate body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, + String deploymentName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.analysis(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, configurationName, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the NGINX configuration of given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String deploymentName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the NGINX configuration of given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String deploymentName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List the NGINX configuration of given NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String deploymentName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -1014,7 +836,6 @@ private Mono> analysisWithResponseAsync(String res * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. * @param body The NGINX configuration to analyze. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1023,33 +844,13 @@ private Mono> analysisWithResponseAsync(String res */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> analysisWithResponseAsync(String resourceGroupName, - String deploymentName, String configurationName, AnalysisCreate body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (configurationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter configurationName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + String deploymentName, String configurationName, AnalysisCreate body) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.analysis(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, configurationName, this.client.getApiVersion(), body, accept, context); + return FluxUtil + .withContext(context -> service.analysis(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1089,7 +890,10 @@ private Mono analysisAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response analysisWithResponse(String resourceGroupName, String deploymentName, String configurationName, AnalysisCreate body, Context context) { - return analysisWithResponseAsync(resourceGroupName, deploymentName, configurationName, body, context).block(); + final String accept = "application/json"; + return service.analysisSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, configurationName, accept, body, + context); } /** @@ -1122,13 +926,6 @@ public AnalysisResultInner analysis(String resourceGroupName, String deploymentN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -1136,6 +933,24 @@ private Mono> listNextSinglePageA .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1144,22 +959,14 @@ private Mono> listNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return response of a list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java index f165898a97d0..ac0fd43d89f2 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -30,21 +30,6 @@ public ConfigurationsImpl(ConfigurationsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String deploymentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, deploymentName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NginxConfigurationResponseImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String deploymentName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, deploymentName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NginxConfigurationResponseImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String deploymentName, String configurationName, Context context) { Response inner @@ -75,6 +60,21 @@ public void delete(String resourceGroupName, String deploymentName, String confi this.serviceClient().delete(resourceGroupName, deploymentName, configurationName, context); } + public PagedIterable list(String resourceGroupName, String deploymentName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, deploymentName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NginxConfigurationResponseImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String deploymentName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, deploymentName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NginxConfigurationResponseImpl(inner1, this.manager())); + } + public Response analysisWithResponse(String resourceGroupName, String deploymentName, String configurationName, AnalysisCreate body, Context context) { Response inner = this.serviceClient() diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesClientImpl.java new file mode 100644 index 000000000000..eb89b5e05cde --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesClientImpl.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DefaultWafPoliciesClient. + */ +public final class DefaultWafPoliciesClientImpl implements DefaultWafPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DefaultWafPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final NginxManagementClientImpl client; + + /** + * Initializes an instance of DefaultWafPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DefaultWafPoliciesClientImpl(NginxManagementClientImpl client) { + this.service = RestProxy.create(DefaultWafPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NginxManagementClientDefaultWafPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientDefaultWafPolicies") + public interface DefaultWafPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/listDefaultWafPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/listDefaultWafPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listWithResponseAsync(String resourceGroupName, String deploymentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, + String deploymentName) { + return listWithResponseAsync(resourceGroupName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String resourceGroupName, + String deploymentName, Context context) { + final String accept = "application/json"; + return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, context); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NginxDeploymentDefaultWafPolicyListResponseInner list(String resourceGroupName, String deploymentName) { + return listWithResponse(resourceGroupName, deploymentName, Context.NONE).getValue(); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesImpl.java new file mode 100644 index 000000000000..f5d21fbfd2a2 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner; +import com.azure.resourcemanager.nginx.models.DefaultWafPolicies; +import com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyListResponse; + +public final class DefaultWafPoliciesImpl implements DefaultWafPolicies { + private static final ClientLogger LOGGER = new ClientLogger(DefaultWafPoliciesImpl.class); + + private final DefaultWafPoliciesClient innerClient; + + private final com.azure.resourcemanager.nginx.NginxManager serviceManager; + + public DefaultWafPoliciesImpl(DefaultWafPoliciesClient innerClient, + com.azure.resourcemanager.nginx.NginxManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse(String resourceGroupName, + String deploymentName, Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, deploymentName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NginxDeploymentDefaultWafPolicyListResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NginxDeploymentDefaultWafPolicyListResponse list(String resourceGroupName, String deploymentName) { + NginxDeploymentDefaultWafPolicyListResponseInner inner + = this.serviceClient().list(resourceGroupName, deploymentName); + if (inner != null) { + return new NginxDeploymentDefaultWafPolicyListResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private DefaultWafPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.nginx.NginxManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java index e000914c8d27..af646e4aeb03 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -28,13 +28,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.nginx.fluent.DeploymentsClient; import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner; -import com.azure.resourcemanager.nginx.models.NginxDeploymentListResponse; +import com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentListResponse; import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -69,66 +70,133 @@ public final class DeploymentsClientImpl implements DeploymentsClient { * The interface defining all the services for NginxManagementClientDeployments to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NginxManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientDeployments") public interface DeploymentsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NginxDeploymentInner body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxDeploymentInner body, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") NginxDeploymentUpdateParameters body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxDeploymentInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxDeploymentUpdateParameters body, Context context); @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") NginxDeploymentUpdateParameters body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") - @ExpectedResponses({ 200, 202, 204 }) + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, + @PathParam("deploymentName") String deploymentName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Nginx.NginxPlus/nginxDeployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Nginx.NginxPlus/nginxDeployments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments") + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -136,15 +204,15 @@ Mono> listByResourceGroup(@HostParam("$hos @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -161,64 +229,13 @@ Mono> listByResourceGroupNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get the NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NGINX deployment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, this.client.getApiVersion(), accept, context); - } - /** * Get the NGINX deployment. * @@ -249,7 +266,9 @@ private Mono getByResourceGroupAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String deploymentName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, deploymentName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context); } /** @@ -272,37 +291,19 @@ public NginxDeploymentInner getByResourceGroup(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String deploymentName, NginxDeploymentInner body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -311,38 +312,38 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String deploymentName, + NginxDeploymentInner body) { + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, body, Context.NONE); + } + + /** + * Create or update the NGINX deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param body The Nginx deployment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String deploymentName, NginxDeploymentInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String deploymentName, + NginxDeploymentInner body, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, this.client.getApiVersion(), body, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, body, context); } /** @@ -350,11 +351,11 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxDeploymentInner> @@ -373,7 +374,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxDeploymentInner> @@ -390,21 +391,18 @@ private Mono>> createOrUpdateWithResponseAsync(String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. - * @param context The context to associate with this operation. + * @param body The Nginx deployment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NginxDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, deploymentName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NginxDeploymentInner.class, NginxDeploymentInner.class, context); + public SyncPoller, NginxDeploymentInner> + beginCreateOrUpdate(String resourceGroupName, String deploymentName, NginxDeploymentInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, deploymentName, body); + return this.client.getLroResult(response, + NginxDeploymentInner.class, NginxDeploymentInner.class, Context.NONE); } /** @@ -415,13 +413,15 @@ private PollerFlux, NginxDeploymentInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxDeploymentInner> beginCreateOrUpdate(String resourceGroupName, String deploymentName) { final NginxDeploymentInner body = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, deploymentName, body).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, deploymentName, body); + return this.client.getLroResult(response, + NginxDeploymentInner.class, NginxDeploymentInner.class, Context.NONE); } /** @@ -429,17 +429,19 @@ private PollerFlux, NginxDeploymentInner> begin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxDeploymentInner> beginCreateOrUpdate( String resourceGroupName, String deploymentName, NginxDeploymentInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, deploymentName, body, context).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, deploymentName, body, context); + return this.client.getLroResult(response, + NginxDeploymentInner.class, NginxDeploymentInner.class, context); } /** @@ -447,11 +449,11 @@ public SyncPoller, NginxDeploymentInner> beginC * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, @@ -468,7 +470,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName) { @@ -482,18 +484,15 @@ private Mono createOrUpdateAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String deploymentName, - NginxDeploymentInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, deploymentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentName) { + final NginxDeploymentInner body = null; + return beginCreateOrUpdate(resourceGroupName, deploymentName, body).getFinalResult(); } /** @@ -501,33 +500,38 @@ private Mono createOrUpdateAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. + * @param body The Nginx deployment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentName) { - final NginxDeploymentInner body = null; - return createOrUpdateAsync(resourceGroupName, deploymentName, body).block(); + public NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentName, + NginxDeploymentInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, deploymentName, body, context).getFinalResult(); } /** - * Create or update the NGINX deployment. + * Update the NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. - * @param context The context to associate with this operation. + * @param body The Nginx deployment update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NginxDeploymentInner createOrUpdate(String resourceGroupName, String deploymentName, - NginxDeploymentInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, deploymentName, body, context).block(); + private Mono>> updateWithResponseAsync(String resourceGroupName, String deploymentName, + NginxDeploymentUpdateParameters body) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -535,38 +539,18 @@ public NginxDeploymentInner createOrUpdate(String resourceGroupName, String depl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String deploymentName, + private Response updateWithResponse(String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, body, Context.NONE); } /** @@ -574,38 +558,19 @@ private Mono>> updateWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return nginx Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String deploymentName, + private Response updateWithResponse(String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, body, context); } /** @@ -613,11 +578,11 @@ private Mono>> updateWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxDeploymentInner> @@ -635,7 +600,7 @@ private Mono>> updateWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NginxDeploymentInner> @@ -651,21 +616,18 @@ private Mono>> updateWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. - * @param context The context to associate with this operation. + * @param body The Nginx deployment update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NginxDeploymentInner> beginUpdateAsync( - String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, deploymentName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - NginxDeploymentInner.class, NginxDeploymentInner.class, context); + public SyncPoller, NginxDeploymentInner> beginUpdate(String resourceGroupName, + String deploymentName, NginxDeploymentUpdateParameters body) { + Response response = updateWithResponse(resourceGroupName, deploymentName, body); + return this.client.getLroResult(response, + NginxDeploymentInner.class, NginxDeploymentInner.class, Context.NONE); } /** @@ -676,13 +638,15 @@ private PollerFlux, NginxDeploymentInner> begin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxDeploymentInner> beginUpdate(String resourceGroupName, String deploymentName) { final NginxDeploymentUpdateParameters body = null; - return this.beginUpdateAsync(resourceGroupName, deploymentName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, deploymentName, body); + return this.client.getLroResult(response, + NginxDeploymentInner.class, NginxDeploymentInner.class, Context.NONE); } /** @@ -690,17 +654,19 @@ public SyncPoller, NginxDeploymentInner> beginU * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of nginx Deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NginxDeploymentInner> beginUpdate(String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) { - return this.beginUpdateAsync(resourceGroupName, deploymentName, body, context).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, deploymentName, body, context); + return this.client.getLroResult(response, + NginxDeploymentInner.class, NginxDeploymentInner.class, context); } /** @@ -708,11 +674,11 @@ public SyncPoller, NginxDeploymentInner> beginU * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String deploymentName, @@ -729,7 +695,7 @@ private Mono updateAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return nginx Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String deploymentName) { @@ -738,25 +704,6 @@ private Mono updateAsync(String resourceGroupName, String .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update the NGINX deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String deploymentName, - NginxDeploymentUpdateParameters body, Context context) { - return beginUpdateAsync(resourceGroupName, deploymentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Update the NGINX deployment. * @@ -765,12 +712,12 @@ private Mono updateAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) public NginxDeploymentInner update(String resourceGroupName, String deploymentName) { final NginxDeploymentUpdateParameters body = null; - return updateAsync(resourceGroupName, deploymentName, body).block(); + return beginUpdate(resourceGroupName, deploymentName, body).getFinalResult(); } /** @@ -778,17 +725,17 @@ public NginxDeploymentInner update(String resourceGroupName, String deploymentNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param body The body parameter. + * @param body The Nginx deployment update parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return nginx Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) public NginxDeploymentInner update(String resourceGroupName, String deploymentName, NginxDeploymentUpdateParameters body, Context context) { - return updateAsync(resourceGroupName, deploymentName, body, context).block(); + return beginUpdate(resourceGroupName, deploymentName, body, context).getFinalResult(); } /** @@ -803,25 +750,9 @@ public NginxDeploymentInner update(String resourceGroupName, String deploymentNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -830,34 +761,15 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - deploymentName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String deploymentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, Context.NONE); } /** @@ -865,16 +777,16 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String deploymentName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, context); } /** @@ -882,19 +794,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, deploymentName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -909,7 +818,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, deploymentName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, deploymentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -926,7 +836,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, deploymentName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, deploymentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -945,23 +856,6 @@ private Mono deleteAsync(String resourceGroupName, String deploymentName) .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete the NGINX deployment resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, deploymentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Delete the NGINX deployment resource. * @@ -973,7 +867,7 @@ private Mono deleteAsync(String resourceGroupName, String deploymentName, */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String deploymentName) { - deleteAsync(resourceGroupName, deploymentName).block(); + beginDelete(resourceGroupName, deploymentName).getFinalResult(); } /** @@ -988,240 +882,201 @@ public void delete(String resourceGroupName, String deploymentName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String deploymentName, Context context) { - deleteAsync(resourceGroupName, deploymentName, context).block(); + beginDelete(resourceGroupName, deploymentName, context).getFinalResult(); } /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Deployment List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Deployment List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Deployment List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return nginx Deployment List Response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -1231,24 +1086,37 @@ public PagedIterable listByResourceGroup(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1257,22 +1125,15 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1282,26 +1143,35 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1310,22 +1180,14 @@ private Mono> listByResourceGroupNextSingleP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nginx Deployment List Response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java index ab2caa88b704..f3953e00f415 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -55,24 +55,24 @@ public void delete(String resourceGroupName, String deploymentName, Context cont this.serviceClient().delete(resourceGroupName, deploymentName, context); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); return ResourceManagerUtils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); return ResourceManagerUtils.mapPage(inner, inner1 -> new NginxDeploymentImpl(inner1, this.manager())); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java index f390f2b2fed1..1c687e7f8521 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationResponseImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationResponseImpl.java index 0bcdff0ac576..f75a52e6deb0 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationResponseImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -84,7 +84,6 @@ public NginxConfigurationResponse create(Context context) { } NginxConfigurationResponseImpl(String name, com.azure.resourcemanager.nginx.NginxManager serviceManager) { - this.innerObject = new NginxConfigurationResponseInner(); this.serviceManager = serviceManager; this.configurationName = name; this.createBody = new NginxConfigurationRequest(); @@ -154,6 +153,6 @@ public NginxConfigurationResponseImpl withProperties(NginxConfigurationRequestPr } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentApiKeyResponseImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentApiKeyResponseImpl.java index 8106e9bfb425..49fde7dfd882 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentApiKeyResponseImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentApiKeyResponseImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner; import com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyRequest; @@ -33,6 +34,10 @@ public NginxDeploymentApiKeyResponseProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -79,7 +84,6 @@ public NginxDeploymentApiKeyResponse create(Context context) { } NginxDeploymentApiKeyResponseImpl(String name, com.azure.resourcemanager.nginx.NginxManager serviceManager) { - this.innerObject = new NginxDeploymentApiKeyResponseInner(); this.serviceManager = serviceManager; this.apiKeyName = name; this.createBody = new NginxDeploymentApiKeyRequest(); @@ -142,6 +146,6 @@ public NginxDeploymentApiKeyResponseImpl withProperties(NginxDeploymentApiKeyReq } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentDefaultWafPolicyListResponseImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentDefaultWafPolicyListResponseImpl.java new file mode 100644 index 000000000000..177e5908129e --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentDefaultWafPolicyListResponseImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner; +import com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyListResponse; +import com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyProperties; +import java.util.Collections; +import java.util.List; + +public final class NginxDeploymentDefaultWafPolicyListResponseImpl + implements NginxDeploymentDefaultWafPolicyListResponse { + private NginxDeploymentDefaultWafPolicyListResponseInner innerObject; + + private final com.azure.resourcemanager.nginx.NginxManager serviceManager; + + NginxDeploymentDefaultWafPolicyListResponseImpl(NginxDeploymentDefaultWafPolicyListResponseInner innerObject, + com.azure.resourcemanager.nginx.NginxManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public NginxDeploymentDefaultWafPolicyListResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.nginx.NginxManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java index 598f11b3f084..d0339c53e279 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -47,14 +47,14 @@ public Map tags() { } } - public IdentityProperties identity() { - return this.innerModel().identity(); - } - public NginxDeploymentProperties properties() { return this.innerModel().properties(); } + public IdentityProperties identity() { + return this.innerModel().identity(); + } + public ResourceSku sku() { return this.innerModel().sku(); } @@ -176,6 +176,11 @@ public NginxDeploymentImpl withTags(Map tags) { } } + public NginxDeploymentImpl withProperties(NginxDeploymentProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + public NginxDeploymentImpl withIdentity(IdentityProperties identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); @@ -186,11 +191,6 @@ public NginxDeploymentImpl withIdentity(IdentityProperties identity) { } } - public NginxDeploymentImpl withProperties(NginxDeploymentProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - public NginxDeploymentImpl withSku(ResourceSku sku) { if (isInCreateMode()) { this.innerModel().withSku(sku); @@ -207,6 +207,6 @@ public NginxDeploymentImpl withProperties(NginxDeploymentUpdateProperties proper } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyImpl.java new file mode 100644 index 000000000000..db721bf7d4b3 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyImpl.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicy; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyProperties; + +public final class NginxDeploymentWafPolicyImpl + implements NginxDeploymentWafPolicy, NginxDeploymentWafPolicy.Definition { + private NginxDeploymentWafPolicyInner innerObject; + + private final com.azure.resourcemanager.nginx.NginxManager serviceManager; + + NginxDeploymentWafPolicyImpl(NginxDeploymentWafPolicyInner innerObject, + com.azure.resourcemanager.nginx.NginxManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public NginxDeploymentWafPolicyProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public NginxDeploymentWafPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.nginx.NginxManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String deploymentName; + + private String wafPolicyName; + + public NginxDeploymentWafPolicyImpl withExistingNginxDeployment(String resourceGroupName, String deploymentName) { + this.resourceGroupName = resourceGroupName; + this.deploymentName = deploymentName; + return this; + } + + public NginxDeploymentWafPolicy create() { + this.innerObject = serviceManager.serviceClient() + .getWafPolicies() + .create(resourceGroupName, deploymentName, wafPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public NginxDeploymentWafPolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWafPolicies() + .create(resourceGroupName, deploymentName, wafPolicyName, this.innerModel(), context); + return this; + } + + NginxDeploymentWafPolicyImpl(String name, com.azure.resourcemanager.nginx.NginxManager serviceManager) { + this.innerObject = new NginxDeploymentWafPolicyInner(); + this.serviceManager = serviceManager; + this.wafPolicyName = name; + } + + public NginxDeploymentWafPolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getWafPolicies() + .getWithResponse(resourceGroupName, deploymentName, wafPolicyName, Context.NONE) + .getValue(); + return this; + } + + public NginxDeploymentWafPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWafPolicies() + .getWithResponse(resourceGroupName, deploymentName, wafPolicyName, context) + .getValue(); + return this; + } + + public NginxDeploymentWafPolicyImpl withProperties(NginxDeploymentWafPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyMetadataImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyMetadataImpl.java new file mode 100644 index 000000000000..a799f696760f --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyMetadataImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyMetadata; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyMetadataProperties; + +public final class NginxDeploymentWafPolicyMetadataImpl implements NginxDeploymentWafPolicyMetadata { + private NginxDeploymentWafPolicyMetadataInner innerObject; + + private final com.azure.resourcemanager.nginx.NginxManager serviceManager; + + NginxDeploymentWafPolicyMetadataImpl(NginxDeploymentWafPolicyMetadataInner innerObject, + com.azure.resourcemanager.nginx.NginxManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public NginxDeploymentWafPolicyMetadataProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public NginxDeploymentWafPolicyMetadataInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.nginx.NginxManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java index f563e369c6a8..4e17eb8f4e39 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { NginxManagementClientImpl.class }) public final class NginxManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the NginxManagementClientBuilder. */ - public NginxManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public NginxManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the NginxManagementClientBuilder. */ - public NginxManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public NginxManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public NginxManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); NginxManagementClientImpl client = new NginxManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java index 72ac3670635f..ba6ad3cb9d5e 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -15,20 +15,25 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.nginx.fluent.ApiKeysClient; import com.azure.resourcemanager.nginx.fluent.CertificatesClient; import com.azure.resourcemanager.nginx.fluent.ConfigurationsClient; +import com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient; import com.azure.resourcemanager.nginx.fluent.DeploymentsClient; import com.azure.resourcemanager.nginx.fluent.NginxManagementClient; import com.azure.resourcemanager.nginx.fluent.OperationsClient; +import com.azure.resourcemanager.nginx.fluent.WafPoliciesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -44,26 +49,12 @@ @ServiceClient(builder = NginxManagementClientBuilder.class) public final class NginxManagementClientImpl implements NginxManagementClient { /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -72,12 +63,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -85,6 +76,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -127,6 +132,20 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * The ApiKeysClient object to access its operations. */ @@ -142,59 +161,73 @@ public ApiKeysClient getApiKeys() { } /** - * The CertificatesClient object to access its operations. + * The DeploymentsClient object to access its operations. */ - private final CertificatesClient certificates; + private final DeploymentsClient deployments; /** - * Gets the CertificatesClient object to access its operations. + * Gets the DeploymentsClient object to access its operations. * - * @return the CertificatesClient object. + * @return the DeploymentsClient object. */ - public CertificatesClient getCertificates() { - return this.certificates; + public DeploymentsClient getDeployments() { + return this.deployments; } /** - * The ConfigurationsClient object to access its operations. + * The WafPoliciesClient object to access its operations. */ - private final ConfigurationsClient configurations; + private final WafPoliciesClient wafPolicies; /** - * Gets the ConfigurationsClient object to access its operations. + * Gets the WafPoliciesClient object to access its operations. * - * @return the ConfigurationsClient object. + * @return the WafPoliciesClient object. */ - public ConfigurationsClient getConfigurations() { - return this.configurations; + public WafPoliciesClient getWafPolicies() { + return this.wafPolicies; } /** - * The DeploymentsClient object to access its operations. + * The DefaultWafPoliciesClient object to access its operations. */ - private final DeploymentsClient deployments; + private final DefaultWafPoliciesClient defaultWafPolicies; /** - * Gets the DeploymentsClient object to access its operations. + * Gets the DefaultWafPoliciesClient object to access its operations. * - * @return the DeploymentsClient object. + * @return the DefaultWafPoliciesClient object. */ - public DeploymentsClient getDeployments() { - return this.deployments; + public DefaultWafPoliciesClient getDefaultWafPolicies() { + return this.defaultWafPolicies; } /** - * The OperationsClient object to access its operations. + * The CertificatesClient object to access its operations. */ - private final OperationsClient operations; + private final CertificatesClient certificates; /** - * Gets the OperationsClient object to access its operations. + * Gets the CertificatesClient object to access its operations. * - * @return the OperationsClient object. + * @return the CertificatesClient object. */ - public OperationsClient getOperations() { - return this.operations; + public CertificatesClient getCertificates() { + return this.certificates; + } + + /** + * The ConfigurationsClient object to access its operations. + */ + private final ConfigurationsClient configurations; + + /** + * Gets the ConfigurationsClient object to access its operations. + * + * @return the ConfigurationsClient object. + */ + public ConfigurationsClient getConfigurations() { + return this.configurations; } /** @@ -204,22 +237,24 @@ public OperationsClient getOperations() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ NginxManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-11-01-preview"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-03-01-preview"; + this.operations = new OperationsClientImpl(this); this.apiKeys = new ApiKeysClientImpl(this); + this.deployments = new DeploymentsClientImpl(this); + this.wafPolicies = new WafPoliciesClientImpl(this); + this.defaultWafPolicies = new DefaultWafPoliciesClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); - this.deployments = new DeploymentsClientImpl(this); - this.operations = new OperationsClientImpl(this); } /** @@ -259,6 +294,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationResultImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationImpl.java similarity index 52% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationResultImpl.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationImpl.java index 6825039391fc..4dc989c66060 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationResultImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationImpl.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; +import com.azure.resourcemanager.nginx.models.ActionType; +import com.azure.resourcemanager.nginx.models.Operation; import com.azure.resourcemanager.nginx.models.OperationDisplay; -import com.azure.resourcemanager.nginx.models.OperationResult; +import com.azure.resourcemanager.nginx.models.Origin; -public final class OperationResultImpl implements OperationResult { - private OperationResultInner innerObject; +public final class OperationImpl implements Operation { + private OperationInner innerObject; private final com.azure.resourcemanager.nginx.NginxManager serviceManager; - OperationResultImpl(OperationResultInner innerObject, com.azure.resourcemanager.nginx.NginxManager serviceManager) { + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.nginx.NginxManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -22,15 +24,23 @@ public String name() { return this.innerModel().name(); } + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + public OperationDisplay display() { return this.innerModel().display(); } - public Boolean isDataAction() { - return this.innerModel().isDataAction(); + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); } - public OperationResultInner innerModel() { + public OperationInner innerModel() { return this.innerObject; } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java index c657baf67306..d836bf119850 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -26,8 +26,8 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.nginx.fluent.OperationsClient; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; -import com.azure.resourcemanager.nginx.models.OperationListResult; +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; +import com.azure.resourcemanager.nginx.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +59,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for NginxManagementClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "NginxManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Nginx.NginxPlus/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Nginx.NginxPlus/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,108 +81,108 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listSinglePageAsync() { final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -185,25 +192,36 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -212,22 +230,13 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java index 4d72726532ef..6a5a36f098fd 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; @@ -8,8 +8,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.nginx.fluent.OperationsClient; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; -import com.azure.resourcemanager.nginx.models.OperationResult; +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; +import com.azure.resourcemanager.nginx.models.Operation; import com.azure.resourcemanager.nginx.models.Operations; public final class OperationsImpl implements Operations { @@ -24,14 +24,14 @@ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.ng this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager())); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ResourceManagerUtils.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ResourceManagerUtils.java index be88089d41c7..341a748b5882 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ResourceManagerUtils.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.implementation; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesClientImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesClientImpl.java new file mode 100644 index 000000000000..3544a5a41573 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesClientImpl.java @@ -0,0 +1,826 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.nginx.fluent.WafPoliciesClient; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner; +import com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentWafPolicyListResponse; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in WafPoliciesClient. + */ +public final class WafPoliciesClientImpl implements WafPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final WafPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final NginxManagementClientImpl client; + + /** + * Initializes an instance of WafPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WafPoliciesClientImpl(NginxManagementClientImpl client) { + this.service + = RestProxy.create(WafPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NginxManagementClientWafPolicies to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NginxManagementClientWafPolicies") + public interface WafPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies/{wafPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("wafPolicyName") String wafPolicyName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies/{wafPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("wafPolicyName") String wafPolicyName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies/{wafPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("wafPolicyName") String wafPolicyName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NginxDeploymentWafPolicyInner body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies/{wafPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("wafPolicyName") String wafPolicyName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") NginxDeploymentWafPolicyInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies/{wafPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("wafPolicyName") String wafPolicyName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies/{wafPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("deploymentName") String deploymentName, @PathParam("wafPolicyName") String wafPolicyName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String deploymentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String deploymentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, deploymentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String deploymentName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String deploymentName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String deploymentName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String deploymentName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, deploymentName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String deploymentName, String wafPolicyName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String deploymentName, + String wafPolicyName) { + return getWithResponseAsync(resourceGroupName, deploymentName, wafPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, deploymentName, wafPolicyName, accept, context); + } + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NginxDeploymentWafPolicyInner get(String resourceGroupName, String deploymentName, String wafPolicyName) { + return getWithResponse(resourceGroupName, deploymentName, wafPolicyName, Context.NONE).getValue(); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String deploymentName, + String wafPolicyName, NginxDeploymentWafPolicyInner body) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, NginxDeploymentWafPolicyInner body) { + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, accept, body, + Context.NONE); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, NginxDeploymentWafPolicyInner body, Context context) { + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, accept, body, context); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NginxDeploymentWafPolicyInner> beginCreateAsync( + String resourceGroupName, String deploymentName, String wafPolicyName, NginxDeploymentWafPolicyInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, deploymentName, wafPolicyName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NginxDeploymentWafPolicyInner.class, NginxDeploymentWafPolicyInner.class, + this.client.getContext()); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, NginxDeploymentWafPolicyInner> + beginCreateAsync(String resourceGroupName, String deploymentName, String wafPolicyName) { + final NginxDeploymentWafPolicyInner body = null; + Mono>> mono + = createWithResponseAsync(resourceGroupName, deploymentName, wafPolicyName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NginxDeploymentWafPolicyInner.class, NginxDeploymentWafPolicyInner.class, + this.client.getContext()); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NginxDeploymentWafPolicyInner> beginCreate( + String resourceGroupName, String deploymentName, String wafPolicyName, NginxDeploymentWafPolicyInner body) { + Response response = createWithResponse(resourceGroupName, deploymentName, wafPolicyName, body); + return this.client.getLroResult(response, + NginxDeploymentWafPolicyInner.class, NginxDeploymentWafPolicyInner.class, Context.NONE); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NginxDeploymentWafPolicyInner> + beginCreate(String resourceGroupName, String deploymentName, String wafPolicyName) { + final NginxDeploymentWafPolicyInner body = null; + Response response = createWithResponse(resourceGroupName, deploymentName, wafPolicyName, body); + return this.client.getLroResult(response, + NginxDeploymentWafPolicyInner.class, NginxDeploymentWafPolicyInner.class, Context.NONE); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NginxDeploymentWafPolicyInner> beginCreate( + String resourceGroupName, String deploymentName, String wafPolicyName, NginxDeploymentWafPolicyInner body, + Context context) { + Response response + = createWithResponse(resourceGroupName, deploymentName, wafPolicyName, body, context); + return this.client.getLroResult(response, + NginxDeploymentWafPolicyInner.class, NginxDeploymentWafPolicyInner.class, context); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String deploymentName, + String wafPolicyName, NginxDeploymentWafPolicyInner body) { + return beginCreateAsync(resourceGroupName, deploymentName, wafPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String deploymentName, + String wafPolicyName) { + final NginxDeploymentWafPolicyInner body = null; + return beginCreateAsync(resourceGroupName, deploymentName, wafPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NginxDeploymentWafPolicyInner create(String resourceGroupName, String deploymentName, String wafPolicyName) { + final NginxDeploymentWafPolicyInner body = null; + return beginCreate(resourceGroupName, deploymentName, wafPolicyName, body).getFinalResult(); + } + + /** + * Create or update the Nginx Waf Policy for given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param body The Nginx Deployment Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NginxDeploymentWafPolicyInner create(String resourceGroupName, String deploymentName, String wafPolicyName, + NginxDeploymentWafPolicyInner body, Context context) { + return beginCreate(resourceGroupName, deploymentName, wafPolicyName, body, context).getFinalResult(); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String deploymentName, + String wafPolicyName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, Context.NONE); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, deploymentName, wafPolicyName, context); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String deploymentName, + String wafPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, deploymentName, wafPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, + String wafPolicyName) { + Response response = deleteWithResponse(resourceGroupName, deploymentName, wafPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context) { + Response response = deleteWithResponse(resourceGroupName, deploymentName, wafPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String deploymentName, String wafPolicyName) { + return beginDeleteAsync(resourceGroupName, deploymentName, wafPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String deploymentName, String wafPolicyName) { + beginDelete(resourceGroupName, deploymentName, wafPolicyName).getFinalResult(); + } + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String deploymentName, String wafPolicyName, Context context) { + beginDelete(resourceGroupName, deploymentName, wafPolicyName, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesImpl.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesImpl.java new file mode 100644 index 000000000000..ac5197e30c5c --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesImpl.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.nginx.fluent.WafPoliciesClient; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicy; +import com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyMetadata; +import com.azure.resourcemanager.nginx.models.WafPolicies; + +public final class WafPoliciesImpl implements WafPolicies { + private static final ClientLogger LOGGER = new ClientLogger(WafPoliciesImpl.class); + + private final WafPoliciesClient innerClient; + + private final com.azure.resourcemanager.nginx.NginxManager serviceManager; + + public WafPoliciesImpl(WafPoliciesClient innerClient, com.azure.resourcemanager.nginx.NginxManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String deploymentName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, deploymentName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NginxDeploymentWafPolicyMetadataImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String deploymentName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, deploymentName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NginxDeploymentWafPolicyMetadataImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, deploymentName, wafPolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NginxDeploymentWafPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NginxDeploymentWafPolicy get(String resourceGroupName, String deploymentName, String wafPolicyName) { + NginxDeploymentWafPolicyInner inner + = this.serviceClient().get(resourceGroupName, deploymentName, wafPolicyName); + if (inner != null) { + return new NginxDeploymentWafPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String deploymentName, String wafPolicyName) { + this.serviceClient().delete(resourceGroupName, deploymentName, wafPolicyName); + } + + public void delete(String resourceGroupName, String deploymentName, String wafPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, deploymentName, wafPolicyName, context); + } + + public NginxDeploymentWafPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "nginxDeployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id))); + } + String wafPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "wafPolicies"); + if (wafPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'wafPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, deploymentName, wafPolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "nginxDeployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id))); + } + String wafPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "wafPolicies"); + if (wafPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'wafPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, deploymentName, wafPolicyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "nginxDeployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id))); + } + String wafPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "wafPolicies"); + if (wafPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'wafPolicies'.", id))); + } + this.delete(resourceGroupName, deploymentName, wafPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "nginxDeployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'nginxDeployments'.", id))); + } + String wafPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "wafPolicies"); + if (wafPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'wafPolicies'.", id))); + } + this.delete(resourceGroupName, deploymentName, wafPolicyName, context); + } + + private WafPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.nginx.NginxManager manager() { + return this.serviceManager; + } + + public NginxDeploymentWafPolicyImpl define(String name) { + return new NginxDeploymentWafPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateListResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxCertificateListResponse.java similarity index 67% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateListResponse.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxCertificateListResponse.java index 6bdc7aa6a911..23b15dda6acb 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateListResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxCertificateListResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.nginx.models; +package com.azure.resourcemanager.nginx.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The NginxCertificateListResponse model. + * Nginx Certificate List Response. */ -@Fluent +@Immutable public final class NginxCertificateListResponse implements JsonSerializable { /* - * The value property. + * The NginxCertificate items on this page */ private List value; /* - * The nextLink property. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NginxCertificateListResponse class. */ - public NginxCertificateListResponse() { + private NginxCertificateListResponse() { } /** - * Get the value property: The value property. + * Get the value property: The NginxCertificate items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the NginxCertificateListResponse object itself. - */ - public NginxCertificateListResponse withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the NginxCertificateListResponse object itself. - */ - public NginxCertificateListResponse withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NginxCertificateListResponse if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NginxCertificateListResponse. */ public static NginxCertificateListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationListResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxConfigurationListResponse.java similarity index 67% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationListResponse.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxConfigurationListResponse.java index 9e7889a84e27..6c1836fc3b8a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationListResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxConfigurationListResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.nginx.models; +package com.azure.resourcemanager.nginx.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Response of a list operation. */ -@Fluent +@Immutable public final class NginxConfigurationListResponse implements JsonSerializable { /* - * Results of a list operation. + * The NginxConfigurationResponse items on this page */ private List value; /* - * Link to the next set of results, if any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NginxConfigurationListResponse class. */ - public NginxConfigurationListResponse() { + private NginxConfigurationListResponse() { } /** - * Get the value property: Results of a list operation. + * Get the value property: The NginxConfigurationResponse items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: Results of a list operation. - * - * @param value the value value to set. - * @return the NginxConfigurationListResponse object itself. - */ - public NginxConfigurationListResponse withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to the next set of results, if any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: Link to the next set of results, if any. - * - * @param nextLink the nextLink value to set. - * @return the NginxConfigurationListResponse object itself. - */ - public NginxConfigurationListResponse withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NginxConfigurationListResponse if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NginxConfigurationListResponse. */ public static NginxConfigurationListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyListResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentApiKeyListResponse.java similarity index 68% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyListResponse.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentApiKeyListResponse.java index 8a83b6f42ca9..372e5a2b7977 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyListResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentApiKeyListResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.nginx.models; +package com.azure.resourcemanager.nginx.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The NginxDeploymentApiKeyListResponse model. + * Nginx Deployment Api Key List Response. */ -@Fluent +@Immutable public final class NginxDeploymentApiKeyListResponse implements JsonSerializable { /* - * The value property. + * The NginxDeploymentApiKeyResponse items on this page */ private List value; /* - * The nextLink property. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NginxDeploymentApiKeyListResponse class. */ - public NginxDeploymentApiKeyListResponse() { + private NginxDeploymentApiKeyListResponse() { } /** - * Get the value property: The value property. + * Get the value property: The NginxDeploymentApiKeyResponse items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the NginxDeploymentApiKeyListResponse object itself. - */ - public NginxDeploymentApiKeyListResponse withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the NginxDeploymentApiKeyListResponse object itself. - */ - public NginxDeploymentApiKeyListResponse withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NginxDeploymentApiKeyListResponse if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NginxDeploymentApiKeyListResponse. */ public static NginxDeploymentApiKeyListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentListResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentListResponse.java similarity index 67% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentListResponse.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentListResponse.java index 414e6e86c381..c08c5b4bd66a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentListResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentListResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.nginx.models; +package com.azure.resourcemanager.nginx.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * The NginxDeploymentListResponse model. + * Nginx Deployment List Response. */ -@Fluent +@Immutable public final class NginxDeploymentListResponse implements JsonSerializable { /* - * The value property. + * The NginxDeployment items on this page */ private List value; /* - * The nextLink property. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of NginxDeploymentListResponse class. */ - public NginxDeploymentListResponse() { + private NginxDeploymentListResponse() { } /** - * Get the value property: The value property. + * Get the value property: The NginxDeployment items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the NginxDeploymentListResponse object itself. - */ - public NginxDeploymentListResponse withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The nextLink property. - * - * @param nextLink the nextLink value to set. - * @return the NginxDeploymentListResponse object itself. - */ - public NginxDeploymentListResponse withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NginxDeploymentListResponse if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NginxDeploymentListResponse. */ public static NginxDeploymentListResponse fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentWafPolicyListResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentWafPolicyListResponse.java new file mode 100644 index 000000000000..dd7f74be0652 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentWafPolicyListResponse.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner; +import java.io.IOException; +import java.util.List; + +/** + * Nginx Deployment Waf Policy List Response. + */ +@Immutable +public final class NginxDeploymentWafPolicyListResponse + implements JsonSerializable { + /* + * The NginxDeploymentWafPolicyMetadata items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NginxDeploymentWafPolicyListResponse class. + */ + private NginxDeploymentWafPolicyListResponse() { + } + + /** + * Get the value property: The NginxDeploymentWafPolicyMetadata items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyListResponse if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyListResponse. + */ + public static NginxDeploymentWafPolicyListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyListResponse deserializedNginxDeploymentWafPolicyListResponse + = new NginxDeploymentWafPolicyListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NginxDeploymentWafPolicyMetadataInner.fromJson(reader1)); + deserializedNginxDeploymentWafPolicyListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyListResponse; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationListResult.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/OperationListResult.java similarity index 55% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationListResult.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/OperationListResult.java index bd478aed5d0b..05f10ef1ae3d 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationListResult.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/models/OperationListResult.java @@ -1,61 +1,51 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.nginx.models; +package com.azure.resourcemanager.nginx.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; import java.io.IOException; import java.util.List; /** - * Result of GET request to list Nginx.NginxPlus operations. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the Nginx.NginxPlus provider. + * The Operation items on this page */ - private List value; + private List value; /* - * URL to get the next set of operation list results if there are any. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** - * Get the value property: List of operations supported by the Nginx.NginxPlus provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** - * Set the value property: List of operations supported by the Nginx.NginxPlus provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL to get the next set of operation list results if there are any. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: URL to get the next set of operation list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -102,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { @@ -112,8 +81,7 @@ public static OperationListResult fromJson(JsonReader jsonReader) throws IOExcep reader.nextToken(); if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OperationResultInner.fromJson(reader1)); + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); deserializedOperationListResult.value = value; } else if ("nextLink".equals(fieldName)) { deserializedOperationListResult.nextLink = reader.getString(); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/package-info.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/package-info.java index cc3d007a978f..c72142842025 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/package-info.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/implementation/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for NginxManagementClient. - * null. + * Package containing the implementations for Nginx. */ package com.azure.resourcemanager.nginx.implementation; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActionType.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActionType.java new file mode 100644 index 000000000000..311602f15910 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActionType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ +public final class ActionType extends ExpandableStringEnum { + /** + * Actions are for internal-only APIs. + */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActivationState.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActivationState.java index 042cbf437d2e..aacd066685c1 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActivationState.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ActivationState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreate.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreate.java index 11fef865899a..c57ff02f656a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreate.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreate.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,22 +47,6 @@ public AnalysisCreate withConfig(AnalysisCreateConfig config) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (config() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property config in model AnalysisCreate")); - } else { - config().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AnalysisCreate.class); - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreateConfig.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreateConfig.java index 88e4389ca21f..56f8519bfbe5 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreateConfig.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreateConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -33,7 +33,7 @@ public final class AnalysisCreateConfig implements JsonSerializable protectedFiles; /* - * The package property. + * Nginx Configuration Package */ private NginxConfigurationPackage packageProperty; @@ -104,7 +104,7 @@ public AnalysisCreateConfig withProtectedFiles(List e.validate()); - } - if (protectedFiles() != null) { - protectedFiles().forEach(e -> e.validate()); - } - if (packageProperty() != null) { - packageProperty().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisDiagnostic.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisDiagnostic.java index c3a571d6196c..18edab2b861b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisDiagnostic.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AnalysisDiagnostic.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +14,7 @@ /** * An error object found during the analysis of an NGINX configuration. */ -@Fluent +@Immutable public final class AnalysisDiagnostic implements JsonSerializable { /* * Unique identifier for the error @@ -40,7 +39,7 @@ public final class AnalysisDiagnostic implements JsonSerializable { /* * The errors property. @@ -30,7 +30,7 @@ public final class AnalysisResultData implements JsonSerializable errors() { return this.errors; } - /** - * Set the errors property: The errors property. - * - * @param errors the errors value to set. - * @return the AnalysisResultData object itself. - */ - public AnalysisResultData withErrors(List errors) { - this.errors = errors; - return this; - } - /** * Get the diagnostics property: The diagnostics property. * @@ -62,31 +51,6 @@ public List diagnostics() { return this.diagnostics; } - /** - * Set the diagnostics property: The diagnostics property. - * - * @param diagnostics the diagnostics value to set. - * @return the AnalysisResultData object itself. - */ - public AnalysisResultData withDiagnostics(List diagnostics) { - this.diagnostics = diagnostics; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - if (diagnostics() != null) { - diagnostics().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ApiKeys.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ApiKeys.java index 9d0cb5785046..42c11d6505da 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ApiKeys.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ApiKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,7 +13,7 @@ */ public interface ApiKeys { /** - * Delete API key for Nginx deployment. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -22,13 +22,13 @@ public interface ApiKeys { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the specified API Key of the given Nginx deployment along with {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, - Context context); + Response getWithResponse(String resourceGroupName, String deploymentName, + String apiKeyName, Context context); /** - * Delete API key for Nginx deployment. + * Get the specified API Key of the given Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -36,11 +36,12 @@ Response deleteWithResponse(String resourceGroupName, String deploymentNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified API Key of the given Nginx deployment. */ - void delete(String resourceGroupName, String deploymentName, String apiKeyName); + NginxDeploymentApiKeyResponse get(String resourceGroupName, String deploymentName, String apiKeyName); /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -49,13 +50,13 @@ Response deleteWithResponse(String resourceGroupName, String deploymentNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse(String resourceGroupName, String deploymentName, - String apiKeyName, Context context); + Response deleteWithResponse(String resourceGroupName, String deploymentName, String apiKeyName, + Context context); /** - * Get the specified API Key of the given Nginx deployment. + * Delete API key for Nginx deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. @@ -63,9 +64,8 @@ Response getWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified API Key of the given Nginx deployment. */ - NginxDeploymentApiKeyResponse get(String resourceGroupName, String deploymentName, String apiKeyName); + void delete(String resourceGroupName, String deploymentName, String apiKeyName); /** * List all API Keys of the given Nginx deployment. @@ -75,7 +75,7 @@ Response getWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String deploymentName); @@ -88,7 +88,7 @@ Response getWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment Api Key List Response as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String deploymentName, Context context); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AutoUpgradeProfile.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AutoUpgradeProfile.java index 9be87a2d66f4..5ad5f07801c3 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AutoUpgradeProfile.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/AutoUpgradeProfile.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -48,21 +47,6 @@ public AutoUpgradeProfile withUpgradeChannel(String upgradeChannel) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (upgradeChannel() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property upgradeChannel in model AutoUpgradeProfile")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoUpgradeProfile.class); - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Certificates.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Certificates.java index cda2da1af76f..2ad3f568d433 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Certificates.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Certificates.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -73,7 +73,7 @@ Response getWithResponse(String resourceGroupName, String depl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Certificate List Response as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String deploymentName); @@ -86,7 +86,7 @@ Response getWithResponse(String resourceGroupName, String depl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Certificate List Response as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String deploymentName, Context context); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Configurations.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Configurations.java index fbb71b302ee9..7b267cf55d88 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Configurations.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Configurations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,86 +13,86 @@ */ public interface Configurations { /** - * List the NGINX configuration of given NGINX deployment. + * Get the NGINX configuration of given NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. + * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of + * NGINX conf. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the NGINX configuration of given NGINX deployment along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String deploymentName); + Response getWithResponse(String resourceGroupName, String deploymentName, + String configurationName, Context context); /** - * List the NGINX configuration of given NGINX deployment. + * Get the NGINX configuration of given NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param context The context to associate with this operation. + * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of + * NGINX conf. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list operation as paginated response with {@link PagedIterable}. + * @return the NGINX configuration of given NGINX deployment. */ - PagedIterable list(String resourceGroupName, String deploymentName, Context context); + NginxConfigurationResponse get(String resourceGroupName, String deploymentName, String configurationName); /** - * Get the NGINX configuration of given NGINX deployment. + * Reset the NGINX configuration of given NGINX deployment to default. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NGINX configuration of given NGINX deployment along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String deploymentName, - String configurationName, Context context); + void delete(String resourceGroupName, String deploymentName, String configurationName); /** - * Get the NGINX configuration of given NGINX deployment. + * Reset the NGINX configuration of given NGINX deployment to default. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of * NGINX conf. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the NGINX configuration of given NGINX deployment. */ - NginxConfigurationResponse get(String resourceGroupName, String deploymentName, String configurationName); + void delete(String resourceGroupName, String deploymentName, String configurationName, Context context); /** - * Reset the NGINX configuration of given NGINX deployment to default. + * List the NGINX configuration of given NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of - * NGINX conf. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String deploymentName, String configurationName); + PagedIterable list(String resourceGroupName, String deploymentName); /** - * Reset the NGINX configuration of given NGINX deployment to default. + * List the NGINX configuration of given NGINX deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of targeted NGINX deployment. - * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of - * NGINX conf. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String deploymentName, String configurationName, Context context); + PagedIterable list(String resourceGroupName, String deploymentName, Context context); /** * Analyze an NGINX configuration without applying it to the NGINXaaS deployment. diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DefaultWafPolicies.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DefaultWafPolicies.java new file mode 100644 index 000000000000..06494e159aca --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DefaultWafPolicies.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DefaultWafPolicies. + */ +public interface DefaultWafPolicies { + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + Response listWithResponse(String resourceGroupName, + String deploymentName, Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment. + */ + NginxDeploymentDefaultWafPolicyListResponse list(String resourceGroupName, String deploymentName); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Deployments.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Deployments.java index 783777d050d2..dffdfddc2dfb 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Deployments.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Deployments.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -62,47 +62,47 @@ Response getByResourceGroupWithResponse(String resourceGroupNam void delete(String resourceGroupName, String deploymentName, Context context); /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List the NGINX deployments resources. + * List all NGINX deployments under the specified resource group. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List all NGINX deployments under the specified resource group. + * List the NGINX deployments resources. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return nginx Deployment List Response as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable list(Context context); /** * Get the NGINX deployment. diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DiagnosticItem.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DiagnosticItem.java index 399736240f53..cba73437e4ee 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DiagnosticItem.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/DiagnosticItem.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +15,7 @@ * 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. */ -@Fluent +@Immutable public final class DiagnosticItem implements JsonSerializable { /* * Unique identifier for the diagnostic. @@ -41,7 +40,7 @@ public final class DiagnosticItem implements JsonSerializable { /* * The line property. */ - private float line; + private double line; /* * The message property. @@ -66,7 +65,7 @@ public final class DiagnosticItem implements JsonSerializable { /** * Creates an instance of DiagnosticItem class. */ - public DiagnosticItem() { + private DiagnosticItem() { } /** @@ -78,17 +77,6 @@ public String id() { return this.id; } - /** - * Set the id property: Unique identifier for the diagnostic. - * - * @param id the id value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withId(String id) { - this.id = id; - return this; - } - /** * Get the directive property: The directive property. * @@ -98,17 +86,6 @@ public String directive() { return this.directive; } - /** - * Set the directive property: The directive property. - * - * @param directive the directive value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withDirective(String directive) { - this.directive = directive; - return this; - } - /** * Get the description property: The description property. * @@ -118,17 +95,6 @@ public String description() { return this.description; } - /** - * Set the description property: The description property. - * - * @param description the description value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withDescription(String description) { - this.description = description; - return this; - } - /** * Get the file property: The filepath of the most relevant config file. * @@ -138,37 +104,15 @@ public String file() { return this.file; } - /** - * Set the file property: The filepath of the most relevant config file. - * - * @param file the file value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withFile(String file) { - this.file = file; - return this; - } - /** * Get the line property: The line property. * * @return the line value. */ - public float line() { + public double line() { return this.line; } - /** - * Set the line property: The line property. - * - * @param line the line value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withLine(float line) { - this.line = line; - return this; - } - /** * Get the message property: The message property. * @@ -178,17 +122,6 @@ public String message() { return this.message; } - /** - * Set the message property: The message property. - * - * @param message the message value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withMessage(String message) { - this.message = message; - return this; - } - /** * Get the rule property: The rule property. * @@ -198,17 +131,6 @@ public String rule() { return this.rule; } - /** - * Set the rule property: The rule property. - * - * @param rule the rule value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withRule(String rule) { - this.rule = rule; - return this; - } - /** * Get the level property: Warning or Info. * @@ -218,17 +140,6 @@ public Level level() { return this.level; } - /** - * Set the level property: Warning or Info. - * - * @param level the level value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withLevel(Level level) { - this.level = level; - return this; - } - /** * Get the category property: Category of warning like Best-practices, Recommendation, Security etc. * @@ -238,51 +149,6 @@ public String category() { return this.category; } - /** - * Set the category property: Category of warning like Best-practices, Recommendation, Security etc. - * - * @param category the category value to set. - * @return the DiagnosticItem object itself. - */ - public DiagnosticItem withCategory(String category) { - this.category = category; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (directive() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property directive in model DiagnosticItem")); - } - if (description() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property description in model DiagnosticItem")); - } - if (file() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property file in model DiagnosticItem")); - } - if (message() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property message in model DiagnosticItem")); - } - if (rule() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property rule in model DiagnosticItem")); - } - if (level() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property level in model DiagnosticItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DiagnosticItem.class); - /** * {@inheritDoc} */ @@ -292,7 +158,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("directive", this.directive); jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("file", this.file); - jsonWriter.writeFloatField("line", this.line); + jsonWriter.writeDoubleField("line", this.line); jsonWriter.writeStringField("message", this.message); jsonWriter.writeStringField("rule", this.rule); jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString()); @@ -324,7 +190,7 @@ public static DiagnosticItem fromJson(JsonReader jsonReader) throws IOException } else if ("file".equals(fieldName)) { deserializedDiagnosticItem.file = reader.getString(); } else if ("line".equals(fieldName)) { - deserializedDiagnosticItem.line = reader.getFloat(); + deserializedDiagnosticItem.line = reader.getDouble(); } else if ("message".equals(fieldName)) { deserializedDiagnosticItem.message = reader.getString(); } else if ("rule".equals(fieldName)) { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityProperties.java index d5c34d2ab24a..4fbfdfc66901 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,7 +13,7 @@ import java.util.Map; /** - * The IdentityProperties model. + * Identity Properties. */ @Fluent public final class IdentityProperties implements JsonSerializable { @@ -28,7 +28,7 @@ public final class IdentityProperties implements JsonSerializable { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityType.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityType.java index 169737ba494b..371c53086461 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityType.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/IdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for IdentityType. + * Identity Type. */ public final class IdentityType extends ExpandableStringEnum { /** diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Level.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Level.java index 6ceb7cc1a214..dc8f092553f6 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Level.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Level.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificate.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificate.java index 56bd3758cb7d..fc452abb6f1f 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificate.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -35,21 +35,21 @@ public interface NginxCertificate { String type(); /** - * Gets the properties property: The properties property. + * Gets the properties property: Nginx Certificate Properties. * * @return the properties value. */ NginxCertificateProperties properties(); /** - * Gets the location property: The location property. + * Gets the location property: The geo-location where the resource lives. * * @return the location value. */ String location(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -142,7 +142,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The location property. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -150,7 +150,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location The location property. + * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -161,9 +161,9 @@ interface WithLocation { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Certificate Properties. * - * @param properties The properties property. + * @param properties Nginx Certificate Properties. * @return the next definition stage. */ WithCreate withProperties(NginxCertificateProperties properties); @@ -206,9 +206,9 @@ interface UpdateStages { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Certificate Properties. * - * @param properties The properties property. + * @param properties Nginx Certificate Properties. * @return the next definition stage. */ Update withProperties(NginxCertificateProperties properties); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateErrorResponseBody.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateErrorResponseBody.java index 7b682e5a9ce1..d83a1251f7e9 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateErrorResponseBody.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateErrorResponseBody.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxCertificateErrorResponseBody model. + * Nginx Certificate Error Response Body. */ @Fluent public final class NginxCertificateErrorResponseBody implements JsonSerializable { @@ -72,14 +72,6 @@ public NginxCertificateErrorResponseBody withMessage(String message) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateProperties.java index b70bf2fb879f..80bb18c58a1e 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -14,12 +14,12 @@ import java.time.OffsetDateTime; /** - * The NginxCertificateProperties model. + * Nginx Certificate Properties. */ @Fluent public final class NginxCertificateProperties implements JsonSerializable { /* - * The provisioningState property. + * Provisioning State */ private ProvisioningState provisioningState; @@ -54,7 +54,7 @@ public final class NginxCertificateProperties implements JsonSerializable { @@ -72,14 +72,6 @@ public NginxConfigurationFile withVirtualPath(String virtualPath) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationPackage.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationPackage.java index c4c698758208..1caab327a9c5 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationPackage.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationPackage.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,7 +13,7 @@ import java.util.List; /** - * The NginxConfigurationPackage model. + * Nginx Configuration Package. */ @Fluent public final class NginxConfigurationPackage implements JsonSerializable { @@ -73,14 +73,6 @@ public NginxConfigurationPackage withProtectedFiles(List protectedFiles) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileRequest.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileRequest.java index d66eb577e2a7..b74436ef4544 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileRequest.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxConfigurationProtectedFileRequest model. + * Nginx Configuration Protected File Request. */ @Fluent public final class NginxConfigurationProtectedFileRequest @@ -103,14 +103,6 @@ public NginxConfigurationProtectedFileRequest withContentHash(String contentHash return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileResponse.java index 29704220e9ec..9076bf853de0 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileResponse.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -12,9 +12,9 @@ import java.io.IOException; /** - * The NginxConfigurationProtectedFileResponse model. + * Nginx Configuration Protected File Response. */ -@Fluent +@Immutable public final class NginxConfigurationProtectedFileResponse implements JsonSerializable { /* @@ -30,7 +30,7 @@ public final class NginxConfigurationProtectedFileResponse /** * Creates an instance of NginxConfigurationProtectedFileResponse class. */ - public NginxConfigurationProtectedFileResponse() { + private NginxConfigurationProtectedFileResponse() { } /** @@ -42,17 +42,6 @@ public String virtualPath() { return this.virtualPath; } - /** - * Set the virtualPath property: The virtual path of the protected file. - * - * @param virtualPath the virtualPath value to set. - * @return the NginxConfigurationProtectedFileResponse object itself. - */ - public NginxConfigurationProtectedFileResponse withVirtualPath(String virtualPath) { - this.virtualPath = virtualPath; - return this; - } - /** * Get the contentHash property: The hash of the content of the file. This value is used to determine if the file * has changed. @@ -63,26 +52,6 @@ public String contentHash() { return this.contentHash; } - /** - * Set the contentHash property: The hash of the content of the file. This value is used to determine if the file - * has changed. - * - * @param contentHash the contentHash value to set. - * @return the NginxConfigurationProtectedFileResponse object itself. - */ - public NginxConfigurationProtectedFileResponse withContentHash(String contentHash) { - this.contentHash = contentHash; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequest.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequest.java index 663283221b76..1b181b859ca3 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequest.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequest.java @@ -1,46 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; /** - * The NginxConfigurationRequest model. + * Nginx Configuration Request. */ @Fluent -public final class NginxConfigurationRequest extends ProxyResource { +public final class NginxConfigurationRequest implements JsonSerializable { /* - * The properties property. + * The id property. */ - private NginxConfigurationRequestProperties properties; + private String id; /* - * Metadata pertaining to creation and last modification of the resource. + * The name property. */ - private SystemData systemData; + private String name; /* - * The type of the resource. + * The type property. */ private String type; /* - * The name of the resource. + * Nginx Configuration Request Properties */ - private String name; + private NginxConfigurationRequestProperties properties; /* - * Fully qualified resource Id for the resource. + * Metadata pertaining to creation and last modification of the resource. */ - private String id; + private SystemData systemData; /** * Creates an instance of NginxConfigurationRequest class. @@ -49,73 +49,59 @@ public NginxConfigurationRequest() { } /** - * Get the properties property: The properties property. + * Get the id property: The id property. * - * @return the properties value. - */ - public NginxConfigurationRequestProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the NginxConfigurationRequest object itself. + * @return the id value. */ - public NginxConfigurationRequest withProperties(NginxConfigurationRequestProperties properties) { - this.properties = properties; - return this; + public String id() { + return this.id; } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * Get the name property: The name property. * - * @return the systemData value. + * @return the name value. */ - public SystemData systemData() { - return this.systemData; + public String name() { + return this.name; } /** - * Get the type property: The type of the resource. + * Get the type property: The type property. * * @return the type value. */ - @Override public String type() { return this.type; } /** - * Get the name property: The name of the resource. + * Get the properties property: Nginx Configuration Request Properties. * - * @return the name value. + * @return the properties value. */ - @Override - public String name() { - return this.name; + public NginxConfigurationRequestProperties properties() { + return this.properties; } /** - * Get the id property: Fully qualified resource Id for the resource. + * Set the properties property: Nginx Configuration Request Properties. * - * @return the id value. + * @param properties the properties value to set. + * @return the NginxConfigurationRequest object itself. */ - @Override - public String id() { - return this.id; + public NginxConfigurationRequest withProperties(NginxConfigurationRequestProperties properties) { + this.properties = properties; + return this; } /** - * Validates the instance. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the systemData value. */ - public void validate() { - if (properties() != null) { - properties().validate(); - } + public SystemData systemData() { + return this.systemData; } /** @@ -134,7 +120,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NginxConfigurationRequest if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NginxConfigurationRequest. */ public static NginxConfigurationRequest fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequestProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequestProperties.java index 26a3b66cbbf5..0f0aced385e4 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequestProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequestProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,13 +13,13 @@ import java.util.List; /** - * The NginxConfigurationRequestProperties model. + * Nginx Configuration Request Properties. */ @Fluent public final class NginxConfigurationRequestProperties implements JsonSerializable { /* - * The provisioningState property. + * Provisioning State */ private ProvisioningState provisioningState; @@ -34,7 +34,7 @@ public final class NginxConfigurationRequestProperties private List protectedFiles; /* - * The package property. + * Nginx Configuration Package */ private NginxConfigurationPackage packageProperty; @@ -50,7 +50,7 @@ public NginxConfigurationRequestProperties() { } /** - * Get the provisioningState property: The provisioningState property. + * Get the provisioningState property: Provisioning State. * * @return the provisioningState value. */ @@ -100,7 +100,7 @@ public List protectedFiles() { } /** - * Get the packageProperty property: The package property. + * Get the packageProperty property: Nginx Configuration Package. * * @return the packageProperty value. */ @@ -109,7 +109,7 @@ public NginxConfigurationPackage packageProperty() { } /** - * Set the packageProperty property: The package property. + * Set the packageProperty property: Nginx Configuration Package. * * @param packageProperty the packageProperty value to set. * @return the NginxConfigurationRequestProperties object itself. @@ -139,23 +139,6 @@ public NginxConfigurationRequestProperties withRootFile(String rootFile) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (files() != null) { - files().forEach(e -> e.validate()); - } - if (protectedFiles() != null) { - protectedFiles().forEach(e -> e.validate()); - } - if (packageProperty() != null) { - packageProperty().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponse.java index 4033ef9df6c2..1d819c64fe62 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -35,14 +35,14 @@ public interface NginxConfigurationResponse { String type(); /** - * Gets the properties property: The properties property. + * Gets the properties property: Nginx Configuration Response Properties. * * @return the properties value. */ NginxConfigurationResponseProperties properties(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -119,9 +119,9 @@ interface WithCreate extends DefinitionStages.WithProperties { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Configuration Request Properties. * - * @param properties The properties property. + * @param properties Nginx Configuration Request Properties. * @return the next definition stage. */ WithCreate withProperties(NginxConfigurationRequestProperties properties); @@ -164,9 +164,9 @@ interface UpdateStages { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Configuration Request Properties. * - * @param properties The properties property. + * @param properties Nginx Configuration Request Properties. * @return the next definition stage. */ Update withProperties(NginxConfigurationRequestProperties properties); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponseProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponseProperties.java index 0d8977b17c2a..fac8685aa46a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponseProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponseProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,13 +13,13 @@ import java.util.List; /** - * The NginxConfigurationResponseProperties model. + * Nginx Configuration Response Properties. */ -@Fluent +@Immutable public final class NginxConfigurationResponseProperties implements JsonSerializable { /* - * The provisioningState property. + * Provisioning State */ private ProvisioningState provisioningState; @@ -34,7 +34,7 @@ public final class NginxConfigurationResponseProperties private List protectedFiles; /* - * The package property. + * Nginx Configuration Package */ private NginxConfigurationPackage packageProperty; @@ -46,11 +46,11 @@ public final class NginxConfigurationResponseProperties /** * Creates an instance of NginxConfigurationResponseProperties class. */ - public NginxConfigurationResponseProperties() { + private NginxConfigurationResponseProperties() { } /** - * Get the provisioningState property: The provisioningState property. + * Get the provisioningState property: Provisioning State. * * @return the provisioningState value. */ @@ -67,17 +67,6 @@ public List files() { return this.files; } - /** - * Set the files property: The files property. - * - * @param files the files value to set. - * @return the NginxConfigurationResponseProperties object itself. - */ - public NginxConfigurationResponseProperties withFiles(List files) { - this.files = files; - return this; - } - /** * Get the protectedFiles property: The protectedFiles property. * @@ -88,19 +77,7 @@ public List protectedFiles() { } /** - * Set the protectedFiles property: The protectedFiles property. - * - * @param protectedFiles the protectedFiles value to set. - * @return the NginxConfigurationResponseProperties object itself. - */ - public NginxConfigurationResponseProperties - withProtectedFiles(List protectedFiles) { - this.protectedFiles = protectedFiles; - return this; - } - - /** - * Get the packageProperty property: The package property. + * Get the packageProperty property: Nginx Configuration Package. * * @return the packageProperty value. */ @@ -108,17 +85,6 @@ public NginxConfigurationPackage packageProperty() { return this.packageProperty; } - /** - * Set the packageProperty property: The package property. - * - * @param packageProperty the packageProperty value to set. - * @return the NginxConfigurationResponseProperties object itself. - */ - public NginxConfigurationResponseProperties withPackageProperty(NginxConfigurationPackage packageProperty) { - this.packageProperty = packageProperty; - return this; - } - /** * Get the rootFile property: The rootFile property. * @@ -128,34 +94,6 @@ public String rootFile() { return this.rootFile; } - /** - * Set the rootFile property: The rootFile property. - * - * @param rootFile the rootFile value to set. - * @return the NginxConfigurationResponseProperties object itself. - */ - public NginxConfigurationResponseProperties withRootFile(String rootFile) { - this.rootFile = rootFile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (files() != null) { - files().forEach(e -> e.validate()); - } - if (protectedFiles() != null) { - protectedFiles().forEach(e -> e.validate()); - } - if (packageProperty() != null) { - packageProperty().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeployment.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeployment.java index 566bef89647f..5ab3b10742e4 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeployment.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeployment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -50,28 +50,28 @@ public interface NginxDeployment { Map tags(); /** - * Gets the identity property: The identity property. + * Gets the properties property: Nginx Deployment Properties. * - * @return the identity value. + * @return the properties value. */ - IdentityProperties identity(); + NginxDeploymentProperties properties(); /** - * Gets the properties property: The properties property. + * Gets the identity property: Identity Properties. * - * @return the properties value. + * @return the identity value. */ - NginxDeploymentProperties properties(); + IdentityProperties identity(); /** - * Gets the sku property: The sku property. + * Gets the sku property: Resource Sku. * * @return the sku value. */ ResourceSku sku(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ @@ -160,8 +160,8 @@ interface WithResourceGroup { * The stage of the NginxDeployment definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithProperties, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, + DefinitionStages.WithIdentity, DefinitionStages.WithSku { /** * Executes the create request. * @@ -192,29 +192,29 @@ interface WithTags { } /** - * The stage of the NginxDeployment definition allowing to specify identity. + * The stage of the NginxDeployment definition allowing to specify properties. */ - interface WithIdentity { + interface WithProperties { /** - * Specifies the identity property: The identity property.. + * Specifies the properties property: Nginx Deployment Properties. * - * @param identity The identity property. + * @param properties Nginx Deployment Properties. * @return the next definition stage. */ - WithCreate withIdentity(IdentityProperties identity); + WithCreate withProperties(NginxDeploymentProperties properties); } /** - * The stage of the NginxDeployment definition allowing to specify properties. + * The stage of the NginxDeployment definition allowing to specify identity. */ - interface WithProperties { + interface WithIdentity { /** - * Specifies the properties property: The properties property.. + * Specifies the identity property: Identity Properties. * - * @param properties The properties property. + * @param identity Identity Properties. * @return the next definition stage. */ - WithCreate withProperties(NginxDeploymentProperties properties); + WithCreate withIdentity(IdentityProperties identity); } /** @@ -222,9 +222,9 @@ interface WithProperties { */ interface WithSku { /** - * Specifies the sku property: The sku property.. + * Specifies the sku property: Resource Sku. * - * @param sku The sku property. + * @param sku Resource Sku. * @return the next definition stage. */ WithCreate withSku(ResourceSku sku); @@ -281,9 +281,9 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity property.. + * Specifies the identity property: Identity Properties. * - * @param identity The identity property. + * @param identity Identity Properties. * @return the next definition stage. */ Update withIdentity(IdentityProperties identity); @@ -294,9 +294,9 @@ interface WithIdentity { */ interface WithSku { /** - * Specifies the sku property: The sku property.. + * Specifies the sku property: Resource Sku. * - * @param sku The sku property. + * @param sku Resource Sku. * @return the next definition stage. */ Update withSku(ResourceSku sku); @@ -307,9 +307,9 @@ interface WithSku { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Deployment Update Properties. * - * @param properties The properties property. + * @param properties Nginx Deployment Update Properties. * @return the next definition stage. */ Update withProperties(NginxDeploymentUpdateProperties properties); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequest.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequest.java index 9620b8a05044..d2be061cec5b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequest.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequest.java @@ -1,40 +1,46 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; /** - * The NginxDeploymentApiKeyRequest model. + * Nginx Deployment Api Key Request. */ @Fluent -public final class NginxDeploymentApiKeyRequest extends ProxyResource { +public final class NginxDeploymentApiKeyRequest implements JsonSerializable { /* - * The properties property. + * The id property. */ - private NginxDeploymentApiKeyRequestProperties properties; + private String id; + + /* + * The name property. + */ + private String name; /* - * The type of the resource. + * The type property. */ private String type; /* - * The name of the resource. + * Nginx Deployment Api Key Request Properties */ - private String name; + private NginxDeploymentApiKeyRequestProperties properties; /* - * Fully qualified resource Id for the resource. + * Metadata pertaining to creation and last modification of the resource. */ - private String id; + private SystemData systemData; /** * Creates an instance of NginxDeploymentApiKeyRequest class. @@ -43,64 +49,59 @@ public NginxDeploymentApiKeyRequest() { } /** - * Get the properties property: The properties property. + * Get the id property: The id property. * - * @return the properties value. + * @return the id value. */ - public NginxDeploymentApiKeyRequestProperties properties() { - return this.properties; + public String id() { + return this.id; } /** - * Set the properties property: The properties property. + * Get the name property: The name property. * - * @param properties the properties value to set. - * @return the NginxDeploymentApiKeyRequest object itself. + * @return the name value. */ - public NginxDeploymentApiKeyRequest withProperties(NginxDeploymentApiKeyRequestProperties properties) { - this.properties = properties; - return this; + public String name() { + return this.name; } /** - * Get the type property: The type of the resource. + * Get the type property: The type property. * * @return the type value. */ - @Override public String type() { return this.type; } /** - * Get the name property: The name of the resource. + * Get the properties property: Nginx Deployment Api Key Request Properties. * - * @return the name value. + * @return the properties value. */ - @Override - public String name() { - return this.name; + public NginxDeploymentApiKeyRequestProperties properties() { + return this.properties; } /** - * Get the id property: Fully qualified resource Id for the resource. + * Set the properties property: Nginx Deployment Api Key Request Properties. * - * @return the id value. + * @param properties the properties value to set. + * @return the NginxDeploymentApiKeyRequest object itself. */ - @Override - public String id() { - return this.id; + public NginxDeploymentApiKeyRequest withProperties(NginxDeploymentApiKeyRequestProperties properties) { + this.properties = properties; + return this; } /** - * Validates the instance. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the systemData value. */ - public void validate() { - if (properties() != null) { - properties().validate(); - } + public SystemData systemData() { + return this.systemData; } /** @@ -119,7 +120,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NginxDeploymentApiKeyRequest if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the NginxDeploymentApiKeyRequest. */ public static NginxDeploymentApiKeyRequest fromJson(JsonReader jsonReader) throws IOException { @@ -138,6 +138,8 @@ public static NginxDeploymentApiKeyRequest fromJson(JsonReader jsonReader) throw } else if ("properties".equals(fieldName)) { deserializedNginxDeploymentApiKeyRequest.properties = NginxDeploymentApiKeyRequestProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNginxDeploymentApiKeyRequest.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequestProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequestProperties.java index 6f0267f43088..42ea17327e88 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequestProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequestProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -15,7 +15,7 @@ import java.time.format.DateTimeFormatter; /** - * The NginxDeploymentApiKeyRequestProperties model. + * Nginx Deployment Api Key Request Properties. */ @Fluent public final class NginxDeploymentApiKeyRequestProperties @@ -79,14 +79,6 @@ public NginxDeploymentApiKeyRequestProperties withEndDateTime(OffsetDateTime end return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponse.java index 495111fb4f98..ff3d66adc30d 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponse.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponse.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner; @@ -33,12 +34,19 @@ public interface NginxDeploymentApiKeyResponse { String type(); /** - * Gets the properties property: The properties property. + * Gets the properties property: Nginx Deployment Api Key Response Properties. * * @return the properties value. */ NginxDeploymentApiKeyResponseProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. * @@ -110,9 +118,9 @@ interface WithCreate extends DefinitionStages.WithProperties { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Deployment Api Key Request Properties. * - * @param properties The properties property. + * @param properties Nginx Deployment Api Key Request Properties. * @return the next definition stage. */ WithCreate withProperties(NginxDeploymentApiKeyRequestProperties properties); @@ -155,9 +163,9 @@ interface UpdateStages { */ interface WithProperties { /** - * Specifies the properties property: The properties property.. + * Specifies the properties property: Nginx Deployment Api Key Request Properties. * - * @param properties The properties property. + * @param properties Nginx Deployment Api Key Request Properties. * @return the next definition stage. */ Update withProperties(NginxDeploymentApiKeyRequestProperties properties); diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponseProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponseProperties.java index ee4df20ad2ce..d571062fc26b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponseProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponseProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,9 +15,9 @@ import java.time.format.DateTimeFormatter; /** - * The NginxDeploymentApiKeyResponseProperties model. + * Nginx Deployment Api Key Response Properties. */ -@Fluent +@Immutable public final class NginxDeploymentApiKeyResponseProperties implements JsonSerializable { /* @@ -33,7 +33,7 @@ public final class NginxDeploymentApiKeyResponseProperties /** * Creates an instance of NginxDeploymentApiKeyResponseProperties class. */ - public NginxDeploymentApiKeyResponseProperties() { + private NginxDeploymentApiKeyResponseProperties() { } /** @@ -55,25 +55,6 @@ public OffsetDateTime endDateTime() { return this.endDateTime; } - /** - * Set the endDateTime property: The time after which this Dataplane API Key is no longer valid. - * - * @param endDateTime the endDateTime value to set. - * @return the NginxDeploymentApiKeyResponseProperties object itself. - */ - public NginxDeploymentApiKeyResponseProperties withEndDateTime(OffsetDateTime endDateTime) { - this.endDateTime = endDateTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyListResponse.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyListResponse.java new file mode 100644 index 000000000000..7fc9db327925 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyListResponse.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of NginxDeploymentDefaultWafPolicyListResponse. + */ +public interface NginxDeploymentDefaultWafPolicyListResponse { + /** + * Gets the value property: The value property. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner + * object. + * + * @return the inner object. + */ + NginxDeploymentDefaultWafPolicyListResponseInner innerModel(); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyProperties.java new file mode 100644 index 000000000000..45c443efcee8 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyProperties.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nginx Deployment Default Waf Policy Properties. + */ +@Immutable +public final class NginxDeploymentDefaultWafPolicyProperties + implements JsonSerializable { + /* + * The content property. + */ + private byte[] content; + + /* + * The filepath property. + */ + private String filepath; + + /** + * Creates an instance of NginxDeploymentDefaultWafPolicyProperties class. + */ + private NginxDeploymentDefaultWafPolicyProperties() { + } + + /** + * Get the content property: The content property. + * + * @return the content value. + */ + public byte[] content() { + return CoreUtils.clone(this.content); + } + + /** + * Get the filepath property: The filepath property. + * + * @return the filepath value. + */ + public String filepath() { + return this.filepath; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentDefaultWafPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentDefaultWafPolicyProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentDefaultWafPolicyProperties. + */ + public static NginxDeploymentDefaultWafPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentDefaultWafPolicyProperties deserializedNginxDeploymentDefaultWafPolicyProperties + = new NginxDeploymentDefaultWafPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("content".equals(fieldName)) { + deserializedNginxDeploymentDefaultWafPolicyProperties.content = reader.getBinary(); + } else if ("filepath".equals(fieldName)) { + deserializedNginxDeploymentDefaultWafPolicyProperties.filepath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentDefaultWafPolicyProperties; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentProperties.java index 46524fff8778..24a107cf1999 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The NginxDeploymentProperties model. + * Nginx Deployment Properties. */ @Fluent public final class NginxDeploymentProperties implements JsonSerializable { /* - * The provisioningState property. + * Provisioning State */ private ProvisioningState provisioningState; @@ -27,7 +27,7 @@ public final class NginxDeploymentProperties implements JsonSerializable profiles return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerAutoScaleSettings() != null) { - innerAutoScaleSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateParameters.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateParameters.java index a09e239a93e1..976eeda69365 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateParameters.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,12 +13,12 @@ import java.util.Map; /** - * The NginxDeploymentUpdateParameters model. + * Nginx Deployment Update Parameters. */ @Fluent public final class NginxDeploymentUpdateParameters implements JsonSerializable { /* - * The identity property. + * Identity Properties */ private IdentityProperties identity; @@ -28,17 +28,17 @@ public final class NginxDeploymentUpdateParameters implements JsonSerializable tags; /* - * The sku property. + * Resource Sku */ private ResourceSku sku; /* - * The location property. + * The geo-location where the resource lives */ private String location; /* - * The properties property. + * Nginx Deployment Update Properties */ private NginxDeploymentUpdateProperties properties; @@ -49,7 +49,7 @@ public NginxDeploymentUpdateParameters() { } /** - * Get the identity property: The identity property. + * Get the identity property: Identity Properties. * * @return the identity value. */ @@ -58,7 +58,7 @@ public IdentityProperties identity() { } /** - * Set the identity property: The identity property. + * Set the identity property: Identity Properties. * * @param identity the identity value to set. * @return the NginxDeploymentUpdateParameters object itself. @@ -89,7 +89,7 @@ public NginxDeploymentUpdateParameters withTags(Map tags) { } /** - * Get the sku property: The sku property. + * Get the sku property: Resource Sku. * * @return the sku value. */ @@ -98,7 +98,7 @@ public ResourceSku sku() { } /** - * Set the sku property: The sku property. + * Set the sku property: Resource Sku. * * @param sku the sku value to set. * @return the NginxDeploymentUpdateParameters object itself. @@ -109,7 +109,7 @@ public NginxDeploymentUpdateParameters withSku(ResourceSku sku) { } /** - * Get the location property: The location property. + * Get the location property: The geo-location where the resource lives. * * @return the location value. */ @@ -118,7 +118,7 @@ public String location() { } /** - * Set the location property: The location property. + * Set the location property: The geo-location where the resource lives. * * @param location the location value to set. * @return the NginxDeploymentUpdateParameters object itself. @@ -129,7 +129,7 @@ public NginxDeploymentUpdateParameters withLocation(String location) { } /** - * Get the properties property: The properties property. + * Get the properties property: Nginx Deployment Update Properties. * * @return the properties value. */ @@ -138,7 +138,7 @@ public NginxDeploymentUpdateProperties properties() { } /** - * Set the properties property: The properties property. + * Set the properties property: Nginx Deployment Update Properties. * * @param properties the properties value to set. * @return the NginxDeploymentUpdateParameters object itself. @@ -148,23 +148,6 @@ public NginxDeploymentUpdateParameters withProperties(NginxDeploymentUpdatePrope return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java index e4a1aa82c6a8..d576ea5d2b28 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxDeploymentUpdateProperties model. + * Nginx Deployment Update Properties. */ @Fluent public final class NginxDeploymentUpdateProperties implements JsonSerializable { @@ -22,7 +22,7 @@ public final class NginxDeploymentUpdateProperties implements JsonSerializable { @@ -50,14 +50,6 @@ public NginxDeploymentUserProfile withPreferredEmail(String preferredEmail) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicy.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicy.java new file mode 100644 index 000000000000..08b402287644 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicy.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner; + +/** + * An immutable client-side representation of NginxDeploymentWafPolicy. + */ +public interface NginxDeploymentWafPolicy { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Nginx Deployment Waf Policy Properties. + * + * @return the properties value. + */ + NginxDeploymentWafPolicyProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner object. + * + * @return the inner object. + */ + NginxDeploymentWafPolicyInner innerModel(); + + /** + * The entirety of the NginxDeploymentWafPolicy definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The NginxDeploymentWafPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the NginxDeploymentWafPolicy definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the NginxDeploymentWafPolicy definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, deploymentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @return the next definition stage. + */ + WithCreate withExistingNginxDeployment(String resourceGroupName, String deploymentName); + } + + /** + * The stage of the NginxDeploymentWafPolicy definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + NginxDeploymentWafPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + NginxDeploymentWafPolicy create(Context context); + } + + /** + * The stage of the NginxDeploymentWafPolicy definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Nginx Deployment Waf Policy Properties. + * + * @param properties Nginx Deployment Waf Policy Properties. + * @return the next definition stage. + */ + WithCreate withProperties(NginxDeploymentWafPolicyProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + NginxDeploymentWafPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + NginxDeploymentWafPolicy refresh(Context context); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatus.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatus.java new file mode 100644 index 000000000000..cb34614a1ed9 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatus.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nginx Deployment Waf Policy Applying Status. + */ +@Immutable +public final class NginxDeploymentWafPolicyApplyingStatus + implements JsonSerializable { + /* + * Machine readable code indicating the applying status code of a WAF Policy. + */ + private NginxDeploymentWafPolicyApplyingStatusCode code; + + /* + * A readable string of the current status, and sometimes have the reason for the current state. + */ + private String displayStatus; + + /* + * The date and time in UTC the current applying status was set. + */ + private String time; + + /** + * Creates an instance of NginxDeploymentWafPolicyApplyingStatus class. + */ + private NginxDeploymentWafPolicyApplyingStatus() { + } + + /** + * Get the code property: Machine readable code indicating the applying status code of a WAF Policy. + * + * @return the code value. + */ + public NginxDeploymentWafPolicyApplyingStatusCode code() { + return this.code; + } + + /** + * Get the displayStatus property: A readable string of the current status, and sometimes have the reason for the + * current state. + * + * @return the displayStatus value. + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Get the time property: The date and time in UTC the current applying status was set. + * + * @return the time value. + */ + public String time() { + return this.time; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyApplyingStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyApplyingStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyApplyingStatus. + */ + public static NginxDeploymentWafPolicyApplyingStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyApplyingStatus deserializedNginxDeploymentWafPolicyApplyingStatus + = new NginxDeploymentWafPolicyApplyingStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyApplyingStatus.code + = NginxDeploymentWafPolicyApplyingStatusCode.fromString(reader.getString()); + } else if ("displayStatus".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyApplyingStatus.displayStatus = reader.getString(); + } else if ("time".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyApplyingStatus.time = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyApplyingStatus; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatusCode.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatusCode.java new file mode 100644 index 000000000000..d5fe55b6af2b --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatusCode.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Machine readable code indicating the applying status code of a WAF Policy. + */ +public final class NginxDeploymentWafPolicyApplyingStatusCode + extends ExpandableStringEnum { + /** + * The policy is not referenced in the nginx config and not applied. + */ + public static final NginxDeploymentWafPolicyApplyingStatusCode NOT_APPLIED = fromString("NotApplied"); + + /** + * The policy is referenced in the nginx config and is applying. + */ + public static final NginxDeploymentWafPolicyApplyingStatusCode APPLYING = fromString("Applying"); + + /** + * The policy is referenced in the nginx config and that config has been successfully applied. + */ + public static final NginxDeploymentWafPolicyApplyingStatusCode SUCCEEDED = fromString("Succeeded"); + + /** + * The policy is referenced in the nginx config and that config failed to apply. + */ + public static final NginxDeploymentWafPolicyApplyingStatusCode FAILED = fromString("Failed"); + + /** + * The policy is now not referenced in the nginx config and its being removed from the applied nginx config. + */ + public static final NginxDeploymentWafPolicyApplyingStatusCode REMOVING = fromString("Removing"); + + /** + * Creates a new instance of NginxDeploymentWafPolicyApplyingStatusCode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NginxDeploymentWafPolicyApplyingStatusCode() { + } + + /** + * Creates or finds a NginxDeploymentWafPolicyApplyingStatusCode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NginxDeploymentWafPolicyApplyingStatusCode. + */ + public static NginxDeploymentWafPolicyApplyingStatusCode fromString(String name) { + return fromString(name, NginxDeploymentWafPolicyApplyingStatusCode.class); + } + + /** + * Gets known NginxDeploymentWafPolicyApplyingStatusCode values. + * + * @return known NginxDeploymentWafPolicyApplyingStatusCode values. + */ + public static Collection values() { + return values(NginxDeploymentWafPolicyApplyingStatusCode.class); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatus.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatus.java new file mode 100644 index 000000000000..f05ed1cbae1a --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatus.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nginx Deployment Waf Policy Compiling Status. + */ +@Immutable +public final class NginxDeploymentWafPolicyCompilingStatus + implements JsonSerializable { + /* + * Machine readable code indicating the compilation status of a WAF Policy. + */ + private NginxDeploymentWafPolicyCompilingStatusCode code; + + /* + * A readable string of the current status, and sometimes have the reason for the current state. If the + * CompilingStatus is Failed the Display Status will be The waf Policy failed to compile. + */ + private String displayStatus; + + /* + * The date and time the policy was compiled in UTC. + */ + private String time; + + /** + * Creates an instance of NginxDeploymentWafPolicyCompilingStatus class. + */ + private NginxDeploymentWafPolicyCompilingStatus() { + } + + /** + * Get the code property: Machine readable code indicating the compilation status of a WAF Policy. + * + * @return the code value. + */ + public NginxDeploymentWafPolicyCompilingStatusCode code() { + return this.code; + } + + /** + * Get the displayStatus property: A readable string of the current status, and sometimes have the reason for the + * current state. If the CompilingStatus is Failed the Display Status will be The waf Policy failed to compile. + * + * @return the displayStatus value. + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Get the time property: The date and time the policy was compiled in UTC. + * + * @return the time value. + */ + public String time() { + return this.time; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyCompilingStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyCompilingStatus if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyCompilingStatus. + */ + public static NginxDeploymentWafPolicyCompilingStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyCompilingStatus deserializedNginxDeploymentWafPolicyCompilingStatus + = new NginxDeploymentWafPolicyCompilingStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyCompilingStatus.code + = NginxDeploymentWafPolicyCompilingStatusCode.fromString(reader.getString()); + } else if ("displayStatus".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyCompilingStatus.displayStatus = reader.getString(); + } else if ("time".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyCompilingStatus.time = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyCompilingStatus; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatusCode.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatusCode.java new file mode 100644 index 000000000000..df7ae9b5484e --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatusCode.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Machine readable code indicating the compilation status of a WAF Policy. + */ +public final class NginxDeploymentWafPolicyCompilingStatusCode + extends ExpandableStringEnum { + /** + * The compilation of the custom waf policy has not started. + */ + public static final NginxDeploymentWafPolicyCompilingStatusCode NOT_STARTED = fromString("NotStarted"); + + /** + * The compilation of the custom waf policy is in progress. + */ + public static final NginxDeploymentWafPolicyCompilingStatusCode IN_PROGRESS = fromString("InProgress"); + + /** + * The compilation of the custom waf policy is completed successfully and can now be referenced in the nginx config. + */ + public static final NginxDeploymentWafPolicyCompilingStatusCode SUCCEEDED = fromString("Succeeded"); + + /** + * The compilation of the custom waf policy failed. + */ + public static final NginxDeploymentWafPolicyCompilingStatusCode FAILED = fromString("Failed"); + + /** + * Creates a new instance of NginxDeploymentWafPolicyCompilingStatusCode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NginxDeploymentWafPolicyCompilingStatusCode() { + } + + /** + * Creates or finds a NginxDeploymentWafPolicyCompilingStatusCode from its string representation. + * + * @param name a name to look for. + * @return the corresponding NginxDeploymentWafPolicyCompilingStatusCode. + */ + public static NginxDeploymentWafPolicyCompilingStatusCode fromString(String name) { + return fromString(name, NginxDeploymentWafPolicyCompilingStatusCode.class); + } + + /** + * Gets known NginxDeploymentWafPolicyCompilingStatusCode values. + * + * @return known NginxDeploymentWafPolicyCompilingStatusCode values. + */ + public static Collection values() { + return values(NginxDeploymentWafPolicyCompilingStatusCode.class); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadata.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadata.java new file mode 100644 index 000000000000..1eceda6849ab --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadata.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner; + +/** + * An immutable client-side representation of NginxDeploymentWafPolicyMetadata. + */ +public interface NginxDeploymentWafPolicyMetadata { + /** + * Gets the id property: The id property. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name property. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type property. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Nginx Deployment Waf Policy Metadata Properties. + * + * @return the properties value. + */ + NginxDeploymentWafPolicyMetadataProperties properties(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner object. + * + * @return the inner object. + */ + NginxDeploymentWafPolicyMetadataInner innerModel(); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadataProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadataProperties.java new file mode 100644 index 000000000000..11b9b2b24a2e --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadataProperties.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nginx Deployment Waf Policy Metadata Properties. + */ +@Immutable +public final class NginxDeploymentWafPolicyMetadataProperties + implements JsonSerializable { + /* + * The filepath property. + */ + private String filepath; + + /* + * Provisioning State + */ + private ProvisioningState provisioningState; + + /* + * Nginx Deployment Waf Policy Compiling Status + */ + private NginxDeploymentWafPolicyCompilingStatus compilingState; + + /* + * Nginx Deployment Waf Policy Applying Status + */ + private NginxDeploymentWafPolicyApplyingStatus applyingState; + + /** + * Creates an instance of NginxDeploymentWafPolicyMetadataProperties class. + */ + private NginxDeploymentWafPolicyMetadataProperties() { + } + + /** + * Get the filepath property: The filepath property. + * + * @return the filepath value. + */ + public String filepath() { + return this.filepath; + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the compilingState property: Nginx Deployment Waf Policy Compiling Status. + * + * @return the compilingState value. + */ + public NginxDeploymentWafPolicyCompilingStatus compilingState() { + return this.compilingState; + } + + /** + * Get the applyingState property: Nginx Deployment Waf Policy Applying Status. + * + * @return the applyingState value. + */ + public NginxDeploymentWafPolicyApplyingStatus applyingState() { + return this.applyingState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyMetadataProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyMetadataProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyMetadataProperties. + */ + public static NginxDeploymentWafPolicyMetadataProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyMetadataProperties deserializedNginxDeploymentWafPolicyMetadataProperties + = new NginxDeploymentWafPolicyMetadataProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filepath".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataProperties.filepath = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("compilingState".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataProperties.compilingState + = NginxDeploymentWafPolicyCompilingStatus.fromJson(reader); + } else if ("applyingState".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyMetadataProperties.applyingState + = NginxDeploymentWafPolicyApplyingStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyMetadataProperties; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyProperties.java new file mode 100644 index 000000000000..37bb00c22073 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyProperties.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Nginx Deployment Waf Policy Properties. + */ +@Fluent +public final class NginxDeploymentWafPolicyProperties implements JsonSerializable { + /* + * Provisioning State + */ + private ProvisioningState provisioningState; + + /* + * The byte content of the Policy + */ + private byte[] content; + + /* + * The file path where the Policy is to be saved + */ + private String filepath; + + /* + * Nginx Deployment Waf Policy Compiling Status + */ + private NginxDeploymentWafPolicyCompilingStatus compilingState; + + /* + * Nginx Deployment Waf Policy Applying Status + */ + private NginxDeploymentWafPolicyApplyingStatus applyingState; + + /** + * Creates an instance of NginxDeploymentWafPolicyProperties class. + */ + public NginxDeploymentWafPolicyProperties() { + } + + /** + * Get the provisioningState property: Provisioning State. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the content property: The byte content of the Policy. + * + * @return the content value. + */ + public byte[] content() { + return CoreUtils.clone(this.content); + } + + /** + * Set the content property: The byte content of the Policy. + * + * @param content the content value to set. + * @return the NginxDeploymentWafPolicyProperties object itself. + */ + public NginxDeploymentWafPolicyProperties withContent(byte[] content) { + this.content = CoreUtils.clone(content); + return this; + } + + /** + * Get the filepath property: The file path where the Policy is to be saved. + * + * @return the filepath value. + */ + public String filepath() { + return this.filepath; + } + + /** + * Set the filepath property: The file path where the Policy is to be saved. + * + * @param filepath the filepath value to set. + * @return the NginxDeploymentWafPolicyProperties object itself. + */ + public NginxDeploymentWafPolicyProperties withFilepath(String filepath) { + this.filepath = filepath; + return this; + } + + /** + * Get the compilingState property: Nginx Deployment Waf Policy Compiling Status. + * + * @return the compilingState value. + */ + public NginxDeploymentWafPolicyCompilingStatus compilingState() { + return this.compilingState; + } + + /** + * Get the applyingState property: Nginx Deployment Waf Policy Applying Status. + * + * @return the applyingState value. + */ + public NginxDeploymentWafPolicyApplyingStatus applyingState() { + return this.applyingState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBinaryField("content", this.content); + jsonWriter.writeStringField("filepath", this.filepath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NginxDeploymentWafPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NginxDeploymentWafPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NginxDeploymentWafPolicyProperties. + */ + public static NginxDeploymentWafPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NginxDeploymentWafPolicyProperties deserializedNginxDeploymentWafPolicyProperties + = new NginxDeploymentWafPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("content".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyProperties.content = reader.getBinary(); + } else if ("filepath".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyProperties.filepath = reader.getString(); + } else if ("compilingState".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyProperties.compilingState + = NginxDeploymentWafPolicyCompilingStatus.fromJson(reader); + } else if ("applyingState".equals(fieldName)) { + deserializedNginxDeploymentWafPolicyProperties.applyingState + = NginxDeploymentWafPolicyApplyingStatus.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNginxDeploymentWafPolicyProperties; + }); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxFrontendIpConfiguration.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxFrontendIpConfiguration.java index e156910eb28c..f035b061bde2 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxFrontendIpConfiguration.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxFrontendIpConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -13,7 +13,7 @@ import java.util.List; /** - * The NginxFrontendIpConfiguration model. + * Nginx Frontend IP Configuration. */ @Fluent public final class NginxFrontendIpConfiguration implements JsonSerializable { @@ -73,20 +73,6 @@ public NginxFrontendIpConfiguration withPrivateIpAddresses(List e.validate()); - } - if (privateIpAddresses() != null) { - privateIpAddresses().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxLogging.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxLogging.java index 7739d08b0026..eed44ba846bf 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxLogging.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxLogging.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The NginxLogging model. + * Nginx Logging. */ @Fluent public final class NginxLogging implements JsonSerializable { /* - * The storageAccount property. + * Nginx Storage Account */ private NginxStorageAccount storageAccount; @@ -28,7 +28,7 @@ public NginxLogging() { } /** - * Get the storageAccount property: The storageAccount property. + * Get the storageAccount property: Nginx Storage Account. * * @return the storageAccount value. */ @@ -37,7 +37,7 @@ public NginxStorageAccount storageAccount() { } /** - * Set the storageAccount property: The storageAccount property. + * Set the storageAccount property: Nginx Storage Account. * * @param storageAccount the storageAccount value to set. * @return the NginxLogging object itself. @@ -47,17 +47,6 @@ public NginxLogging withStorageAccount(NginxStorageAccount storageAccount) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAccount() != null) { - storageAccount().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkInterfaceConfiguration.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkInterfaceConfiguration.java index 1163a4f1783b..855894967aec 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkInterfaceConfiguration.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkInterfaceConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxNetworkInterfaceConfiguration model. + * Nginx Network Interface Configuration. */ @Fluent public final class NginxNetworkInterfaceConfiguration implements JsonSerializable { @@ -47,14 +47,6 @@ public NginxNetworkInterfaceConfiguration withSubnetId(String subnetId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkProfile.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkProfile.java index 3ab5e43a29d9..3f7dc4209beb 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkProfile.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,17 +12,17 @@ import java.io.IOException; /** - * The NginxNetworkProfile model. + * Nginx Network Profile. */ @Fluent public final class NginxNetworkProfile implements JsonSerializable { /* - * The frontEndIPConfiguration property. + * Nginx Frontend IP Configuration */ private NginxFrontendIpConfiguration frontEndIpConfiguration; /* - * The networkInterfaceConfiguration property. + * Nginx Network Interface Configuration */ private NginxNetworkInterfaceConfiguration networkInterfaceConfiguration; @@ -33,7 +33,7 @@ public NginxNetworkProfile() { } /** - * Get the frontEndIpConfiguration property: The frontEndIPConfiguration property. + * Get the frontEndIpConfiguration property: Nginx Frontend IP Configuration. * * @return the frontEndIpConfiguration value. */ @@ -42,7 +42,7 @@ public NginxFrontendIpConfiguration frontEndIpConfiguration() { } /** - * Set the frontEndIpConfiguration property: The frontEndIPConfiguration property. + * Set the frontEndIpConfiguration property: Nginx Frontend IP Configuration. * * @param frontEndIpConfiguration the frontEndIpConfiguration value to set. * @return the NginxNetworkProfile object itself. @@ -53,7 +53,7 @@ public NginxNetworkProfile withFrontEndIpConfiguration(NginxFrontendIpConfigurat } /** - * Get the networkInterfaceConfiguration property: The networkInterfaceConfiguration property. + * Get the networkInterfaceConfiguration property: Nginx Network Interface Configuration. * * @return the networkInterfaceConfiguration value. */ @@ -62,7 +62,7 @@ public NginxNetworkInterfaceConfiguration networkInterfaceConfiguration() { } /** - * Set the networkInterfaceConfiguration property: The networkInterfaceConfiguration property. + * Set the networkInterfaceConfiguration property: Nginx Network Interface Configuration. * * @param networkInterfaceConfiguration the networkInterfaceConfiguration value to set. * @return the NginxNetworkProfile object itself. @@ -73,20 +73,6 @@ public NginxNetworkInterfaceConfiguration networkInterfaceConfiguration() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (frontEndIpConfiguration() != null) { - frontEndIpConfiguration().validate(); - } - if (networkInterfaceConfiguration() != null) { - networkInterfaceConfiguration().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAddress.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAddress.java index 5aad1df53a6f..8aa4b9adcc0d 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAddress.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAddress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxPrivateIpAddress model. + * Nginx Private IP Address. */ @Fluent public final class NginxPrivateIpAddress implements JsonSerializable { @@ -22,7 +22,7 @@ public final class NginxPrivateIpAddress implements JsonSerializable { /** diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPublicIpAddress.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPublicIpAddress.java index 40172dd30eae..d3cec459c86e 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPublicIpAddress.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxPublicIpAddress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxPublicIpAddress model. + * Nginx Public IP Address. */ @Fluent public final class NginxPublicIpAddress implements JsonSerializable { @@ -47,14 +47,6 @@ public NginxPublicIpAddress withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxStorageAccount.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxStorageAccount.java index a0141417dce2..deec93c1eb55 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxStorageAccount.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxStorageAccount.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The NginxStorageAccount model. + * Nginx Storage Account. */ @Fluent public final class NginxStorageAccount implements JsonSerializable { @@ -72,14 +72,6 @@ public NginxStorageAccount withContainerName(String containerName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operation.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operation.java new file mode 100644 index 000000000000..16f8cd1bd258 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operation.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; + +/** + * An immutable client-side representation of Operation. + */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for Azure Resource Manager/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.nginx.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationDisplay.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationDisplay.java index 67b46fae38ad..3f6c2881cb4d 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationDisplay.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -12,38 +12,42 @@ import java.io.IOException; /** - * The object that represents the operation. + * Localized display information for and operation. */ -@Fluent +@Immutable public final class OperationDisplay implements JsonSerializable { /* - * Service provider: Nginx.NginxPlus + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or + * "Microsoft Compute". */ private String provider; /* - * Type on which the operation is performed, e.g., 'deployments'. + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or + * "Job Schedule Collections". */ private String resource; /* - * Operation type, e.g., read, write, delete, etc. + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". */ private String operation; /* - * Description of the operation, e.g., 'Write deployments'. + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ private String description; /** * Creates an instance of OperationDisplay class. */ - public OperationDisplay() { + private OperationDisplay() { } /** - * Get the provider property: Service provider: Nginx.NginxPlus. + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". * * @return the provider value. */ @@ -52,18 +56,8 @@ public String provider() { } /** - * Set the provider property: Service provider: Nginx.NginxPlus. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Type on which the operation is performed, e.g., 'deployments'. + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". * * @return the resource value. */ @@ -72,18 +66,8 @@ public String resource() { } /** - * Set the resource property: Type on which the operation is performed, e.g., 'deployments'. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Operation type, e.g., read, write, delete, etc. + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". * * @return the operation value. */ @@ -92,18 +76,8 @@ public String operation() { } /** - * Set the operation property: Operation type, e.g., read, write, delete, etc. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Description of the operation, e.g., 'Write deployments'. + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. * * @return the description value. */ @@ -111,35 +85,12 @@ public String description() { return this.description; } - /** - * Set the description property: Description of the operation, e.g., 'Write deployments'. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provider", this.provider); - jsonWriter.writeStringField("resource", this.resource); - jsonWriter.writeStringField("operation", this.operation); - jsonWriter.writeStringField("description", this.description); return jsonWriter.writeEndObject(); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationResult.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationResult.java deleted file mode 100644 index 7b7c4b4fe9f2..000000000000 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/OperationResult.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.nginx.models; - -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; - -/** - * An immutable client-side representation of OperationResult. - */ -public interface OperationResult { - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: The object that represents the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the inner com.azure.resourcemanager.nginx.fluent.models.OperationResultInner object. - * - * @return the inner object. - */ - OperationResultInner innerModel(); -} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operations.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operations.java index aacae2479104..a8eb1ca26b1a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operations.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,24 +12,24 @@ */ public interface Operations { /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with * {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable list(); /** - * List all operations provided by Nginx.NginxPlus for the 2024-11-01-preview api version. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list Nginx.NginxPlus operations as paginated response with + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with * {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable list(Context context); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Origin.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Origin.java new file mode 100644 index 000000000000..c823651d6d30 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/Origin.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** + * Indicates the operation is initiated by a user. + */ + public static final Origin USER = fromString("user"); + + /** + * Indicates the operation is initiated by a system. + */ + public static final Origin SYSTEM = fromString("system"); + + /** + * Indicates the operation is initiated by a user or system. + */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ProvisioningState.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ProvisioningState.java index b4ca02477a9a..0458a7820da9 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ProvisioningState.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Defines values for ProvisioningState. + * Provisioning State. */ public final class ProvisioningState extends ExpandableStringEnum { /** diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ResourceSku.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ResourceSku.java index d41e0997138f..33e29de7c3de 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ResourceSku.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ResourceSku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -13,7 +12,7 @@ import java.io.IOException; /** - * The ResourceSku model. + * Resource Sku. */ @Fluent public final class ResourceSku implements JsonSerializable { @@ -48,20 +47,6 @@ public ResourceSku withName(String name) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ResourceSku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceSku.class); - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfile.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfile.java index 99ebf154151d..194d201acf90 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfile.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfile.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,26 +72,6 @@ public ScaleProfile withCapacity(ScaleProfileCapacity capacity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model ScaleProfile")); - } - if (capacity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property capacity in model ScaleProfile")); - } else { - capacity().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScaleProfile.class); - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfileCapacity.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfileCapacity.java index d4571e5b2405..804eb49c4bb5 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfileCapacity.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfileCapacity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -72,14 +72,6 @@ public ScaleProfileCapacity withMax(int max) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/UserIdentityProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/UserIdentityProperties.java index c75461d15625..bf7f4f68c825 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/UserIdentityProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/UserIdentityProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The UserIdentityProperties model. + * User Identity Properties. */ @Immutable public final class UserIdentityProperties implements JsonSerializable { @@ -50,14 +50,6 @@ public String clientId() { return this.clientId; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WafPolicies.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WafPolicies.java new file mode 100644 index 000000000000..b9749c49dfa4 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WafPolicies.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of WafPolicies. + */ +public interface WafPolicies { + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String deploymentName); + + /** + * List Waf Policies of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return nginx Deployment Waf Policy List Response as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String deploymentName, + Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String deploymentName, + String wafPolicyName, Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment. + */ + NginxDeploymentWafPolicy get(String resourceGroupName, String deploymentName, String wafPolicyName); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String deploymentName, String wafPolicyName); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param deploymentName The name of targeted NGINX deployment. + * @param wafPolicyName The name of Waf Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String deploymentName, String wafPolicyName, Context context); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + NginxDeploymentWafPolicy getById(String id); + + /** + * Get the Nginx Waf Policy of given Nginx deployment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Nginx Waf Policy of given Nginx deployment along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Reset the Nginx Waf Policy of given Nginx deployment to default. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new NginxDeploymentWafPolicy resource. + * + * @param name resource name. + * @return the first stage of the new NginxDeploymentWafPolicy definition. + */ + NginxDeploymentWafPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallComponentVersions.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallComponentVersions.java index 1d791f63f2df..29ed79551556 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallComponentVersions.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallComponentVersions.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +14,7 @@ /** * Versions of the NGINX App Protect Web Application Firewall (WAF) components. */ -@Fluent +@Immutable public final class WebApplicationFirewallComponentVersions implements JsonSerializable { /* @@ -31,7 +30,7 @@ public final class WebApplicationFirewallComponentVersions /** * Creates an instance of WebApplicationFirewallComponentVersions class. */ - public WebApplicationFirewallComponentVersions() { + private WebApplicationFirewallComponentVersions() { } /** @@ -43,17 +42,6 @@ public String wafEngineVersion() { return this.wafEngineVersion; } - /** - * Set the wafEngineVersion property: The version of the NGINX App Protect Web Application Firewall (WAF) engine. - * - * @param wafEngineVersion the wafEngineVersion value to set. - * @return the WebApplicationFirewallComponentVersions object itself. - */ - public WebApplicationFirewallComponentVersions withWafEngineVersion(String wafEngineVersion) { - this.wafEngineVersion = wafEngineVersion; - return this; - } - /** * Get the wafNginxVersion property: The version of the NGINX App Protect Web Application Firewall (WAF) module for * NGINX. @@ -64,38 +52,6 @@ public String wafNginxVersion() { return this.wafNginxVersion; } - /** - * Set the wafNginxVersion property: The version of the NGINX App Protect Web Application Firewall (WAF) module for - * NGINX. - * - * @param wafNginxVersion the wafNginxVersion value to set. - * @return the WebApplicationFirewallComponentVersions object itself. - */ - public WebApplicationFirewallComponentVersions withWafNginxVersion(String wafNginxVersion) { - this.wafNginxVersion = wafNginxVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (wafEngineVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property wafEngineVersion in model WebApplicationFirewallComponentVersions")); - } - if (wafNginxVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property wafNginxVersion in model WebApplicationFirewallComponentVersions")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WebApplicationFirewallComponentVersions.class); - /** * {@inheritDoc} */ diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallPackage.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallPackage.java index 43b07d2a67c5..7fcdab3e94bb 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallPackage.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallPackage.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -18,7 +17,7 @@ /** * NGINX App Protect Web Application Firewall (WAF) Package. Contains the version and revision date of the package. */ -@Fluent +@Immutable public final class WebApplicationFirewallPackage implements JsonSerializable { /* * The version of the NGINX App Protect Web Application Firewall (WAF) package. @@ -33,7 +32,7 @@ public final class WebApplicationFirewallPackage implements JsonSerializable { + /* + * NGINX App Protect WAF release version + */ + private String wafRelease; + /* * Package containing attack signatures for the NGINX App Protect Web Application Firewall (WAF). */ @@ -39,7 +44,16 @@ public final class WebApplicationFirewallStatus implements JsonSerializable Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.apiKeys().deleteWithResponse("wzsyyceuzs", "i", "judpfrxt", com.azure.core.util.Context.NONE); + manager.apiKeys().deleteWithResponse("zsoibjudpfrxtr", "hzv", "ytdw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysGetWithResponseMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysGetWithResponseMockTests.java index 552ff6d6a0db..364d25a0a71b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysGetWithResponseMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -21,7 +21,7 @@ public final class ApiKeysGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"hint\":\"axoruzfgsquy\",\"endDateTime\":\"2021-03-18T06:01:03Z\"},\"id\":\"xxle\",\"name\":\"tramxjez\",\"type\":\"lwnwxuqlcvydyp\"}"; + = "{\"properties\":{\"hint\":\"xbaaabjyv\",\"endDateTime\":\"2021-10-17T00:26:42Z\"},\"id\":\"imrzrtuzqog\",\"name\":\"exn\",\"type\":\"vfdnwnwmewzsyyce\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NginxDeploymentApiKeyResponse response = manager.apiKeys() - .getWithResponse("thzvaytdwkqbrqu", "paxh", "xiilivpdtiirqt", com.azure.core.util.Context.NONE) + .getWithResponse("ofwq", "zqalkrmnjijpx", "cqqudf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-18T06:01:03Z"), response.properties().endDateTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-17T00:26:42Z"), response.properties().endDateTime()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysListMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysListMockTests.java index 37ffa75624ab..19ad24789a35 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysListMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ApiKeysListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -22,7 +22,7 @@ public final class ApiKeysListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"hint\":\"jhemms\",\"endDateTime\":\"2021-07-03T07:44:33Z\"},\"id\":\"kcrodtjinfw\",\"name\":\"lfltka\",\"type\":\"jvefkdlfoakggkfp\"}]}"; + = "{\"value\":[{\"properties\":{\"hint\":\"d\",\"endDateTime\":\"2021-04-19T09:17:54Z\"},\"id\":\"oruzfgsquyfxrxx\",\"name\":\"eptra\",\"type\":\"xje\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,9 +32,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.apiKeys().list("tdooaoj", "niodkooeb", com.azure.core.util.Context.NONE); + = manager.apiKeys().list("qbrqubpaxhexiili", "pdtii", com.azure.core.util.Context.NONE); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-03T07:44:33Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-04-19T09:17:54Z"), response.iterator().next().properties().endDateTime()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/AutoUpgradeProfileTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/AutoUpgradeProfileTests.java index 2cb59bc60cc9..0abab6f19b70 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/AutoUpgradeProfileTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/AutoUpgradeProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,14 +12,14 @@ public final class AutoUpgradeProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoUpgradeProfile model - = BinaryData.fromString("{\"upgradeChannel\":\"c\"}").toObject(AutoUpgradeProfile.class); - Assertions.assertEquals("c", model.upgradeChannel()); + = BinaryData.fromString("{\"upgradeChannel\":\"ftutqxlngxlefgu\"}").toObject(AutoUpgradeProfile.class); + Assertions.assertEquals("ftutqxlngxlefgu", model.upgradeChannel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoUpgradeProfile model = new AutoUpgradeProfile().withUpgradeChannel("c"); + AutoUpgradeProfile model = new AutoUpgradeProfile().withUpgradeChannel("ftutqxlngxlefgu"); model = BinaryData.fromObject(model).toObject(AutoUpgradeProfile.class); - Assertions.assertEquals("c", model.upgradeChannel()); + Assertions.assertEquals("ftutqxlngxlefgu", model.upgradeChannel()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/CertificatesDeleteMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/CertificatesDeleteMockTests.java deleted file mode 100644 index 357681a891c3..000000000000 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/CertificatesDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.nginx.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.nginx.NginxManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NginxManager manager = NginxManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.certificates().delete("yfzqwhxxbu", "qa", "zfeqztppri", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsAnalysisWithResponseMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsAnalysisWithResponseMockTests.java index 538f67771ca8..938ce6460b10 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsAnalysisWithResponseMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsAnalysisWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -28,7 +28,7 @@ public final class ConfigurationsAnalysisWithResponseMockTests { @Test public void testAnalysisWithResponse() throws Exception { String responseStr - = "{\"status\":\"lmdjrkvfgbvfvpdb\",\"data\":{\"errors\":[{\"id\":\"zsjqlh\",\"directive\":\"rribd\",\"description\":\"ibqipqkg\",\"file\":\"vxndz\",\"line\":86.36127,\"message\":\"krefajpjo\",\"rule\":\"wkqnyhg\"},{\"id\":\"j\",\"directive\":\"jivfxzsjabib\",\"description\":\"ystawfsdjpvkvp\",\"file\":\"jxbkzbzkdvn\",\"line\":76.89379,\"message\":\"abudurgk\",\"rule\":\"kmokz\"},{\"id\":\"jk\",\"directive\":\"ffhmouwqlgzr\",\"description\":\"zeeyebi\",\"file\":\"ikayuhqlbjbsybb\",\"line\":12.803698,\"message\":\"r\",\"rule\":\"t\"},{\"id\":\"gmfpgvmp\",\"directive\":\"paslthaqfxssmwu\",\"description\":\"wbdsr\",\"file\":\"zpdrhneu\",\"line\":67.33827,\"message\":\"wqkdwytisibi\",\"rule\":\"cgpik\"}],\"diagnostics\":[{\"id\":\"ejzanlfz\",\"directive\":\"iavrm\",\"description\":\"zonokixrjqci\",\"file\":\"gzpfrla\",\"line\":33.48236,\"message\":\"zrnw\",\"rule\":\"iin\",\"level\":\"Warning\",\"category\":\"wp\"},{\"id\":\"lwbtlhf\",\"directive\":\"sj\",\"description\":\"dhszfjv\",\"file\":\"bgofeljag\",\"line\":66.963486,\"message\":\"mqhldvrii\",\"rule\":\"ojnal\",\"level\":\"Warning\",\"category\":\"kvtvsexso\"}]}}"; + = "{\"status\":\"v\",\"data\":{\"errors\":[{\"id\":\"uxxpshne\",\"directive\":\"kulfg\",\"description\":\"lqubkwdlen\",\"file\":\"d\",\"line\":36.32122955816697,\"message\":\"ujbazpjuohminyfl\",\"rule\":\"orwmduvwpklv\"},{\"id\":\"mygdxpgpqch\",\"directive\":\"sze\",\"description\":\"nnbj\",\"file\":\"rxgibbd\",\"line\":71.6384972247716,\"message\":\"onfo\",\"rule\":\"auorsukokw\"},{\"id\":\"plhlvnuuepzlrp\",\"directive\":\"wzsoldweyuqdunv\",\"description\":\"nnrwrbiork\",\"file\":\"alywjhhgdn\",\"line\":98.6005368375008,\"message\":\"sivfomilo\",\"rule\":\"ggdufiqndieu\"}],\"diagnostics\":[{\"id\":\"jchvcyy\",\"directive\":\"s\",\"description\":\"gdotcubiipuipwo\",\"file\":\"onmacjekniz\",\"line\":90.05728846369561,\"message\":\"vcimpev\",\"rule\":\"gmblrri\",\"level\":\"Warning\",\"category\":\"wdxsm\"},{\"id\":\"cwrwfs\",\"directive\":\"jfnynszqujizdvoq\",\"description\":\"tiby\",\"file\":\"wb\",\"line\":13.000655623165148,\"message\":\"yavutpthjoxois\",\"rule\":\"sks\",\"level\":\"Info\",\"category\":\"mlqoljx\"},{\"id\":\"gxxlxsffgcvizq\",\"directive\":\"dwl\",\"description\":\"w\",\"file\":\"youpfgfbkj\",\"line\":87.77173705974407,\"message\":\"yhgk\",\"rule\":\"minsgowzf\",\"level\":\"Warning\",\"category\":\"ttktlahbq\"}]}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,45 +38,35 @@ public void testAnalysisWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); AnalysisResult response = manager.configurations() - .analysisWithResponse("rmaequ", "ah", "icslfaoq", new AnalysisCreate().withConfig(new AnalysisCreateConfig() - .withRootFile("iyylhalnswhccsp") - .withFiles(Arrays.asList(new NginxConfigurationFile().withContent("vwitqscyw").withVirtualPath("gwol"), - new NginxConfigurationFile().withContent("czbwemhairsbr").withVirtualPath("dwmsweypqwd"), - new NginxConfigurationFile().withContent("gicccnxqhuex").withVirtualPath("ttlstvlzywemhz"))) - .withProtectedFiles(Arrays.asList( - new NginxConfigurationProtectedFileRequest().withContent("dtclusiypb") - .withVirtualPath("gytguslfead") - .withContentHash("gq"), - new NginxConfigurationProtectedFileRequest().withContent("yhejhzisxgfp") - .withVirtualPath("olppvksrpqvujz") - .withContentHash("ehtwdwrft"), - new NginxConfigurationProtectedFileRequest().withContent("iby") - .withVirtualPath("dl") - .withContentHash("shfwpracstwity"), - new NginxConfigurationProtectedFileRequest().withContent("evxccedcp") - .withVirtualPath("dyodnwzxltj") - .withContentHash("nhltiugcxn"))) - .withPackageProperty( - new NginxConfigurationPackage().withData("wxqibyq").withProtectedFiles(Arrays.asList("owx")))), + .analysisWithResponse("orfmluiqt", "zf", "vyvnqqyb", + new AnalysisCreate().withConfig(new AnalysisCreateConfig().withRootFile("yeua") + .withFiles( + Arrays.asList(new NginxConfigurationFile().withContent("abqgzslesjcbh").withVirtualPath("n"))) + .withProtectedFiles(Arrays.asList(new NginxConfigurationProtectedFileRequest().withContent("w") + .withVirtualPath("cv") + .withContentHash("uwrbehwagoh"))) + .withPackageProperty(new NginxConfigurationPackage().withData("fkmr") + .withProtectedFiles( + Arrays.asList("vvhmxtdrj", "utacoe", "jvewzcjznmwcp", "guaadraufactkahz")))), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lmdjrkvfgbvfvpdb", response.status()); - Assertions.assertEquals("zsjqlh", response.data().errors().get(0).id()); - Assertions.assertEquals("rribd", response.data().errors().get(0).directive()); - Assertions.assertEquals("ibqipqkg", response.data().errors().get(0).description()); - Assertions.assertEquals("vxndz", response.data().errors().get(0).file()); - Assertions.assertEquals(86.36127f, response.data().errors().get(0).line()); - Assertions.assertEquals("krefajpjo", response.data().errors().get(0).message()); - Assertions.assertEquals("wkqnyhg", response.data().errors().get(0).rule()); - Assertions.assertEquals("ejzanlfz", response.data().diagnostics().get(0).id()); - Assertions.assertEquals("iavrm", response.data().diagnostics().get(0).directive()); - Assertions.assertEquals("zonokixrjqci", response.data().diagnostics().get(0).description()); - Assertions.assertEquals("gzpfrla", response.data().diagnostics().get(0).file()); - Assertions.assertEquals(33.48236f, response.data().diagnostics().get(0).line()); - Assertions.assertEquals("zrnw", response.data().diagnostics().get(0).message()); - Assertions.assertEquals("iin", response.data().diagnostics().get(0).rule()); + Assertions.assertEquals("v", response.status()); + Assertions.assertEquals("uxxpshne", response.data().errors().get(0).id()); + Assertions.assertEquals("kulfg", response.data().errors().get(0).directive()); + Assertions.assertEquals("lqubkwdlen", response.data().errors().get(0).description()); + Assertions.assertEquals("d", response.data().errors().get(0).file()); + Assertions.assertEquals(36.32122955816697, response.data().errors().get(0).line()); + Assertions.assertEquals("ujbazpjuohminyfl", response.data().errors().get(0).message()); + Assertions.assertEquals("orwmduvwpklv", response.data().errors().get(0).rule()); + Assertions.assertEquals("jchvcyy", response.data().diagnostics().get(0).id()); + Assertions.assertEquals("s", response.data().diagnostics().get(0).directive()); + Assertions.assertEquals("gdotcubiipuipwo", response.data().diagnostics().get(0).description()); + Assertions.assertEquals("onmacjekniz", response.data().diagnostics().get(0).file()); + Assertions.assertEquals(90.05728846369561, response.data().diagnostics().get(0).line()); + Assertions.assertEquals("vcimpev", response.data().diagnostics().get(0).message()); + Assertions.assertEquals("gmblrri", response.data().diagnostics().get(0).rule()); Assertions.assertEquals(Level.WARNING, response.data().diagnostics().get(0).level()); - Assertions.assertEquals("wp", response.data().diagnostics().get(0).category()); + Assertions.assertEquals("wdxsm", response.data().diagnostics().get(0).category()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsCreateOrUpdateMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsCreateOrUpdateMockTests.java index 90f9481b40e4..ea8df91ffaa6 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsCreateOrUpdateMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -26,7 +26,7 @@ public final class ConfigurationsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"files\":[{\"content\":\"ypgik\",\"virtualPath\":\"szywkbirryu\"},{\"content\":\"lhkjoqrvqq\",\"virtualPath\":\"t\"},{\"content\":\"nrvgoupmfiibfgg\",\"virtualPath\":\"ool\"}],\"protectedFiles\":[{\"virtualPath\":\"kvtkkg\",\"contentHash\":\"qwjygvja\"},{\"virtualPath\":\"blmhvkzuhb\",\"contentHash\":\"vyhgs\"},{\"virtualPath\":\"byrqufeg\",\"contentHash\":\"vwz\"}],\"package\":{\"data\":\"hlmctlpdngitvgb\",\"protectedFiles\":[\"ixkwmyijejveg\",\"hbpnaixexccbd\",\"eaxhcexdrrvqahqk\",\"htpwij\"]},\"rootFile\":\"yjsvfyc\"},\"id\":\"bfvoowvrv\",\"name\":\"t\",\"type\":\"jqppyostronzmy\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"files\":[{\"content\":\"dg\",\"virtualPath\":\"gsj\"},{\"content\":\"nwqjnoba\",\"virtualPath\":\"hdd\"}],\"protectedFiles\":[{\"virtualPath\":\"egfnmntfpmvmemfn\",\"contentHash\":\"dwvvba\"},{\"virtualPath\":\"lllchpodb\",\"contentHash\":\"vwrdnhfukuvsj\"},{\"virtualPath\":\"wsmystuluqypf\",\"contentHash\":\"lerchpq\"}],\"package\":{\"data\":\"pjbabwidfc\",\"protectedFiles\":[\"puunnoxyhkxgqd\",\"rihpfhoq\",\"aaewdaomdjv\",\"pjxxkzb\"]},\"rootFile\":\"sgeivsiy\"},\"id\":\"kdncj\",\"name\":\"xonbzoggculapz\",\"type\":\"y\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,34 +36,26 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NginxConfigurationResponse response = manager.configurations() - .define("ughftqsx") - .withExistingNginxDeployment("ueluqhhahhxvrhmz", "wpjgwws") + .define("xrxc") + .withExistingNginxDeployment("ctxtgzukxi", "mmqtgqqqxhr") .withProperties(new NginxConfigurationRequestProperties() - .withFiles( - Arrays.asList(new NginxConfigurationFile().withContent("kndxdigrjgu").withVirtualPath("zdmsyqtfi"), - new NginxConfigurationFile().withContent("hbotzingamvppho").withVirtualPath("qzudphq"), - new NginxConfigurationFile().withContent("vdkfwynwcvtbvk").withVirtualPath("hmtnvy"))) - .withProtectedFiles(Arrays.asList( - new NginxConfigurationProtectedFileRequest().withContent("kzwpcnpw") - .withVirtualPath("jaesgvvsccya") - .withContentHash("uq"), - new NginxConfigurationProtectedFileRequest().withContent("wygzlvdnkfxusem") - .withVirtualPath("zrmuhapfcqdps") - .withContentHash("qvpsvuoymg"), - new NginxConfigurationProtectedFileRequest().withContent("elvezrypq") - .withVirtualPath("feo") - .withContentHash("rqwky"))) - .withPackageProperty(new NginxConfigurationPackage().withData("bopgxedkowepbqp") - .withProtectedFiles(Arrays.asList("kbwcc"))) - .withRootFile("jvcdwxlpqekf")) + .withFiles(Arrays.asList(new NginxConfigurationFile().withContent("fku").withVirtualPath("cxkdmligovi"), + new NginxConfigurationFile().withContent("xk").withVirtualPath("loazuruocbgoo"))) + .withProtectedFiles( + Arrays.asList(new NginxConfigurationProtectedFileRequest().withContent("oybfhjxakvvj") + .withVirtualPath("lordilmywwtkgkxn") + .withContentHash("dabg"))) + .withPackageProperty(new NginxConfigurationPackage().withData("dtj") + .withProtectedFiles(Arrays.asList("bcihxuuwhc", "yxccyb", "payakkud"))) + .withRootFile("xgwjplmagstcyoh")) .create(); - Assertions.assertEquals("ypgik", response.properties().files().get(0).content()); - Assertions.assertEquals("szywkbirryu", response.properties().files().get(0).virtualPath()); - Assertions.assertEquals("kvtkkg", response.properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("qwjygvja", response.properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("hlmctlpdngitvgb", response.properties().packageProperty().data()); - Assertions.assertEquals("ixkwmyijejveg", response.properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("yjsvfyc", response.properties().rootFile()); + Assertions.assertEquals("dg", response.properties().files().get(0).content()); + Assertions.assertEquals("gsj", response.properties().files().get(0).virtualPath()); + Assertions.assertEquals("egfnmntfpmvmemfn", response.properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("dwvvba", response.properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("pjbabwidfc", response.properties().packageProperty().data()); + Assertions.assertEquals("puunnoxyhkxgqd", response.properties().packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("sgeivsiy", response.properties().rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsDeleteMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsDeleteMockTests.java deleted file mode 100644 index 0a6f8c0dfd15..000000000000 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.nginx.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.nginx.NginxManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConfigurationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - NginxManager manager = NginxManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - manager.configurations().delete("bminrfdwoyuhhzi", "iefozbhdmsml", "zqhof", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsGetWithResponseMockTests.java index 1b7de8a7c393..cbb31019f3b3 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsGetWithResponseMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -21,7 +21,7 @@ public final class ConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"files\":[{\"content\":\"oyzko\",\"virtualPath\":\"tlmngu\"}],\"protectedFiles\":[{\"virtualPath\":\"aldsy\",\"contentHash\":\"ximerqfobwyznk\"},{\"virtualPath\":\"kutwpf\",\"contentHash\":\"a\"}],\"package\":{\"data\":\"r\",\"protectedFiles\":[\"snfdsdoakgtdl\",\"kkze\",\"dlhewp\",\"sdsttwvog\"]},\"rootFile\":\"bejdcn\"},\"id\":\"qmoa\",\"name\":\"ufgmjzrwrdg\",\"type\":\"twaenuuzko\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"files\":[{\"content\":\"gjup\",\"virtualPath\":\"utpwoqhihejqgw\"},{\"content\":\"nfqn\",\"virtualPath\":\"ypsxjvfoim\"},{\"content\":\"slirciz\",\"virtualPath\":\"vydfceacvlhvygdy\"},{\"content\":\"umrtwnawjsl\",\"virtualPath\":\"wkojgcyztsfmzn\"}],\"protectedFiles\":[{\"virtualPath\":\"ph\",\"contentHash\":\"qnrnrpxehuwryk\"},{\"virtualPath\":\"aifmvikl\",\"contentHash\":\"dvk\"},{\"virtualPath\":\"ejd\",\"contentHash\":\"xcv\"}],\"package\":{\"data\":\"hnjivo\",\"protectedFiles\":[\"novqfzge\",\"jdftuljltd\",\"ceamtm\",\"zuo\"]},\"rootFile\":\"jw\"},\"id\":\"wqiok\",\"name\":\"ssxmojms\",\"type\":\"p\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,15 +31,15 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NginxConfigurationResponse response = manager.configurations() - .getWithResponse("zxkhnzbonlwnto", "gokdwbwhks", "zcmrvexztvb", com.azure.core.util.Context.NONE) + .getWithResponse("xifqjzgxm", "hu", "lw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("oyzko", response.properties().files().get(0).content()); - Assertions.assertEquals("tlmngu", response.properties().files().get(0).virtualPath()); - Assertions.assertEquals("aldsy", response.properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("ximerqfobwyznk", response.properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("r", response.properties().packageProperty().data()); - Assertions.assertEquals("snfdsdoakgtdl", response.properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("bejdcn", response.properties().rootFile()); + Assertions.assertEquals("gjup", response.properties().files().get(0).content()); + Assertions.assertEquals("utpwoqhihejqgw", response.properties().files().get(0).virtualPath()); + Assertions.assertEquals("ph", response.properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("qnrnrpxehuwryk", response.properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("hnjivo", response.properties().packageProperty().data()); + Assertions.assertEquals("novqfzge", response.properties().packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("jw", response.properties().rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsListMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsListMockTests.java index e8dc29c6ea4d..a061866cba18 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsListMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ConfigurationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -22,7 +22,7 @@ public final class ConfigurationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"files\":[{\"content\":\"kycgrauwj\",\"virtualPath\":\"taeburuvdm\"}],\"protectedFiles\":[{\"virtualPath\":\"zlxwabmqoefkifr\",\"contentHash\":\"puqujmqlgkfbtn\"}],\"package\":{\"data\":\"ongbjcnt\",\"protectedFiles\":[\"tcje\"]},\"rootFile\":\"twwaezkojvdcpzf\"},\"id\":\"ouicybxarzgszu\",\"name\":\"oxciqopidoamcio\",\"type\":\"hkh\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"files\":[{\"content\":\"tczheydbsdshmkx\",\"virtualPath\":\"ehvbbxurip\"}],\"protectedFiles\":[{\"virtualPath\":\"htba\",\"contentHash\":\"gx\"},{\"virtualPath\":\"rc\",\"contentHash\":\"yklyhpluodpvruud\"},{\"virtualPath\":\"zibt\",\"contentHash\":\"stgktst\"}],\"package\":{\"data\":\"eclze\",\"protectedFiles\":[\"cvhzlhp\",\"odqkdlwwqfb\",\"mlkxtrqjfs\"]},\"rootFile\":\"mbtxhwgf\"},\"id\":\"rtawcoezb\",\"name\":\"hubskhudygooo\",\"type\":\"kqfqjbvl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,17 +32,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.configurations().list("bgdknnqv", "aznqntoru", com.azure.core.util.Context.NONE); + = manager.configurations().list("jpr", "kwcf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("kycgrauwj", response.iterator().next().properties().files().get(0).content()); - Assertions.assertEquals("taeburuvdm", response.iterator().next().properties().files().get(0).virtualPath()); - Assertions.assertEquals("zlxwabmqoefkifr", - response.iterator().next().properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("puqujmqlgkfbtn", - response.iterator().next().properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("ongbjcnt", response.iterator().next().properties().packageProperty().data()); - Assertions.assertEquals("tcje", + Assertions.assertEquals("tczheydbsdshmkx", response.iterator().next().properties().files().get(0).content()); + Assertions.assertEquals("ehvbbxurip", response.iterator().next().properties().files().get(0).virtualPath()); + Assertions.assertEquals("htba", response.iterator().next().properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("gx", response.iterator().next().properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("eclze", response.iterator().next().properties().packageProperty().data()); + Assertions.assertEquals("cvhzlhp", response.iterator().next().properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("twwaezkojvdcpzf", response.iterator().next().properties().rootFile()); + Assertions.assertEquals("mbtxhwgf", response.iterator().next().properties().rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsDeleteMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DefaultWafPoliciesListWithResponseMockTests.java similarity index 59% rename from sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsDeleteMockTests.java rename to sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DefaultWafPoliciesListWithResponseMockTests.java index 3096d6d603f8..92a5f542b02b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsDeleteMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DefaultWafPoliciesListWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -10,15 +10,18 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.nginx.NginxManager; +import com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyListResponse; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class DeploymentsDeleteMockTests { +public final class DefaultWafPoliciesListWithResponseMockTests { @Test - public void testDelete() throws Exception { - String responseStr = "{}"; + public void testListWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"filepath\":\"vwxnbkfe\"},{\"filepath\":\"scyhwz\"}],\"nextLink\":\"irujbz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -27,7 +30,10 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.deployments().delete("h", "rghxjb", com.azure.core.util.Context.NONE); + NginxDeploymentDefaultWafPolicyListResponse response = manager.defaultWafPolicies() + .listWithResponse("hpjbib", "jmfxumvf", com.azure.core.util.Context.NONE) + .getValue(); + Assertions.assertEquals("irujbz", response.nextLink()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsCreateOrUpdateMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsCreateOrUpdateMockTests.java index e45e033f5d24..8e4cc0663a90 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsCreateOrUpdateMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -44,7 +44,7 @@ public final class DeploymentsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"cgxxlxs\",\"tenantId\":\"gcvizqzdwlvwlyou\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"g\":{\"principalId\":\"jub\",\"clientId\":\"hgkfmin\"},\"mmqtgqqqxhr\":{\"principalId\":\"zfttsttktlahb\",\"clientId\":\"ctxtgzukxi\"},\"azivjlfrqttbajl\":{\"principalId\":\"rxcpjuisavo\",\"clientId\":\"dzf\"},\"igovi\":{\"principalId\":\"tnwxy\",\"clientId\":\"pidkqqfkuvscxkdm\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"nginxVersion\":\"mloazuru\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{}],\"privateIPAddresses\":[{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"eoybfhjxakvvjgs\"}},\"ipAddress\":\"r\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"wt\",\"containerName\":\"kxn\"}},\"scalingProperties\":{\"capacity\":2104896567,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"yvudtjuewbci\",\"capacity\":{\"min\":1871891438,\"max\":535543031}},{\"name\":\"uwhcjyxccybv\",\"capacity\":{\"min\":436827826,\"max\":940165825}},{\"name\":\"akkud\",\"capacity\":{\"min\":417091375,\"max\":1773964666}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"wjplma\"},\"userProfile\":{\"preferredEmail\":\"cyohpfkyrkdbd\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"kmnwqjnobaiyhddv\",\"revisionDatetime\":\"2021-06-21T06:23:06Z\"},\"botSignaturesPackage\":{\"version\":\"egfnmntfpmvmemfn\",\"revisionDatetime\":\"2021-02-26T15:37:04Z\"},\"threatCampaignsPackage\":{\"version\":\"wvvb\",\"revisionDatetime\":\"2020-12-21T10:32:32Z\"},\"componentVersions\":{\"wafEngineVersion\":\"lllchpodb\",\"wafNginxVersion\":\"evwrdnhfuk\"}}},\"dataplaneApiEndpoint\":\"sjcswsmystuluqyp\"},\"sku\":{\"name\":\"vlerchpqbmfpjba\"},\"location\":\"idfcxsspuunnoxyh\",\"tags\":{\"dao\":\"qddrihpfhoqcaae\"},\"id\":\"djvlpj\",\"name\":\"xkzb\",\"type\":\"msgeivsiykzk\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"nginxVersion\":\"xexccbdreaxhcexd\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{}],\"privateIPAddresses\":[{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"htpwij\"}},\"ipAddress\":\"yjsvfyc\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"owvrvmtgjqppyos\",\"containerName\":\"on\"}},\"scalingProperties\":{\"capacity\":856785773,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"ipn\",\"capacity\":{\"min\":1260829297,\"max\":1762342215}},{\"name\":\"mcwaekrrjr\",\"capacity\":{\"min\":1897122560,\"max\":1616110653}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"tsgumhj\"},\"userProfile\":{\"preferredEmail\":\"kkxwslol\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"lmv\",\"attackSignaturesPackage\":{\"version\":\"lfktgplcrpwjxe\",\"revisionDatetime\":\"2021-03-05T15:11:27Z\"},\"botSignaturesPackage\":{\"version\":\"igbrnjw\",\"revisionDatetime\":\"2021-07-10T07:09:22Z\"},\"threatCampaignsPackage\":{\"version\":\"pn\",\"revisionDatetime\":\"2021-07-09T21:36:51Z\"},\"componentVersions\":{\"wafEngineVersion\":\"zejjoqk\",\"wafNginxVersion\":\"gfhsxttaugzxn\"}}},\"dataplaneApiEndpoint\":\"azpxdtnkdmkqjjl\"},\"identity\":{\"principalId\":\"nvrk\",\"tenantId\":\"ou\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ffiakp\":{\"principalId\":\"qaaysjkixqt\",\"clientId\":\"ttezlw\"},\"auyqncygupkv\":{\"principalId\":\"qqmtedltmmji\",\"clientId\":\"eozphv\"},\"totxhojujb\":{\"principalId\":\"mdscwxqupev\",\"clientId\":\"f\"},\"kkbnu\":{\"principalId\":\"elmcuvhixbjxyfw\",\"clientId\":\"lrcoolsttpki\"}}},\"sku\":{\"name\":\"ywvtylbfpnc\"},\"location\":\"doiwi\",\"tags\":{\"nfdn\":\"tywubxcbihwq\",\"ihxumwctondzj\":\"wjchrdg\",\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\"},\"id\":\"iufxqknpir\",\"name\":\"nepttwqmsni\",\"type\":\"fcdmqnrojlpijn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -54,56 +54,58 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NginxDeployment response = manager.deployments() - .define("jjziuxxpsh") - .withRegion("icc") - .withExistingResourceGroup("v") - .withTags(mapOf("dvoqyt", "fscjfnynszquji", "hjoxo", "byowbblgyavutp")) - .withIdentity(new IdentityProperties().withType(IdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("duvwpklvxwmygd", new UserIdentityProperties()))) + .define("ughftqsx") + .withRegion("blmhvkzuhb") + .withExistingResourceGroup("wws") + .withTags(mapOf("xuvw", "yhgsopbyrqufe", "lmctlpd", "fbn")) .withProperties(new NginxDeploymentProperties() .withNetworkProfile(new NginxNetworkProfile() .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress(), new NginxPublicIpAddress(), - new NginxPublicIpAddress(), new NginxPublicIpAddress())) - .withPrivateIpAddresses( - Arrays.asList(new NginxPrivateIpAddress(), new NginxPrivateIpAddress()))) + .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress())) + .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress(), new NginxPrivateIpAddress(), + new NginxPrivateIpAddress(), new NginxPrivateIpAddress()))) .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("ibbdaxconfoza"))) - .withEnableDiagnosticsSupport(true) + new NginxNetworkInterfaceConfiguration().withSubnetId("yqtfihwh"))) + .withEnableDiagnosticsSupport(false) .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("pzlrphw").withContainerName("oldweyuqdu"))) - .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(375067057) + new NginxStorageAccount().withAccountName("dphqamv").withContainerName("fwynwcvtbvkay"))) + .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(1068554694) .withProfiles(Arrays.asList( - new ScaleProfile().withName("wrbiorkt") - .withCapacity(new ScaleProfileCapacity().withMin(1451955961).withMax(476504183)), - new ScaleProfile().withName("wjhhgdnhxmsivf") - .withCapacity(new ScaleProfileCapacity().withMin(2010806413).withMax(601340793))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("ox")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("ufiqndieuzaof")) + new ScaleProfile().withName("qiatkzwpcnp") + .withCapacity(new ScaleProfileCapacity().withMin(1102080272).withMax(219155482)), + new ScaleProfile().withName("jaesgvvsccya") + .withCapacity(new ScaleProfileCapacity().withMin(248286602).withMax(306781812)), + new ScaleProfile().withName("qfhwyg") + .withCapacity(new ScaleProfileCapacity().withMin(1810005859).withMax(376601626))))) + .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("nk")) + .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("semdwzrmu")) .withNginxAppProtect(new NginxDeploymentPropertiesNginxAppProtect().withWebApplicationFirewallSettings( new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED)))) - .withSku(new ResourceSku().withName("rilbywdx")) + .withIdentity(new IdentityProperties().withType(IdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("w", new UserIdentityProperties(), "vgoup", + new UserIdentityProperties(), "kvtkkg", new UserIdentityProperties()))) + .withSku(new ResourceSku().withName("qwjygvja")) .create(); - Assertions.assertEquals("idfcxsspuunnoxyh", response.location()); - Assertions.assertEquals("qddrihpfhoqcaae", response.tags().get("dao")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("eoybfhjxakvvjgs", + Assertions.assertEquals("doiwi", response.location()); + Assertions.assertEquals("tywubxcbihwq", response.tags().get("nfdn")); + Assertions.assertEquals("htpwij", response.properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(true, response.properties().enableDiagnosticsSupport()); - Assertions.assertEquals("wt", response.properties().logging().storageAccount().accountName()); - Assertions.assertEquals("kxn", response.properties().logging().storageAccount().containerName()); - Assertions.assertEquals(2104896567, response.properties().scalingProperties().capacity()); - Assertions.assertEquals("yvudtjuewbci", response.properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1871891438, + Assertions.assertTrue(response.properties().enableDiagnosticsSupport()); + Assertions.assertEquals("owvrvmtgjqppyos", response.properties().logging().storageAccount().accountName()); + Assertions.assertEquals("on", response.properties().logging().storageAccount().containerName()); + Assertions.assertEquals(856785773, response.properties().scalingProperties().capacity()); + Assertions.assertEquals("ipn", response.properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1260829297, response.properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(535543031, + Assertions.assertEquals(1762342215, response.properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("wjplma", response.properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("cyohpfkyrkdbd", response.properties().userProfile().preferredEmail()); + Assertions.assertEquals("tsgumhj", response.properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("kkxwslol", response.properties().userProfile().preferredEmail()); Assertions.assertEquals(ActivationState.ENABLED, response.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); - Assertions.assertEquals("vlerchpqbmfpjba", response.sku().name()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("ywvtylbfpnc", response.sku().name()); } // Use "Map.of" if available diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsGetByResourceGroupWithResponseMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsGetByResourceGroupWithResponseMockTests.java index 4bcc1d93834b..58d730dc0ddd 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -23,7 +23,7 @@ public final class DeploymentsGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"tsgumhj\",\"tenantId\":\"ikkx\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"njwmwkpnbsazejj\":{\"principalId\":\"qpvuzlmvfelf\",\"clientId\":\"gplcrpwjxeznoigb\"},\"mkqjj\":{\"principalId\":\"kagfhsxtt\",\"clientId\":\"gzxnfaazpxdtnk\"},\"ixqtn\":{\"principalId\":\"uenvrkp\",\"clientId\":\"uaibrebqaaysj\"},\"mjihyeozphv\":{\"principalId\":\"tezlwff\",\"clientId\":\"akpjpqqmtedlt\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"nginxVersion\":\"ncyg\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{}],\"privateIPAddresses\":[{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"cwxqu\"}},\"ipAddress\":\"vzhfstotxhoj\",\"enableDiagnosticsSupport\":false,\"logging\":{\"storageAccount\":{\"accountName\":\"lmcuvhixb\",\"containerName\":\"yfwnylr\"}},\"scalingProperties\":{\"capacity\":1448571025,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"tpkiwkkbnujry\",\"capacity\":{\"min\":429689436,\"max\":1368964811}},{\"name\":\"y\",\"capacity\":{\"min\":151793614,\"max\":2136343303}},{\"name\":\"pncur\",\"capacity\":{\"min\":1036989495,\"max\":913086384}},{\"name\":\"wiithtywub\",\"capacity\":{\"min\":1797172930,\"max\":709721668}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"h\"},\"userProfile\":{\"preferredEmail\":\"nfdn\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"dgoihxumwctondzj\",\"revisionDatetime\":\"2021-05-20T02:25:29Z\"},\"botSignaturesPackage\":{\"version\":\"dfdlwggyts\",\"revisionDatetime\":\"2020-12-29T04:47:45Z\"},\"threatCampaignsPackage\":{\"version\":\"ovvtgseinqfiu\",\"revisionDatetime\":\"2021-02-21T15:59:19Z\"},\"componentVersions\":{\"wafEngineVersion\":\"knpirgnepttwq\",\"wafNginxVersion\":\"sniffc\"}}},\"dataplaneApiEndpoint\":\"qnrojlpijnkrxfrd\"},\"sku\":{\"name\":\"c\"},\"location\":\"tizzronasxif\",\"tags\":{\"wesgogczh\":\"qyzhf\"},\"id\":\"nnxk\",\"name\":\"lgnyhmo\",\"type\":\"sxkkg\"}"; + = "{\"properties\":{\"provisioningState\":\"Creating\",\"nginxVersion\":\"nsj\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{},{}],\"privateIPAddresses\":[{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"dszue\"}},\"ipAddress\":\"sbzkf\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"nqicvinvkjjxdxrb\",\"containerName\":\"kzclewyh\"}},\"scalingProperties\":{\"capacity\":969914681,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"tzpofncckwyfzq\",\"capacity\":{\"min\":708392093,\"max\":1576078570}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"buy\"},\"userProfile\":{\"preferredEmail\":\"zfeqztppri\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"altol\",\"attackSignaturesPackage\":{\"version\":\"cwsobqwcs\",\"revisionDatetime\":\"2021-04-29T03:25:13Z\"},\"botSignaturesPackage\":{\"version\":\"wdcfhucqdpfuv\",\"revisionDatetime\":\"2021-07-29T06:16:34Z\"},\"threatCampaignsPackage\":{\"version\":\"bjj\",\"revisionDatetime\":\"2021-01-27T19:23:30Z\"},\"componentVersions\":{\"wafEngineVersion\":\"vxb\",\"wafNginxVersion\":\"t\"}}},\"dataplaneApiEndpoint\":\"dut\"},\"identity\":{\"principalId\":\"rmrlxqtvcof\",\"tenantId\":\"f\",\"type\":\"None\",\"userAssignedIdentities\":{\"sgsahmkycgr\":{\"principalId\":\"bgdknnqv\",\"clientId\":\"znqntoru\"}}},\"sku\":{\"name\":\"wjue\"},\"location\":\"eburu\",\"tags\":{\"l\":\"ovsm\",\"oefki\":\"wabm\",\"qujmqlgkf\":\"rvtp\",\"tujitcjedft\":\"tndoaongbjc\"},\"id\":\"waezkojvd\",\"name\":\"pzfoqoui\",\"type\":\"ybxarzgszu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,27 +33,27 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NginxDeployment response = manager.deployments() - .getByResourceGroupWithResponse("gfipnsxk", "cwaekrrjre", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("owpulpq", "lyls", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("tizzronasxif", response.location()); - Assertions.assertEquals("qyzhf", response.tags().get("wesgogczh")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("cwxqu", + Assertions.assertEquals("eburu", response.location()); + Assertions.assertEquals("ovsm", response.tags().get("l")); + Assertions.assertEquals("dszue", response.properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(false, response.properties().enableDiagnosticsSupport()); - Assertions.assertEquals("lmcuvhixb", response.properties().logging().storageAccount().accountName()); - Assertions.assertEquals("yfwnylr", response.properties().logging().storageAccount().containerName()); - Assertions.assertEquals(1448571025, response.properties().scalingProperties().capacity()); - Assertions.assertEquals("tpkiwkkbnujry", response.properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(429689436, + Assertions.assertTrue(response.properties().enableDiagnosticsSupport()); + Assertions.assertEquals("nqicvinvkjjxdxrb", response.properties().logging().storageAccount().accountName()); + Assertions.assertEquals("kzclewyh", response.properties().logging().storageAccount().containerName()); + Assertions.assertEquals(969914681, response.properties().scalingProperties().capacity()); + Assertions.assertEquals("tzpofncckwyfzq", response.properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(708392093, response.properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1368964811, + Assertions.assertEquals(1576078570, response.properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("h", response.properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("nfdn", response.properties().userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("buy", response.properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("zfeqztppri", response.properties().userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.ENABLED, response.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); - Assertions.assertEquals("c", response.sku().name()); + Assertions.assertEquals(IdentityType.NONE, response.identity().type()); + Assertions.assertEquals("wjue", response.sku().name()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListByResourceGroupMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListByResourceGroupMockTests.java index 40ff98c4d8e2..5d918ed7da64 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListByResourceGroupMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -24,7 +24,7 @@ public final class DeploymentsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"iklbydvkhb\",\"tenantId\":\"dznx\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"eamtmcz\":{\"principalId\":\"njivolvtnovq\",\"clientId\":\"gemjdftuljltdu\"}}},\"properties\":{\"provisioningState\":\"Failed\",\"nginxVersion\":\"wcw\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{}],\"privateIPAddresses\":[{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"mojmsvpkjprvkw\"}},\"ipAddress\":\"zqljyxgtczh\",\"enableDiagnosticsSupport\":false,\"logging\":{\"storageAccount\":{\"accountName\":\"shmkxmaehvbbxur\",\"containerName\":\"ltfnhtbaxkgx\"}},\"scalingProperties\":{\"capacity\":674255307,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"yklyhpluodpvruud\",\"capacity\":{\"min\":1795826446,\"max\":1016035136}},{\"name\":\"ibthostgktstvd\",\"capacity\":{\"min\":1128262143,\"max\":318971885}},{\"name\":\"lzedqbcvhzlhplo\",\"capacity\":{\"min\":1080296367,\"max\":695028965}},{\"name\":\"dlwwqfbumlkxt\",\"capacity\":{\"min\":983643035,\"max\":2123873865}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"smlmbtxhwgfwsrta\"},\"userProfile\":{\"preferredEmail\":\"ezbrhubskh\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"okkqfqjbvleo\",\"revisionDatetime\":\"2020-12-31T22:39:11Z\"},\"botSignaturesPackage\":{\"version\":\"luiqtqzfavyvnqq\",\"revisionDatetime\":\"2021-05-23T06:21:06Z\"},\"threatCampaignsPackage\":{\"version\":\"ryeu\",\"revisionDatetime\":\"2021-02-15T18:43:44Z\"},\"componentVersions\":{\"wafEngineVersion\":\"kq\",\"wafNginxVersion\":\"bqgzslesjcbhern\"}}},\"dataplaneApiEndpoint\":\"iew\"},\"sku\":{\"name\":\"cv\"},\"location\":\"uwrbehwagoh\",\"tags\":{\"emvvhm\":\"fkmr\"},\"id\":\"tdrjfutacoebj\",\"name\":\"ewzcjznmwcp\",\"type\":\"guaadraufactkahz\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"nginxVersion\":\"zxkhnzbonlwnto\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{},{}],\"privateIPAddresses\":[{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"kszzcmrvexztv\"}},\"ipAddress\":\"qgsfraoyzkoow\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"xawqaldsyuuxim\",\"containerName\":\"qfobwyz\"}},\"scalingProperties\":{\"capacity\":1711302582,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"t\",\"capacity\":{\"min\":2069495604,\"max\":1465227251}},{\"name\":\"hpagm\",\"capacity\":{\"min\":155762894,\"max\":1165571898}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"dsnfdsdoakgtdl\"},\"userProfile\":{\"preferredEmail\":\"zev\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"usdsttwv\",\"attackSignaturesPackage\":{\"version\":\"vbbejdcng\",\"revisionDatetime\":\"2021-08-13T08:26Z\"},\"botSignaturesPackage\":{\"version\":\"oakufgm\",\"revisionDatetime\":\"2021-04-18T15:55:11Z\"},\"threatCampaignsPackage\":{\"version\":\"wr\",\"revisionDatetime\":\"2021-12-02T23:57:11Z\"},\"componentVersions\":{\"wafEngineVersion\":\"twaenuuzko\",\"wafNginxVersion\":\"bminrfdwoyuhhzi\"}}},\"dataplaneApiEndpoint\":\"efozbhdms\"},\"identity\":{\"principalId\":\"zqhof\",\"tenantId\":\"maequiahxicslfa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vwitqscyw\":{\"principalId\":\"ylhalnswhcc\",\"clientId\":\"hka\"},\"z\":{\"principalId\":\"gwol\",\"clientId\":\"czbwemhairsbr\"},\"ttlstvlzywemhz\":{\"principalId\":\"msweypqwdxggicc\",\"clientId\":\"xqhuexm\"},\"adcy\":{\"principalId\":\"csdtclusiypbs\",\"clientId\":\"ytguslf\"}}},\"sku\":{\"name\":\"ukyhejhzis\"},\"location\":\"fpel\",\"tags\":{\"srp\":\"pv\"},\"id\":\"vu\",\"name\":\"zraehtwd\",\"type\":\"r\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,35 +34,35 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.deployments().listByResourceGroup("wrykqgai", com.azure.core.util.Context.NONE); + = manager.deployments().listByResourceGroup("oxciqopidoamcio", com.azure.core.util.Context.NONE); - Assertions.assertEquals("uwrbehwagoh", response.iterator().next().location()); - Assertions.assertEquals("fkmr", response.iterator().next().tags().get("emvvhm")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("mojmsvpkjprvkw", + Assertions.assertEquals("fpel", response.iterator().next().location()); + Assertions.assertEquals("pv", response.iterator().next().tags().get("srp")); + Assertions.assertEquals("kszzcmrvexztv", response.iterator().next().properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(false, response.iterator().next().properties().enableDiagnosticsSupport()); - Assertions.assertEquals("shmkxmaehvbbxur", + Assertions.assertTrue(response.iterator().next().properties().enableDiagnosticsSupport()); + Assertions.assertEquals("xawqaldsyuuxim", response.iterator().next().properties().logging().storageAccount().accountName()); - Assertions.assertEquals("ltfnhtbaxkgx", + Assertions.assertEquals("qfobwyz", response.iterator().next().properties().logging().storageAccount().containerName()); - Assertions.assertEquals(674255307, response.iterator().next().properties().scalingProperties().capacity()); - Assertions.assertEquals("yklyhpluodpvruud", + Assertions.assertEquals(1711302582, response.iterator().next().properties().scalingProperties().capacity()); + Assertions.assertEquals("t", response.iterator().next().properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1795826446, + Assertions.assertEquals(2069495604, response.iterator().next().properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1016035136, + Assertions.assertEquals(1465227251, response.iterator().next().properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("smlmbtxhwgfwsrta", + Assertions.assertEquals("dsnfdsdoakgtdl", response.iterator().next().properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("ezbrhubskh", response.iterator().next().properties().userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.ENABLED, + Assertions.assertEquals("zev", response.iterator().next().properties().userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.DISABLED, response.iterator() .next() .properties() .nginxAppProtect() .webApplicationFirewallSettings() .activationState()); - Assertions.assertEquals("cv", response.iterator().next().sku().name()); + Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("ukyhejhzis", response.iterator().next().sku().name()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListMockTests.java index c2b865b57f20..80f2b5dd9bb1 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DeploymentsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -24,7 +24,7 @@ public final class DeploymentsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"xvcxgfrpdsofbshr\",\"tenantId\":\"vbuswd\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wnopqgikyzirtx\":{\"principalId\":\"cnunvjsr\",\"clientId\":\"f\"},\"qukrydxt\":{\"principalId\":\"uxzejntpsew\",\"clientId\":\"oi\"},\"pjbi\":{\"principalId\":\"ieoxorggufhyaomt\",\"clientId\":\"hhavgrvkffovjz\"},\"nbkfezzxscy\":{\"principalId\":\"jmfxumvf\",\"clientId\":\"uyovw\"}}},\"properties\":{\"provisioningState\":\"Deleting\",\"nginxVersion\":\"irujbz\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{},{}],\"privateIPAddresses\":[{},{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"c\"}},\"ipAddress\":\"pniyujviyl\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"snrbgyefrymsgao\",\"containerName\":\"mwn\"}},\"scalingProperties\":{\"capacity\":1012441055,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"hirctymoxoftpipi\",\"capacity\":{\"min\":420468172,\"max\":1383298252}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"uh\"},\"userProfile\":{\"preferredEmail\":\"pqjlihhyusps\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"mfwdgzxu\",\"revisionDatetime\":\"2021-04-20T13:27:45Z\"},\"botSignaturesPackage\":{\"version\":\"vpa\",\"revisionDatetime\":\"2021-12-09T14:22:52Z\"},\"threatCampaignsPackage\":{\"version\":\"reuzvxurisjn\",\"revisionDatetime\":\"2021-02-10T22:06:59Z\"},\"componentVersions\":{\"wafEngineVersion\":\"txifqj\",\"wafNginxVersion\":\"gxmrhublwp\"}}},\"dataplaneApiEndpoint\":\"sutrgjup\"},\"sku\":{\"name\":\"utpwoqhihejqgw\"},\"location\":\"nfqn\",\"tags\":{\"imwkslircizj\":\"psxjvf\",\"t\":\"vydfceacvlhvygdy\",\"jslb\":\"mrtwna\"},\"id\":\"wkojgcyztsfmzn\",\"name\":\"aeqphchqnr\",\"type\":\"rpxeh\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"nginxVersion\":\"byrcdlbhshfwp\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{}],\"privateIPAddresses\":[{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"khevxccedc\"}},\"ipAddress\":\"md\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"xltjcvnhltiu\",\"containerName\":\"xnavvwxq\"}},\"scalingProperties\":{\"capacity\":1077177476,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"y\",\"capacity\":{\"min\":1222380956,\"max\":1874068657}},{\"name\":\"wlmdjrkv\",\"capacity\":{\"min\":197369131,\"max\":185014481}},{\"name\":\"vfvpdbodaciz\",\"capacity\":{\"min\":218756340,\"max\":242566551}},{\"name\":\"lhkrribdeibqipqk\",\"capacity\":{\"min\":2080529192,\"max\":1234217414}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"ndzwmkrefa\"},\"userProfile\":{\"preferredEmail\":\"orwkqnyh\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"ivfxzsjabibsyst\",\"attackSignaturesPackage\":{\"version\":\"fsdjpvkvp\",\"revisionDatetime\":\"2021-04-17T09:45:49Z\"},\"botSignaturesPackage\":{\"version\":\"bkzbzkd\",\"revisionDatetime\":\"2021-03-09T04:47:51Z\"},\"threatCampaignsPackage\":{\"version\":\"jabudurgkakmo\",\"revisionDatetime\":\"2021-02-03T01:10:02Z\"},\"componentVersions\":{\"wafEngineVersion\":\"jjklff\",\"wafNginxVersion\":\"mouwqlgzrfzeey\"}}},\"dataplaneApiEndpoint\":\"izikayuhq\"},\"identity\":{\"principalId\":\"bs\",\"tenantId\":\"bqwrvtldgm\",\"type\":\"None\",\"userAssignedIdentities\":{\"drhneuyow\":{\"principalId\":\"ipaslthaqfxssmwu\",\"clientId\":\"bdsrez\"},\"sibircgpi\":{\"principalId\":\"d\",\"clientId\":\"t\"},\"i\":{\"principalId\":\"zimejzanlfzx\",\"clientId\":\"vrmbzono\"},\"frl\":{\"principalId\":\"jq\",\"clientId\":\"rgz\"}}},\"sku\":{\"name\":\"szrnwo\"},\"location\":\"ndfpwpj\",\"tags\":{\"h\":\"bt\",\"dhszfjv\":\"lsj\",\"qmqhldvriii\":\"bgofeljag\"},\"id\":\"jnalghf\",\"name\":\"vtvsexsowueluq\",\"type\":\"hahhxvrhmzkwpj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,32 +35,33 @@ public void testList() throws Exception { PagedIterable response = manager.deployments().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("nfqn", response.iterator().next().location()); - Assertions.assertEquals("psxjvf", response.iterator().next().tags().get("imwkslircizj")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("c", + Assertions.assertEquals("ndfpwpj", response.iterator().next().location()); + Assertions.assertEquals("bt", response.iterator().next().tags().get("h")); + Assertions.assertEquals("khevxccedc", response.iterator().next().properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(true, response.iterator().next().properties().enableDiagnosticsSupport()); - Assertions.assertEquals("snrbgyefrymsgao", + Assertions.assertTrue(response.iterator().next().properties().enableDiagnosticsSupport()); + Assertions.assertEquals("xltjcvnhltiu", response.iterator().next().properties().logging().storageAccount().accountName()); - Assertions.assertEquals("mwn", + Assertions.assertEquals("xnavvwxq", response.iterator().next().properties().logging().storageAccount().containerName()); - Assertions.assertEquals(1012441055, response.iterator().next().properties().scalingProperties().capacity()); - Assertions.assertEquals("hirctymoxoftpipi", + Assertions.assertEquals(1077177476, response.iterator().next().properties().scalingProperties().capacity()); + Assertions.assertEquals("y", response.iterator().next().properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(420468172, + Assertions.assertEquals(1222380956, response.iterator().next().properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1383298252, + Assertions.assertEquals(1874068657, response.iterator().next().properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("uh", response.iterator().next().properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("pqjlihhyusps", response.iterator().next().properties().userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("ndzwmkrefa", + response.iterator().next().properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("orwkqnyh", response.iterator().next().properties().userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.ENABLED, response.iterator() .next() .properties() .nginxAppProtect() .webApplicationFirewallSettings() .activationState()); - Assertions.assertEquals("utpwoqhihejqgw", response.iterator().next().sku().name()); + Assertions.assertEquals(IdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("szrnwo", response.iterator().next().sku().name()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DiagnosticItemTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DiagnosticItemTests.java index 55b42b2a7405..fccfd81491cd 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DiagnosticItemTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/DiagnosticItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -13,39 +13,16 @@ public final class DiagnosticItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DiagnosticItem model = BinaryData.fromString( - "{\"id\":\"iwwzjuqk\",\"directive\":\"rsa\",\"description\":\"iwkuofos\",\"file\":\"ghsauuimjmvxied\",\"line\":44.474648,\"message\":\"gidyjrrf\",\"rule\":\"y\",\"level\":\"Warning\",\"category\":\"v\"}") + "{\"id\":\"glrvimjwosytxi\",\"directive\":\"cskfcktqumiekk\",\"description\":\"zzikhlyfjhdg\",\"file\":\"gge\",\"line\":29.760029253080745,\"message\":\"nyga\",\"rule\":\"qidbqfatpxllrxcy\",\"level\":\"Warning\",\"category\":\"a\"}") .toObject(DiagnosticItem.class); - Assertions.assertEquals("iwwzjuqk", model.id()); - Assertions.assertEquals("rsa", model.directive()); - Assertions.assertEquals("iwkuofos", model.description()); - Assertions.assertEquals("ghsauuimjmvxied", model.file()); - Assertions.assertEquals(44.474648f, model.line()); - Assertions.assertEquals("gidyjrrf", model.message()); - Assertions.assertEquals("y", model.rule()); + Assertions.assertEquals("glrvimjwosytxi", model.id()); + Assertions.assertEquals("cskfcktqumiekk", model.directive()); + Assertions.assertEquals("zzikhlyfjhdg", model.description()); + Assertions.assertEquals("gge", model.file()); + Assertions.assertEquals(29.760029253080745, model.line()); + Assertions.assertEquals("nyga", model.message()); + Assertions.assertEquals("qidbqfatpxllrxcy", model.rule()); Assertions.assertEquals(Level.WARNING, model.level()); - Assertions.assertEquals("v", model.category()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticItem model = new DiagnosticItem().withId("iwwzjuqk") - .withDirective("rsa") - .withDescription("iwkuofos") - .withFile("ghsauuimjmvxied") - .withLine(44.474648f) - .withMessage("gidyjrrf") - .withRule("y") - .withLevel(Level.WARNING) - .withCategory("v"); - model = BinaryData.fromObject(model).toObject(DiagnosticItem.class); - Assertions.assertEquals("iwwzjuqk", model.id()); - Assertions.assertEquals("rsa", model.directive()); - Assertions.assertEquals("iwkuofos", model.description()); - Assertions.assertEquals("ghsauuimjmvxied", model.file()); - Assertions.assertEquals(44.474648f, model.line()); - Assertions.assertEquals("gidyjrrf", model.message()); - Assertions.assertEquals("y", model.rule()); - Assertions.assertEquals(Level.WARNING, model.level()); - Assertions.assertEquals("v", model.category()); + Assertions.assertEquals("a", model.category()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/IdentityPropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/IdentityPropertiesTests.java index d47ccaccdda7..e6a926e13bd7 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/IdentityPropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/IdentityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -16,7 +16,7 @@ public final class IdentityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { IdentityProperties model = BinaryData.fromString( - "{\"principalId\":\"cxgod\",\"tenantId\":\"fqkkr\",\"type\":\"None\",\"userAssignedIdentities\":{\"cispnqzahmgkbr\":{\"principalId\":\"riwflzlfb\",\"clientId\":\"puz\"},\"drgvtqagn\":{\"principalId\":\"y\",\"clientId\":\"ibnuqqkpik\"},\"zzmhjrunmpxttd\":{\"principalId\":\"ynhijggme\",\"clientId\":\"siarbutrcvpn\"}}}") + "{\"principalId\":\"hcbonqvpkvlr\",\"tenantId\":\"jease\",\"type\":\"None\",\"userAssignedIdentities\":{\"dlwtgrhpdj\":{\"principalId\":\"lokeyy\",\"clientId\":\"nj\"},\"b\":{\"principalId\":\"umasxazjpq\",\"clientId\":\"gual\"}}}") .toObject(IdentityProperties.class); Assertions.assertEquals(IdentityType.NONE, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { IdentityProperties model = new IdentityProperties().withType(IdentityType.NONE) - .withUserAssignedIdentities(mapOf("cispnqzahmgkbr", new UserIdentityProperties(), "drgvtqagn", - new UserIdentityProperties(), "zzmhjrunmpxttd", new UserIdentityProperties())); + .withUserAssignedIdentities( + mapOf("dlwtgrhpdj", new UserIdentityProperties(), "b", new UserIdentityProperties())); model = BinaryData.fromObject(model).toObject(IdentityProperties.class); Assertions.assertEquals(IdentityType.NONE, model.type()); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationFileTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationFileTests.java index 20541cd8af59..3aac7a6c94fe 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationFileTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationFileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,18 +12,18 @@ public final class NginxConfigurationFileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationFile model - = BinaryData.fromString("{\"content\":\"fygxgispemvtzfk\",\"virtualPath\":\"ubljofxqe\"}") + = BinaryData.fromString("{\"content\":\"uhprwmdyvxqt\",\"virtualPath\":\"riwwroy\"}") .toObject(NginxConfigurationFile.class); - Assertions.assertEquals("fygxgispemvtzfk", model.content()); - Assertions.assertEquals("ubljofxqe", model.virtualPath()); + Assertions.assertEquals("uhprwmdyvxqt", model.content()); + Assertions.assertEquals("riwwroy", model.virtualPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxConfigurationFile model - = new NginxConfigurationFile().withContent("fygxgispemvtzfk").withVirtualPath("ubljofxqe"); + = new NginxConfigurationFile().withContent("uhprwmdyvxqt").withVirtualPath("riwwroy"); model = BinaryData.fromObject(model).toObject(NginxConfigurationFile.class); - Assertions.assertEquals("fygxgispemvtzfk", model.content()); - Assertions.assertEquals("ubljofxqe", model.virtualPath()); + Assertions.assertEquals("uhprwmdyvxqt", model.content()); + Assertions.assertEquals("riwwroy", model.virtualPath()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationListResponseTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationListResponseTests.java index 2cd17672a8a2..8aafce736a15 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationListResponseTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationListResponseTests.java @@ -1,64 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationResponseInner; -import com.azure.resourcemanager.nginx.models.NginxConfigurationFile; -import com.azure.resourcemanager.nginx.models.NginxConfigurationListResponse; -import com.azure.resourcemanager.nginx.models.NginxConfigurationPackage; -import com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileResponse; -import com.azure.resourcemanager.nginx.models.NginxConfigurationResponseProperties; -import java.util.Arrays; +import com.azure.resourcemanager.nginx.implementation.models.NginxConfigurationListResponse; import org.junit.jupiter.api.Assertions; public final class NginxConfigurationListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"files\":[{\"content\":\"ddeqsrdeupewnwre\",\"virtualPath\":\"jzyflu\"},{\"content\":\"rh\",\"virtualPath\":\"fcqhsmyurkd\"}],\"protectedFiles\":[{\"virtualPath\":\"he\",\"contentHash\":\"k\"}],\"package\":{\"data\":\"xukcdmpar\",\"protectedFiles\":[\"uanzwuxzdx\"]},\"rootFile\":\"yrlhmwhfpmrqobm\"},\"id\":\"kknryrtihf\",\"name\":\"tijbpzvgnwzsymgl\",\"type\":\"uf\"}],\"nextLink\":\"zk\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"files\":[{\"content\":\"ivetvtcq\",\"virtualPath\":\"tdo\"},{\"content\":\"cbxvwvxyslqbh\",\"virtualPath\":\"xoblytkbl\"}],\"protectedFiles\":[{\"virtualPath\":\"wwfbkrvrnsvshq\",\"contentHash\":\"hxcr\"},{\"virtualPath\":\"fovasr\",\"contentHash\":\"v\"},{\"virtualPath\":\"hsqfsubcgjbirxbp\",\"contentHash\":\"srfbjfdtwss\"},{\"virtualPath\":\"ftpvjzbexil\",\"contentHash\":\"nfqqnvwp\"}],\"package\":{\"data\":\"aruoujmkcjhwqyt\",\"protectedFiles\":[\"bnw\"]},\"rootFile\":\"wgdrjervnaenqp\"},\"id\":\"indoygmifthnzd\",\"name\":\"dslgnayqigynduh\",\"type\":\"vhqlkthumaqo\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"files\":[{\"content\":\"iertgccymvaolp\",\"virtualPath\":\"lqlfm\"},{\"content\":\"n\",\"virtualPath\":\"glzpswiydm\"},{\"content\":\"yhz\",\"virtualPath\":\"ss\"}],\"protectedFiles\":[{\"virtualPath\":\"mnvdfzn\",\"contentHash\":\"ao\"},{\"virtualPath\":\"xzb\",\"contentHash\":\"blylpstdbh\"},{\"virtualPath\":\"srzdzucerscdn\",\"contentHash\":\"evfiwjmygt\"}],\"package\":{\"data\":\"lswtmweriofzpyqs\",\"protectedFiles\":[\"abnetshh\"]},\"rootFile\":\"h\"},\"id\":\"plvwiwubmwmbes\",\"name\":\"dnkwwtppjflcxog\",\"type\":\"okonzmnsikvmkqz\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"files\":[{\"content\":\"fzxmhhvhgureodkw\",\"virtualPath\":\"dagxtibqd\"}],\"protectedFiles\":[{\"virtualPath\":\"akbogqxndlkzgxh\",\"contentHash\":\"iplbpodxunkbebxm\"}],\"package\":{\"data\":\"yntwlrbq\",\"protectedFiles\":[\"ievseotgqrllt\",\"u\",\"lauwzizxbmpgcjef\",\"zmuvpbttdumorppx\"]},\"rootFile\":\"mnzb\"},\"id\":\"hjpglkf\",\"name\":\"ohdneuel\",\"type\":\"phsdyhto\"}],\"nextLink\":\"ikdowwquuvx\"}") .toObject(NginxConfigurationListResponse.class); - Assertions.assertEquals("ddeqsrdeupewnwre", model.value().get(0).properties().files().get(0).content()); - Assertions.assertEquals("jzyflu", model.value().get(0).properties().files().get(0).virtualPath()); - Assertions.assertEquals("he", model.value().get(0).properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("k", model.value().get(0).properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("xukcdmpar", model.value().get(0).properties().packageProperty().data()); - Assertions.assertEquals("uanzwuxzdx", - model.value().get(0).properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("yrlhmwhfpmrqobm", model.value().get(0).properties().rootFile()); - Assertions.assertEquals("zk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxConfigurationListResponse model - = new NginxConfigurationListResponse() - .withValue( - Arrays - .asList(new NginxConfigurationResponseInner() - .withProperties(new NginxConfigurationResponseProperties() - .withFiles(Arrays.asList( - new NginxConfigurationFile().withContent("ddeqsrdeupewnwre") - .withVirtualPath("jzyflu"), - new NginxConfigurationFile().withContent("rh").withVirtualPath("fcqhsmyurkd"))) - .withProtectedFiles( - Arrays.asList(new NginxConfigurationProtectedFileResponse().withVirtualPath("he") - .withContentHash("k"))) - .withPackageProperty(new NginxConfigurationPackage().withData("xukcdmpar") - .withProtectedFiles(Arrays.asList("uanzwuxzdx"))) - .withRootFile("yrlhmwhfpmrqobm")))) - .withNextLink("zk"); - model = BinaryData.fromObject(model).toObject(NginxConfigurationListResponse.class); - Assertions.assertEquals("ddeqsrdeupewnwre", model.value().get(0).properties().files().get(0).content()); - Assertions.assertEquals("jzyflu", model.value().get(0).properties().files().get(0).virtualPath()); - Assertions.assertEquals("he", model.value().get(0).properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("k", model.value().get(0).properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("xukcdmpar", model.value().get(0).properties().packageProperty().data()); - Assertions.assertEquals("uanzwuxzdx", - model.value().get(0).properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("yrlhmwhfpmrqobm", model.value().get(0).properties().rootFile()); - Assertions.assertEquals("zk", model.nextLink()); + Assertions.assertEquals("ivetvtcq", model.value().get(0).properties().files().get(0).content()); + Assertions.assertEquals("tdo", model.value().get(0).properties().files().get(0).virtualPath()); + Assertions.assertEquals("wwfbkrvrnsvshq", + model.value().get(0).properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("hxcr", model.value().get(0).properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("aruoujmkcjhwqyt", model.value().get(0).properties().packageProperty().data()); + Assertions.assertEquals("bnw", model.value().get(0).properties().packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("wgdrjervnaenqp", model.value().get(0).properties().rootFile()); + Assertions.assertEquals("ikdowwquuvx", model.nextLink()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationPackageTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationPackageTests.java index 16bf0d49f335..965633eb192b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationPackageTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationPackageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,19 +12,19 @@ public final class NginxConfigurationPackageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NginxConfigurationPackage model = BinaryData - .fromString("{\"data\":\"qulngsntnbybkzgc\",\"protectedFiles\":[\"clxxwrljdo\",\"skcqvkocrcjd\"]}") + NginxConfigurationPackage model = BinaryData.fromString( + "{\"data\":\"sgzvahapjyzhpv\",\"protectedFiles\":[\"cjrvxdjzlmwlxkv\",\"gfhzovawjvzunlut\",\"nnprn\",\"i\"]}") .toObject(NginxConfigurationPackage.class); - Assertions.assertEquals("qulngsntnbybkzgc", model.data()); - Assertions.assertEquals("clxxwrljdo", model.protectedFiles().get(0)); + Assertions.assertEquals("sgzvahapjyzhpv", model.data()); + Assertions.assertEquals("cjrvxdjzlmwlxkv", model.protectedFiles().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxConfigurationPackage model = new NginxConfigurationPackage().withData("qulngsntnbybkzgc") - .withProtectedFiles(Arrays.asList("clxxwrljdo", "skcqvkocrcjd")); + NginxConfigurationPackage model = new NginxConfigurationPackage().withData("sgzvahapjyzhpv") + .withProtectedFiles(Arrays.asList("cjrvxdjzlmwlxkv", "gfhzovawjvzunlut", "nnprn", "i")); model = BinaryData.fromObject(model).toObject(NginxConfigurationPackage.class); - Assertions.assertEquals("qulngsntnbybkzgc", model.data()); - Assertions.assertEquals("clxxwrljdo", model.protectedFiles().get(0)); + Assertions.assertEquals("sgzvahapjyzhpv", model.data()); + Assertions.assertEquals("cjrvxdjzlmwlxkv", model.protectedFiles().get(0)); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileRequestTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileRequestTests.java index 141fcd23e7b2..80c05628675b 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileRequestTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -11,23 +11,23 @@ public final class NginxConfigurationProtectedFileRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NginxConfigurationProtectedFileRequest model = BinaryData - .fromString("{\"content\":\"ufizuckyf\",\"virtualPath\":\"rfidfvzwdz\",\"contentHash\":\"tymw\"}") - .toObject(NginxConfigurationProtectedFileRequest.class); - Assertions.assertEquals("ufizuckyf", model.content()); - Assertions.assertEquals("rfidfvzwdz", model.virtualPath()); - Assertions.assertEquals("tymw", model.contentHash()); + NginxConfigurationProtectedFileRequest model + = BinaryData.fromString("{\"content\":\"divkrt\",\"virtualPath\":\"bxqz\",\"contentHash\":\"zjf\"}") + .toObject(NginxConfigurationProtectedFileRequest.class); + Assertions.assertEquals("divkrt", model.content()); + Assertions.assertEquals("bxqz", model.virtualPath()); + Assertions.assertEquals("zjf", model.contentHash()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxConfigurationProtectedFileRequest model - = new NginxConfigurationProtectedFileRequest().withContent("ufizuckyf") - .withVirtualPath("rfidfvzwdz") - .withContentHash("tymw"); + = new NginxConfigurationProtectedFileRequest().withContent("divkrt") + .withVirtualPath("bxqz") + .withContentHash("zjf"); model = BinaryData.fromObject(model).toObject(NginxConfigurationProtectedFileRequest.class); - Assertions.assertEquals("ufizuckyf", model.content()); - Assertions.assertEquals("rfidfvzwdz", model.virtualPath()); - Assertions.assertEquals("tymw", model.contentHash()); + Assertions.assertEquals("divkrt", model.content()); + Assertions.assertEquals("bxqz", model.virtualPath()); + Assertions.assertEquals("zjf", model.contentHash()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileResponseTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileResponseTests.java index 2f5d756cf2ca..f5c0fb857aad 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileResponseTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationProtectedFileResponseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,18 +12,9 @@ public final class NginxConfigurationProtectedFileResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationProtectedFileResponse model - = BinaryData.fromString("{\"virtualPath\":\"jaeq\",\"contentHash\":\"qjbasvms\"}") + = BinaryData.fromString("{\"virtualPath\":\"exrmcqibycnojvk\",\"contentHash\":\"e\"}") .toObject(NginxConfigurationProtectedFileResponse.class); - Assertions.assertEquals("jaeq", model.virtualPath()); - Assertions.assertEquals("qjbasvms", model.contentHash()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxConfigurationProtectedFileResponse model - = new NginxConfigurationProtectedFileResponse().withVirtualPath("jaeq").withContentHash("qjbasvms"); - model = BinaryData.fromObject(model).toObject(NginxConfigurationProtectedFileResponse.class); - Assertions.assertEquals("jaeq", model.virtualPath()); - Assertions.assertEquals("qjbasvms", model.contentHash()); + Assertions.assertEquals("exrmcqibycnojvk", model.virtualPath()); + Assertions.assertEquals("e", model.contentHash()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestPropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestPropertiesTests.java index 9c173864bf17..07ae199da1f9 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestPropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -16,46 +16,38 @@ public final class NginxConfigurationRequestPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationRequestProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"files\":[{\"content\":\"modmglougpb\",\"virtualPath\":\"tmut\"}],\"protectedFiles\":[{\"content\":\"ta\",\"virtualPath\":\"pwgcuertu\",\"contentHash\":\"dosvqwhbmdgbbjf\"},{\"content\":\"gmbmbexppbh\",\"virtualPath\":\"qrolfpf\",\"contentHash\":\"algbquxigjyjg\"},{\"content\":\"aoyfhrtxilnerkuj\",\"virtualPath\":\"vlejuvfqa\",\"contentHash\":\"lyxwjkcprbnwbx\"},{\"content\":\"vtb\",\"virtualPath\":\"ysszdnrujqguh\",\"contentHash\":\"ouqfprwz\"}],\"package\":{\"data\":\"g\",\"protectedFiles\":[\"nwui\"]},\"rootFile\":\"a\"}") + "{\"provisioningState\":\"Deleted\",\"files\":[{\"content\":\"medjvcslynqwwncw\",\"virtualPath\":\"hxg\"},{\"content\":\"rmgucnap\",\"virtualPath\":\"eoellwptfdygp\"}],\"protectedFiles\":[{\"content\":\"ac\",\"virtualPath\":\"pzfqrhhuaoppp\",\"contentHash\":\"eqx\"}],\"package\":{\"data\":\"dahzxctobg\",\"protectedFiles\":[\"moizpos\",\"mgrcfbu\",\"rmfqjhhkxbpvj\"]},\"rootFile\":\"jhxxjyn\"}") .toObject(NginxConfigurationRequestProperties.class); - Assertions.assertEquals("modmglougpb", model.files().get(0).content()); - Assertions.assertEquals("tmut", model.files().get(0).virtualPath()); - Assertions.assertEquals("ta", model.protectedFiles().get(0).content()); - Assertions.assertEquals("pwgcuertu", model.protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.protectedFiles().get(0).contentHash()); - Assertions.assertEquals("g", model.packageProperty().data()); - Assertions.assertEquals("nwui", model.packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("a", model.rootFile()); + Assertions.assertEquals("medjvcslynqwwncw", model.files().get(0).content()); + Assertions.assertEquals("hxg", model.files().get(0).virtualPath()); + Assertions.assertEquals("ac", model.protectedFiles().get(0).content()); + Assertions.assertEquals("pzfqrhhuaoppp", model.protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("eqx", model.protectedFiles().get(0).contentHash()); + Assertions.assertEquals("dahzxctobg", model.packageProperty().data()); + Assertions.assertEquals("moizpos", model.packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("jhxxjyn", model.rootFile()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxConfigurationRequestProperties model = new NginxConfigurationRequestProperties() - .withFiles(Arrays.asList(new NginxConfigurationFile().withContent("modmglougpb").withVirtualPath("tmut"))) - .withProtectedFiles(Arrays.asList( - new NginxConfigurationProtectedFileRequest().withContent("ta") - .withVirtualPath("pwgcuertu") - .withContentHash("dosvqwhbmdgbbjf"), - new NginxConfigurationProtectedFileRequest().withContent("gmbmbexppbh") - .withVirtualPath("qrolfpf") - .withContentHash("algbquxigjyjg"), - new NginxConfigurationProtectedFileRequest().withContent("aoyfhrtxilnerkuj") - .withVirtualPath("vlejuvfqa") - .withContentHash("lyxwjkcprbnwbx"), - new NginxConfigurationProtectedFileRequest().withContent("vtb") - .withVirtualPath("ysszdnrujqguh") - .withContentHash("ouqfprwz"))) - .withPackageProperty( - new NginxConfigurationPackage().withData("g").withProtectedFiles(Arrays.asList("nwui"))) - .withRootFile("a"); + .withFiles( + Arrays.asList(new NginxConfigurationFile().withContent("medjvcslynqwwncw").withVirtualPath("hxg"), + new NginxConfigurationFile().withContent("rmgucnap").withVirtualPath("eoellwptfdygp"))) + .withProtectedFiles(Arrays.asList(new NginxConfigurationProtectedFileRequest().withContent("ac") + .withVirtualPath("pzfqrhhuaoppp") + .withContentHash("eqx"))) + .withPackageProperty(new NginxConfigurationPackage().withData("dahzxctobg") + .withProtectedFiles(Arrays.asList("moizpos", "mgrcfbu", "rmfqjhhkxbpvj"))) + .withRootFile("jhxxjyn"); model = BinaryData.fromObject(model).toObject(NginxConfigurationRequestProperties.class); - Assertions.assertEquals("modmglougpb", model.files().get(0).content()); - Assertions.assertEquals("tmut", model.files().get(0).virtualPath()); - Assertions.assertEquals("ta", model.protectedFiles().get(0).content()); - Assertions.assertEquals("pwgcuertu", model.protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("dosvqwhbmdgbbjf", model.protectedFiles().get(0).contentHash()); - Assertions.assertEquals("g", model.packageProperty().data()); - Assertions.assertEquals("nwui", model.packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("a", model.rootFile()); + Assertions.assertEquals("medjvcslynqwwncw", model.files().get(0).content()); + Assertions.assertEquals("hxg", model.files().get(0).virtualPath()); + Assertions.assertEquals("ac", model.protectedFiles().get(0).content()); + Assertions.assertEquals("pzfqrhhuaoppp", model.protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("eqx", model.protectedFiles().get(0).contentHash()); + Assertions.assertEquals("dahzxctobg", model.packageProperty().data()); + Assertions.assertEquals("moizpos", model.packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("jhxxjyn", model.rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestTests.java index 2f382de48f57..33a801f94fc4 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -17,44 +17,39 @@ public final class NginxConfigurationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationRequest model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"files\":[{\"content\":\"njbiksqrglssain\",\"virtualPath\":\"jwnzlljfmp\"},{\"content\":\"ebvmgxsabkyqd\",\"virtualPath\":\"jitcjczdzevn\"},{\"content\":\"krwpdap\",\"virtualPath\":\"sbdkvwr\"}],\"protectedFiles\":[{\"content\":\"usnhutje\",\"virtualPath\":\"mrldhu\",\"contentHash\":\"zzd\"},{\"content\":\"qxhocdgeablgphut\",\"virtualPath\":\"ndv\",\"contentHash\":\"ozwyiftyhxhuro\"}],\"package\":{\"data\":\"yxolniwp\",\"protectedFiles\":[\"kjfkg\",\"awxklr\",\"plwckbas\",\"ypnddhsgcb\"]},\"rootFile\":\"phejkotynqgoulz\"},\"id\":\"likwyqkgfgib\",\"name\":\"adgakeqsrxybz\",\"type\":\"qedqytbciqfoufl\"}") + "{\"id\":\"ilpjzuaejxdult\",\"name\":\"zbbtdzumveek\",\"type\":\"wozuhkf\",\"properties\":{\"provisioningState\":\"Deleted\",\"files\":[{\"content\":\"dxluu\",\"virtualPath\":\"ttouwaboekqvkel\"}],\"protectedFiles\":[{\"content\":\"bxwyjsflhhcaa\",\"virtualPath\":\"jixisxyawjoyaqcs\",\"contentHash\":\"jpkiidzyexznelix\"}],\"package\":{\"data\":\"ztfolhbnxk\",\"protectedFiles\":[\"aulppggd\",\"pnapnyiropuh\"]},\"rootFile\":\"gvpgy\"}}") .toObject(NginxConfigurationRequest.class); - Assertions.assertEquals("njbiksqrglssain", model.properties().files().get(0).content()); - Assertions.assertEquals("jwnzlljfmp", model.properties().files().get(0).virtualPath()); - Assertions.assertEquals("usnhutje", model.properties().protectedFiles().get(0).content()); - Assertions.assertEquals("mrldhu", model.properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("zzd", model.properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("yxolniwp", model.properties().packageProperty().data()); - Assertions.assertEquals("kjfkg", model.properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("phejkotynqgoulz", model.properties().rootFile()); + Assertions.assertEquals("dxluu", model.properties().files().get(0).content()); + Assertions.assertEquals("ttouwaboekqvkel", model.properties().files().get(0).virtualPath()); + Assertions.assertEquals("bxwyjsflhhcaa", model.properties().protectedFiles().get(0).content()); + Assertions.assertEquals("jixisxyawjoyaqcs", model.properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("jpkiidzyexznelix", model.properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("ztfolhbnxk", model.properties().packageProperty().data()); + Assertions.assertEquals("aulppggd", model.properties().packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("gvpgy", model.properties().rootFile()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxConfigurationRequest model = new NginxConfigurationRequest().withProperties(new NginxConfigurationRequestProperties() - .withFiles(Arrays.asList( - new NginxConfigurationFile().withContent("njbiksqrglssain").withVirtualPath("jwnzlljfmp"), - new NginxConfigurationFile().withContent("ebvmgxsabkyqd").withVirtualPath("jitcjczdzevn"), - new NginxConfigurationFile().withContent("krwpdap").withVirtualPath("sbdkvwr"))) - .withProtectedFiles(Arrays.asList( - new NginxConfigurationProtectedFileRequest().withContent("usnhutje") - .withVirtualPath("mrldhu") - .withContentHash("zzd"), - new NginxConfigurationProtectedFileRequest().withContent("qxhocdgeablgphut") - .withVirtualPath("ndv") - .withContentHash("ozwyiftyhxhuro"))) - .withPackageProperty(new NginxConfigurationPackage().withData("yxolniwp") - .withProtectedFiles(Arrays.asList("kjfkg", "awxklr", "plwckbas", "ypnddhsgcb"))) - .withRootFile("phejkotynqgoulz")); + .withFiles( + Arrays.asList(new NginxConfigurationFile().withContent("dxluu").withVirtualPath("ttouwaboekqvkel"))) + .withProtectedFiles( + Arrays.asList(new NginxConfigurationProtectedFileRequest().withContent("bxwyjsflhhcaa") + .withVirtualPath("jixisxyawjoyaqcs") + .withContentHash("jpkiidzyexznelix"))) + .withPackageProperty(new NginxConfigurationPackage().withData("ztfolhbnxk") + .withProtectedFiles(Arrays.asList("aulppggd", "pnapnyiropuh"))) + .withRootFile("gvpgy")); model = BinaryData.fromObject(model).toObject(NginxConfigurationRequest.class); - Assertions.assertEquals("njbiksqrglssain", model.properties().files().get(0).content()); - Assertions.assertEquals("jwnzlljfmp", model.properties().files().get(0).virtualPath()); - Assertions.assertEquals("usnhutje", model.properties().protectedFiles().get(0).content()); - Assertions.assertEquals("mrldhu", model.properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("zzd", model.properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("yxolniwp", model.properties().packageProperty().data()); - Assertions.assertEquals("kjfkg", model.properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("phejkotynqgoulz", model.properties().rootFile()); + Assertions.assertEquals("dxluu", model.properties().files().get(0).content()); + Assertions.assertEquals("ttouwaboekqvkel", model.properties().files().get(0).virtualPath()); + Assertions.assertEquals("bxwyjsflhhcaa", model.properties().protectedFiles().get(0).content()); + Assertions.assertEquals("jixisxyawjoyaqcs", model.properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("jpkiidzyexznelix", model.properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("ztfolhbnxk", model.properties().packageProperty().data()); + Assertions.assertEquals("aulppggd", model.properties().packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("gvpgy", model.properties().rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponseInnerTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponseInnerTests.java index 2b0c530e18c7..94e47aee92c1 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponseInnerTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponseInnerTests.java @@ -1,57 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationResponseInner; -import com.azure.resourcemanager.nginx.models.NginxConfigurationFile; -import com.azure.resourcemanager.nginx.models.NginxConfigurationPackage; -import com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileResponse; -import com.azure.resourcemanager.nginx.models.NginxConfigurationResponseProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NginxConfigurationResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationResponseInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"files\":[{\"content\":\"nufhf\",\"virtualPath\":\"jysagith\"},{\"content\":\"hab\",\"virtualPath\":\"pikxwczbyscnpqxu\"},{\"content\":\"vyq\",\"virtualPath\":\"wby\"},{\"content\":\"k\",\"virtualPath\":\"dumjgrtfwvuk\"}],\"protectedFiles\":[{\"virtualPath\":\"dcc\",\"contentHash\":\"h\"},{\"virtualPath\":\"cnyejhkryhtnapcz\",\"contentHash\":\"okjye\"},{\"virtualPath\":\"kvnipjoxz\",\"contentHash\":\"chgejspodm\"}],\"package\":{\"data\":\"zyde\",\"protectedFiles\":[\"wyahuxinpmqnja\",\"wixjsprozvcp\",\"tegjvwmf\",\"atscmd\"]},\"rootFile\":\"jhulsuuvmkjo\"},\"id\":\"rwfndiod\",\"name\":\"pslwejdpvw\",\"type\":\"yoqpsoaccta\"}") + "{\"properties\":{\"provisioningState\":\"Accepted\",\"files\":[{\"content\":\"duala\",\"virtualPath\":\"qpv\"},{\"content\":\"dmwsrcrgvxpvgomz\",\"virtualPath\":\"misgwbnb\"}],\"protectedFiles\":[{\"virtualPath\":\"awkz\",\"contentHash\":\"liourqhak\"},{\"virtualPath\":\"hashsfwxosow\",\"contentHash\":\"cugicjoox\"},{\"virtualPath\":\"ebwpucwwfvo\",\"contentHash\":\"vmeueci\"},{\"virtualPath\":\"hzceuojgjrwjue\",\"contentHash\":\"twm\"}],\"package\":{\"data\":\"tdx\",\"protectedFiles\":[\"xnrj\",\"wgqwgxhn\"]},\"rootFile\":\"kxfbkpycgklwndn\"},\"id\":\"dauwhvylwzbtd\",\"name\":\"xujznbmpowu\",\"type\":\"przqlveu\"}") .toObject(NginxConfigurationResponseInner.class); - Assertions.assertEquals("nufhf", model.properties().files().get(0).content()); - Assertions.assertEquals("jysagith", model.properties().files().get(0).virtualPath()); - Assertions.assertEquals("dcc", model.properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("h", model.properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("zyde", model.properties().packageProperty().data()); - Assertions.assertEquals("wyahuxinpmqnja", model.properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("jhulsuuvmkjo", model.properties().rootFile()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxConfigurationResponseInner model - = new NginxConfigurationResponseInner().withProperties(new NginxConfigurationResponseProperties() - .withFiles(Arrays.asList(new NginxConfigurationFile().withContent("nufhf").withVirtualPath("jysagith"), - new NginxConfigurationFile().withContent("hab").withVirtualPath("pikxwczbyscnpqxu"), - new NginxConfigurationFile().withContent("vyq").withVirtualPath("wby"), - new NginxConfigurationFile().withContent("k").withVirtualPath("dumjgrtfwvuk"))) - .withProtectedFiles(Arrays.asList( - new NginxConfigurationProtectedFileResponse().withVirtualPath("dcc").withContentHash("h"), - new NginxConfigurationProtectedFileResponse().withVirtualPath("cnyejhkryhtnapcz") - .withContentHash("okjye"), - new NginxConfigurationProtectedFileResponse().withVirtualPath("kvnipjoxz") - .withContentHash("chgejspodm"))) - .withPackageProperty(new NginxConfigurationPackage().withData("zyde") - .withProtectedFiles(Arrays.asList("wyahuxinpmqnja", "wixjsprozvcp", "tegjvwmf", "atscmd"))) - .withRootFile("jhulsuuvmkjo")); - model = BinaryData.fromObject(model).toObject(NginxConfigurationResponseInner.class); - Assertions.assertEquals("nufhf", model.properties().files().get(0).content()); - Assertions.assertEquals("jysagith", model.properties().files().get(0).virtualPath()); - Assertions.assertEquals("dcc", model.properties().protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("h", model.properties().protectedFiles().get(0).contentHash()); - Assertions.assertEquals("zyde", model.properties().packageProperty().data()); - Assertions.assertEquals("wyahuxinpmqnja", model.properties().packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("jhulsuuvmkjo", model.properties().rootFile()); + Assertions.assertEquals("duala", model.properties().files().get(0).content()); + Assertions.assertEquals("qpv", model.properties().files().get(0).virtualPath()); + Assertions.assertEquals("awkz", model.properties().protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("liourqhak", model.properties().protectedFiles().get(0).contentHash()); + Assertions.assertEquals("tdx", model.properties().packageProperty().data()); + Assertions.assertEquals("xnrj", model.properties().packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("kxfbkpycgklwndn", model.properties().rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponsePropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponsePropertiesTests.java index ec8ab28cefb1..1d449c71dce5 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponsePropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxConfigurationResponsePropertiesTests.java @@ -1,53 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.nginx.models.NginxConfigurationFile; -import com.azure.resourcemanager.nginx.models.NginxConfigurationPackage; -import com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileResponse; import com.azure.resourcemanager.nginx.models.NginxConfigurationResponseProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NginxConfigurationResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxConfigurationResponseProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"files\":[{\"content\":\"ahbc\",\"virtualPath\":\"ffdfdosygexpa\"}],\"protectedFiles\":[{\"virtualPath\":\"hmsbzjhcrzevdp\",\"contentHash\":\"xaolth\"},{\"virtualPath\":\"rgqjbpfzfsinzg\",\"contentHash\":\"cjrwzoxxjtfellu\"},{\"virtualPath\":\"zitonpeqfpjkjl\",\"contentHash\":\"fpdvhpfxxypi\"}],\"package\":{\"data\":\"mayhuybbkpodepoo\",\"protectedFiles\":[\"uvamiheognarxzxt\",\"eotusivyevc\",\"iqihn\"]},\"rootFile\":\"ngbwjz\"}") + "{\"provisioningState\":\"Creating\",\"files\":[{\"content\":\"khfxobbcswsrt\",\"virtualPath\":\"iplrbpbewtghfgb\"}],\"protectedFiles\":[{\"virtualPath\":\"xzvlvqhjkbegib\",\"contentHash\":\"mxiebw\"}],\"package\":{\"data\":\"oayqc\",\"protectedFiles\":[\"tzjuzgwyzmhtxo\",\"gmtsavjcbpwxqpsr\"]},\"rootFile\":\"ftguv\"}") .toObject(NginxConfigurationResponseProperties.class); - Assertions.assertEquals("ahbc", model.files().get(0).content()); - Assertions.assertEquals("ffdfdosygexpa", model.files().get(0).virtualPath()); - Assertions.assertEquals("hmsbzjhcrzevdp", model.protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("xaolth", model.protectedFiles().get(0).contentHash()); - Assertions.assertEquals("mayhuybbkpodepoo", model.packageProperty().data()); - Assertions.assertEquals("uvamiheognarxzxt", model.packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("ngbwjz", model.rootFile()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxConfigurationResponseProperties model = new NginxConfigurationResponseProperties() - .withFiles(Arrays.asList(new NginxConfigurationFile().withContent("ahbc").withVirtualPath("ffdfdosygexpa"))) - .withProtectedFiles(Arrays.asList( - new NginxConfigurationProtectedFileResponse().withVirtualPath("hmsbzjhcrzevdp") - .withContentHash("xaolth"), - new NginxConfigurationProtectedFileResponse().withVirtualPath("rgqjbpfzfsinzg") - .withContentHash("cjrwzoxxjtfellu"), - new NginxConfigurationProtectedFileResponse().withVirtualPath("zitonpeqfpjkjl") - .withContentHash("fpdvhpfxxypi"))) - .withPackageProperty(new NginxConfigurationPackage().withData("mayhuybbkpodepoo") - .withProtectedFiles(Arrays.asList("uvamiheognarxzxt", "eotusivyevc", "iqihn"))) - .withRootFile("ngbwjz"); - model = BinaryData.fromObject(model).toObject(NginxConfigurationResponseProperties.class); - Assertions.assertEquals("ahbc", model.files().get(0).content()); - Assertions.assertEquals("ffdfdosygexpa", model.files().get(0).virtualPath()); - Assertions.assertEquals("hmsbzjhcrzevdp", model.protectedFiles().get(0).virtualPath()); - Assertions.assertEquals("xaolth", model.protectedFiles().get(0).contentHash()); - Assertions.assertEquals("mayhuybbkpodepoo", model.packageProperty().data()); - Assertions.assertEquals("uvamiheognarxzxt", model.packageProperty().protectedFiles().get(0)); - Assertions.assertEquals("ngbwjz", model.rootFile()); + Assertions.assertEquals("khfxobbcswsrt", model.files().get(0).content()); + Assertions.assertEquals("iplrbpbewtghfgb", model.files().get(0).virtualPath()); + Assertions.assertEquals("xzvlvqhjkbegib", model.protectedFiles().get(0).virtualPath()); + Assertions.assertEquals("mxiebw", model.protectedFiles().get(0).contentHash()); + Assertions.assertEquals("oayqc", model.packageProperty().data()); + Assertions.assertEquals("tzjuzgwyzmhtxo", model.packageProperty().protectedFiles().get(0)); + Assertions.assertEquals("ftguv", model.rootFile()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyListResponseTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyListResponseTests.java index 554ad449374b..4f68919b48df 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyListResponseTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyListResponseTests.java @@ -1,39 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner; -import com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyListResponse; -import com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyResponseProperties; +import com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentApiKeyListResponse; import java.time.OffsetDateTime; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class NginxDeploymentApiKeyListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentApiKeyListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"hint\":\"bqsoqijg\",\"endDateTime\":\"2021-10-01T09:23:29Z\"},\"id\":\"bpazlobcufpdzn\",\"name\":\"btcqq\",\"type\":\"nq\"},{\"properties\":{\"hint\":\"qgn\",\"endDateTime\":\"2021-06-16T07:30:55Z\"},\"id\":\"oo\",\"name\":\"ywifsqesaag\",\"type\":\"f\"}],\"nextLink\":\"lzl\"}") + "{\"value\":[{\"properties\":{\"hint\":\"htnapczwlokjyem\",\"endDateTime\":\"2021-01-17T01:20:32Z\"},\"id\":\"ipjoxzjnchgejs\",\"name\":\"odmailzyd\",\"type\":\"h\"},{\"properties\":{\"hint\":\"yahux\",\"endDateTime\":\"2021-07-08T12:15:19Z\"},\"id\":\"qnjaqwix\",\"name\":\"sprozvcput\",\"type\":\"gjvw\"},{\"properties\":{\"hint\":\"atscmd\",\"endDateTime\":\"2021-07-15T17:27:17Z\"},\"id\":\"u\",\"name\":\"suuv\",\"type\":\"kjozkrwfnd\"},{\"properties\":{\"hint\":\"jpslwejd\",\"endDateTime\":\"2021-02-19T06:09:33Z\"},\"id\":\"yoqpsoaccta\",\"name\":\"akl\",\"type\":\"lahbcryff\"}],\"nextLink\":\"dosyg\"}") .toObject(NginxDeploymentApiKeyListResponse.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T09:23:29Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-01-17T01:20:32Z"), model.value().get(0).properties().endDateTime()); - Assertions.assertEquals("lzl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxDeploymentApiKeyListResponse model = new NginxDeploymentApiKeyListResponse().withValue(Arrays.asList( - new NginxDeploymentApiKeyResponseInner().withProperties(new NginxDeploymentApiKeyResponseProperties() - .withEndDateTime(OffsetDateTime.parse("2021-10-01T09:23:29Z"))), - new NginxDeploymentApiKeyResponseInner().withProperties(new NginxDeploymentApiKeyResponseProperties() - .withEndDateTime(OffsetDateTime.parse("2021-06-16T07:30:55Z"))))) - .withNextLink("lzl"); - model = BinaryData.fromObject(model).toObject(NginxDeploymentApiKeyListResponse.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-01T09:23:29Z"), - model.value().get(0).properties().endDateTime()); - Assertions.assertEquals("lzl", model.nextLink()); + Assertions.assertEquals("dosyg", model.nextLink()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponseInnerTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponseInnerTests.java index 8499e7b64a47..e0622c3fdd32 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponseInnerTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponseInnerTests.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner; -import com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyResponseProperties; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -14,17 +13,8 @@ public final class NginxDeploymentApiKeyResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentApiKeyResponseInner model = BinaryData.fromString( - "{\"properties\":{\"hint\":\"bsphrupidgsybbe\",\"endDateTime\":\"2021-02-20T13:53:07Z\"},\"id\":\"hoycm\",\"name\":\"xaobhdxbmtqioqjz\",\"type\":\"htbmuf\"}") + "{\"properties\":{\"hint\":\"jbpzvgnwzsymg\",\"endDateTime\":\"2021-05-13T12:55:49Z\"},\"id\":\"cyzkohdbihanuf\",\"name\":\"fcbjysagithxqha\",\"type\":\"ifpikxwczby\"}") .toObject(NginxDeploymentApiKeyResponseInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T13:53:07Z"), model.properties().endDateTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxDeploymentApiKeyResponseInner model - = new NginxDeploymentApiKeyResponseInner().withProperties(new NginxDeploymentApiKeyResponseProperties() - .withEndDateTime(OffsetDateTime.parse("2021-02-20T13:53:07Z"))); - model = BinaryData.fromObject(model).toObject(NginxDeploymentApiKeyResponseInner.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T13:53:07Z"), model.properties().endDateTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-13T12:55:49Z"), model.properties().endDateTime()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponsePropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponsePropertiesTests.java index 05df99ae758e..b412e89a7f22 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponsePropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentApiKeyResponsePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -13,16 +13,8 @@ public final class NginxDeploymentApiKeyResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentApiKeyResponseProperties model - = BinaryData.fromString("{\"hint\":\"wnoi\",\"endDateTime\":\"2021-08-05T07:19:53Z\"}") + = BinaryData.fromString("{\"hint\":\"npqxuh\",\"endDateTime\":\"2021-07-26T12:53:27Z\"}") .toObject(NginxDeploymentApiKeyResponseProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T07:19:53Z"), model.endDateTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxDeploymentApiKeyResponseProperties model = new NginxDeploymentApiKeyResponseProperties() - .withEndDateTime(OffsetDateTime.parse("2021-08-05T07:19:53Z")); - model = BinaryData.fromObject(model).toObject(NginxDeploymentApiKeyResponseProperties.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-05T07:19:53Z"), model.endDateTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T12:53:27Z"), model.endDateTime()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyListResponseInnerTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyListResponseInnerTests.java new file mode 100644 index 000000000000..b3af8467b759 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyListResponseInnerTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class NginxDeploymentDefaultWafPolicyListResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NginxDeploymentDefaultWafPolicyListResponseInner model = BinaryData.fromString( + "{\"value\":[{\"filepath\":\"oyrxvwfudwpzntxh\"},{\"filepath\":\"lrqjbhckfr\"}],\"nextLink\":\"rxsbkyvp\"}") + .toObject(NginxDeploymentDefaultWafPolicyListResponseInner.class); + Assertions.assertEquals("rxsbkyvp", model.nextLink()); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyPropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyPropertiesTests.java new file mode 100644 index 000000000000..b0e4eeca4f2f --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentDefaultWafPolicyPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyProperties; + +public final class NginxDeploymentDefaultWafPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NginxDeploymentDefaultWafPolicyProperties model + = BinaryData.fromString("{\"filepath\":\"n\"}").toObject(NginxDeploymentDefaultWafPolicyProperties.class); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentInnerTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentInnerTests.java index 5dbb1427da62..17a69a713192 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentInnerTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -36,14 +36,13 @@ public final class NginxDeploymentInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"sonpclhocohs\",\"tenantId\":\"ev\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"shxmzsbbzoggigrx\":{\"principalId\":\"buhfmvfaxkffeiit\",\"clientId\":\"vmezy\"},\"enkouknvudw\":{\"principalId\":\"ur\",\"clientId\":\"xxjnspydptk\"}}},\"properties\":{\"provisioningState\":\"Canceled\",\"nginxVersion\":\"ldngkpoci\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"egukgjnpiucg\"},{\"id\":\"evqzntypmrbp\"},{\"id\":\"c\"},{\"id\":\"qjsdpydnfyhxdeo\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"cwif\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"gzfbishcbk\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"deyeamdphagalpbu\"}},\"ipAddress\":\"gipwhonowkg\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"ixzbinjeputtmryw\",\"containerName\":\"zoqftiyqzrnkcqvy\"}},\"scalingProperties\":{\"capacity\":1062459417,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"sicohoqqnwvlry\",\"capacity\":{\"min\":1416786049,\"max\":240696862}},{\"name\":\"hheunmmqhgyx\",\"capacity\":{\"min\":1391467998,\"max\":1953555312}},{\"name\":\"noc\",\"capacity\":{\"min\":1493031892,\"max\":820959200}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"lyaxuc\"},\"userProfile\":{\"preferredEmail\":\"qszf\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"wrmjmwvvjektc\",\"revisionDatetime\":\"2021-03-20T12:50:25Z\"},\"botSignaturesPackage\":{\"version\":\"nhwlrsffrzpwvl\",\"revisionDatetime\":\"2021-01-03T19:26:04Z\"},\"threatCampaignsPackage\":{\"version\":\"gbiqylihkaet\",\"revisionDatetime\":\"2021-03-28T05:06:34Z\"},\"componentVersions\":{\"wafEngineVersion\":\"vfcivfsnkymuc\",\"wafNginxVersion\":\"qhjfbebr\"}}},\"dataplaneApiEndpoint\":\"xerf\"},\"sku\":{\"name\":\"utttxfvjrbirp\"},\"location\":\"epcyvahfnlj\",\"tags\":{\"ljyoxgvcltb\":\"xjvuujqgidokg\"},\"id\":\"sncghkjeszz\",\"name\":\"bijhtxfvgxbf\",\"type\":\"mxnehmp\"}") + "{\"properties\":{\"provisioningState\":\"Updating\",\"nginxVersion\":\"jakhmsbzjh\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"phlxa\"},{\"id\":\"thqt\"},{\"id\":\"qjbpfzfsin\"},{\"id\":\"v\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"wzo\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"felluwfzitonpe\"},{\"privateIPAddress\":\"pjkjlxofpdv\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"xypininmayhuybbk\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"epoo\"}},\"ipAddress\":\"nuvamiheogna\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"eotusivyevc\",\"containerName\":\"qi\"}},\"scalingProperties\":{\"capacity\":422843266,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"bwjzr\",\"capacity\":{\"min\":1668036347,\"max\":1055539147}},{\"name\":\"gxg\",\"capacity\":{\"min\":149639561,\"max\":2093374464}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"mvtzfkufub\"},\"userProfile\":{\"preferredEmail\":\"fxqeof\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"qjbasvms\",\"attackSignaturesPackage\":{\"version\":\"qulngsntnbybkzgc\",\"revisionDatetime\":\"2021-06-16T21:35:22Z\"},\"botSignaturesPackage\":{\"version\":\"clxxwrljdo\",\"revisionDatetime\":\"2021-05-06T12:45Z\"},\"threatCampaignsPackage\":{\"version\":\"cqvkocrcjdkwtn\",\"revisionDatetime\":\"2021-04-07T16:39:29Z\"},\"componentVersions\":{\"wafEngineVersion\":\"njbiksqrglssain\",\"wafNginxVersion\":\"p\"}}},\"dataplaneApiEndpoint\":\"nzl\"},\"identity\":{\"principalId\":\"mppeebvmgxs\",\"tenantId\":\"kyqduujit\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"rwjfe\":{\"principalId\":\"evndh\",\"clientId\":\"wpdappdsbdkv\"},\"phut\":{\"principalId\":\"nhutjeltmrldhugj\",\"clientId\":\"datqxhocdgeabl\"},\"ftyxolniw\":{\"principalId\":\"ndv\",\"clientId\":\"ozwyiftyhxhuro\"}}},\"sku\":{\"name\":\"cukjf\"},\"location\":\"iawxklry\",\"tags\":{\"sgcbac\":\"ckbasyypndd\",\"zndlikwy\":\"hejkotynqgou\",\"bmadgak\":\"kgfg\"},\"id\":\"qsrxybzqqed\",\"name\":\"ytb\",\"type\":\"iqfouflmmnkz\"}") .toObject(NginxDeploymentInner.class); - Assertions.assertEquals("epcyvahfnlj", model.location()); - Assertions.assertEquals("xjvuujqgidokg", model.tags().get("ljyoxgvcltb")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("egukgjnpiucg", + Assertions.assertEquals("iawxklry", model.location()); + Assertions.assertEquals("ckbasyypndd", model.tags().get("sgcbac")); + Assertions.assertEquals("phlxa", model.properties().networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("cwif", + Assertions.assertEquals("wzo", model.properties() .networkProfile() .frontEndIpConfiguration() @@ -57,66 +56,76 @@ public void testDeserialize() throws Exception { .privateIpAddresses() .get(0) .privateIpAllocationMethod()); - Assertions.assertEquals("gzfbishcbk", + Assertions.assertEquals("felluwfzitonpe", model.properties().networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("deyeamdphagalpbu", - model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(true, model.properties().enableDiagnosticsSupport()); - Assertions.assertEquals("ixzbinjeputtmryw", model.properties().logging().storageAccount().accountName()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.properties().logging().storageAccount().containerName()); - Assertions.assertEquals(1062459417, model.properties().scalingProperties().capacity()); - Assertions.assertEquals("sicohoqqnwvlry", model.properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1416786049, model.properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(240696862, model.properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("lyaxuc", model.properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("qszf", model.properties().userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("epoo", model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertTrue(model.properties().enableDiagnosticsSupport()); + Assertions.assertEquals("eotusivyevc", model.properties().logging().storageAccount().accountName()); + Assertions.assertEquals("qi", model.properties().logging().storageAccount().containerName()); + Assertions.assertEquals(422843266, model.properties().scalingProperties().capacity()); + Assertions.assertEquals("bwjzr", model.properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1668036347, model.properties().scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(1055539147, model.properties().scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("mvtzfkufub", model.properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("fxqeof", model.properties().userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.ENABLED, model.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); - Assertions.assertEquals("utttxfvjrbirp", model.sku().name()); + Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("cukjf", model.sku().name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxDeploymentInner model = new NginxDeploymentInner().withLocation("epcyvahfnlj") - .withTags(mapOf("ljyoxgvcltb", "xjvuujqgidokg")) - .withIdentity(new IdentityProperties().withType(IdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("shxmzsbbzoggigrx", new UserIdentityProperties(), "enkouknvudw", - new UserIdentityProperties()))) - .withProperties(new NginxDeploymentProperties() - .withNetworkProfile(new NginxNetworkProfile() - .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("egukgjnpiucg"), - new NginxPublicIpAddress().withId("evqzntypmrbp"), new NginxPublicIpAddress().withId("c"), - new NginxPublicIpAddress().withId("qjsdpydnfyhxdeo"))) - .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress().withPrivateIpAddress("cwif") - .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) - .withSubnetId("gzfbishcbk")))) - .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("deyeamdphagalpbu"))) - .withEnableDiagnosticsSupport(true) - .withLogging( - new NginxLogging().withStorageAccount(new NginxStorageAccount().withAccountName("ixzbinjeputtmryw") - .withContainerName("zoqftiyqzrnkcqvy"))) - .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(1062459417) - .withProfiles(Arrays.asList( - new ScaleProfile().withName("sicohoqqnwvlry") - .withCapacity(new ScaleProfileCapacity().withMin(1416786049).withMax(240696862)), - new ScaleProfile().withName("hheunmmqhgyx") - .withCapacity(new ScaleProfileCapacity().withMin(1391467998).withMax(1953555312)), - new ScaleProfile().withName("noc") - .withCapacity(new ScaleProfileCapacity().withMin(1493031892).withMax(820959200))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("lyaxuc")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("qszf")) - .withNginxAppProtect(new NginxDeploymentPropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED)))) - .withSku(new ResourceSku().withName("utttxfvjrbirp")); + NginxDeploymentInner model + = new NginxDeploymentInner().withLocation("iawxklry") + .withTags(mapOf("sgcbac", "ckbasyypndd", "zndlikwy", "hejkotynqgou", "bmadgak", "kgfg")) + .withProperties( + new NginxDeploymentProperties() + .withNetworkProfile( + new NginxNetworkProfile() + .withFrontEndIpConfiguration( + new NginxFrontendIpConfiguration() + .withPublicIpAddresses( + Arrays.asList(new NginxPublicIpAddress().withId("phlxa"), + new NginxPublicIpAddress().withId("thqt"), + new NginxPublicIpAddress().withId("qjbpfzfsin"), + new NginxPublicIpAddress().withId("v"))) + .withPrivateIpAddresses( + Arrays.asList( + new NginxPrivateIpAddress().withPrivateIpAddress("wzo") + .withPrivateIpAllocationMethod( + NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("felluwfzitonpe"), + new NginxPrivateIpAddress().withPrivateIpAddress("pjkjlxofpdv") + .withPrivateIpAllocationMethod( + NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("xypininmayhuybbk")))) + .withNetworkInterfaceConfiguration( + new NginxNetworkInterfaceConfiguration().withSubnetId("epoo"))) + .withEnableDiagnosticsSupport(true) + .withLogging(new NginxLogging().withStorageAccount( + new NginxStorageAccount().withAccountName("eotusivyevc").withContainerName("qi"))) + .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(422843266) + .withProfiles(Arrays.asList( + new ScaleProfile().withName("bwjzr") + .withCapacity(new ScaleProfileCapacity().withMin(1668036347).withMax(1055539147)), + new ScaleProfile().withName("gxg") + .withCapacity(new ScaleProfileCapacity().withMin(149639561).withMax(2093374464))))) + .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("mvtzfkufub")) + .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("fxqeof")) + .withNginxAppProtect( + new NginxDeploymentPropertiesNginxAppProtect().withWebApplicationFirewallSettings( + new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED)))) + .withIdentity(new IdentityProperties().withType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("rwjfe", new UserIdentityProperties(), "phut", + new UserIdentityProperties(), "ftyxolniw", new UserIdentityProperties()))) + .withSku(new ResourceSku().withName("cukjf")); model = BinaryData.fromObject(model).toObject(NginxDeploymentInner.class); - Assertions.assertEquals("epcyvahfnlj", model.location()); - Assertions.assertEquals("xjvuujqgidokg", model.tags().get("ljyoxgvcltb")); - Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("egukgjnpiucg", + Assertions.assertEquals("iawxklry", model.location()); + Assertions.assertEquals("ckbasyypndd", model.tags().get("sgcbac")); + Assertions.assertEquals("phlxa", model.properties().networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("cwif", + Assertions.assertEquals("wzo", model.properties() .networkProfile() .frontEndIpConfiguration() @@ -130,22 +139,22 @@ public void testSerialize() throws Exception { .privateIpAddresses() .get(0) .privateIpAllocationMethod()); - Assertions.assertEquals("gzfbishcbk", + Assertions.assertEquals("felluwfzitonpe", model.properties().networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("deyeamdphagalpbu", - model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(true, model.properties().enableDiagnosticsSupport()); - Assertions.assertEquals("ixzbinjeputtmryw", model.properties().logging().storageAccount().accountName()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.properties().logging().storageAccount().containerName()); - Assertions.assertEquals(1062459417, model.properties().scalingProperties().capacity()); - Assertions.assertEquals("sicohoqqnwvlry", model.properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1416786049, model.properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(240696862, model.properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("lyaxuc", model.properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("qszf", model.properties().userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("epoo", model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertTrue(model.properties().enableDiagnosticsSupport()); + Assertions.assertEquals("eotusivyevc", model.properties().logging().storageAccount().accountName()); + Assertions.assertEquals("qi", model.properties().logging().storageAccount().containerName()); + Assertions.assertEquals(422843266, model.properties().scalingProperties().capacity()); + Assertions.assertEquals("bwjzr", model.properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1668036347, model.properties().scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(1055539147, model.properties().scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("mvtzfkufub", model.properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("fxqeof", model.properties().userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.ENABLED, model.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); - Assertions.assertEquals("utttxfvjrbirp", model.sku().name()); + Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("cukjf", model.sku().name()); } // Use "Map.of" if available diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentListResponseTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentListResponseTests.java index d3189705d238..c30d53d7f876 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentListResponseTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentListResponseTests.java @@ -1,260 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner; +import com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentListResponse; import com.azure.resourcemanager.nginx.models.ActivationState; -import com.azure.resourcemanager.nginx.models.AutoUpgradeProfile; -import com.azure.resourcemanager.nginx.models.IdentityProperties; import com.azure.resourcemanager.nginx.models.IdentityType; -import com.azure.resourcemanager.nginx.models.NginxDeploymentListResponse; -import com.azure.resourcemanager.nginx.models.NginxDeploymentProperties; -import com.azure.resourcemanager.nginx.models.NginxDeploymentPropertiesNginxAppProtect; -import com.azure.resourcemanager.nginx.models.NginxDeploymentScalingProperties; -import com.azure.resourcemanager.nginx.models.NginxDeploymentUserProfile; -import com.azure.resourcemanager.nginx.models.NginxFrontendIpConfiguration; -import com.azure.resourcemanager.nginx.models.NginxLogging; -import com.azure.resourcemanager.nginx.models.NginxNetworkInterfaceConfiguration; -import com.azure.resourcemanager.nginx.models.NginxNetworkProfile; -import com.azure.resourcemanager.nginx.models.NginxPrivateIpAddress; -import com.azure.resourcemanager.nginx.models.NginxPublicIpAddress; -import com.azure.resourcemanager.nginx.models.NginxStorageAccount; -import com.azure.resourcemanager.nginx.models.ResourceSku; -import com.azure.resourcemanager.nginx.models.ScaleProfile; -import com.azure.resourcemanager.nginx.models.ScaleProfileCapacity; -import com.azure.resourcemanager.nginx.models.UserIdentityProperties; -import com.azure.resourcemanager.nginx.models.WebApplicationFirewallSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class NginxDeploymentListResponseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentListResponse model = BinaryData.fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"zfq\",\"tenantId\":\"huaoppp\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"rmfqjhhkxbpvj\":{\"principalId\":\"lzdahzxctobgbkdm\",\"clientId\":\"zpostmgrcfbu\"},\"wbxqzvszjfau\":{\"principalId\":\"jhxxjyn\",\"clientId\":\"divkrt\"},\"bhsfxob\":{\"principalId\":\"fdxxivetvtcqaqtd\",\"clientId\":\"mcbxvwvxysl\"}}},\"properties\":{\"provisioningState\":\"Updating\",\"nginxVersion\":\"lmpewwwfbkr\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{}],\"privateIPAddresses\":[{},{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"ohxcrsbfova\"}},\"ipAddress\":\"ruvw\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"ubcgjbirxb\",\"containerName\":\"bsrfbj\"}},\"scalingProperties\":{\"capacity\":157171235,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"otftpvjzbexilz\",\"capacity\":{\"min\":1948356330,\"max\":1551412306}},{\"name\":\"qqnvwpmq\",\"capacity\":{\"min\":1787439694,\"max\":1628769376}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"oujmkcjhwqytj\"},\"userProfile\":{\"preferredEmail\":\"n\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"rjerv\",\"revisionDatetime\":\"2021-10-08T09:31:49Z\"},\"botSignaturesPackage\":{\"version\":\"nqpeh\",\"revisionDatetime\":\"2021-05-26T12:17:52Z\"},\"threatCampaignsPackage\":{\"version\":\"oygmift\",\"revisionDatetime\":\"2021-11-26T05:12:43Z\"},\"componentVersions\":{\"wafEngineVersion\":\"d\",\"wafNginxVersion\":\"dslgnayqigynduh\"}}},\"dataplaneApiEndpoint\":\"hqlkthumaqo\"},\"sku\":{\"name\":\"gycdu\"},\"location\":\"r\",\"tags\":{\"aolps\":\"cym\",\"dnbbglzps\":\"lqlfm\",\"adbzmnvdfznud\":\"iydmcwyhzdxs\",\"xzb\":\"od\"},\"id\":\"cblylpstdbhhxsr\",\"name\":\"dzu\",\"type\":\"erscdntne\"},{\"identity\":{\"principalId\":\"wjmy\",\"tenantId\":\"dsslswt\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"hhszh\":{\"principalId\":\"fzp\",\"clientId\":\"semwabnet\"}}},\"properties\":{\"provisioningState\":\"Succeeded\",\"nginxVersion\":\"wiwubm\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{},{}],\"privateIPAddresses\":[{},{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"wwtppj\"}},\"ipAddress\":\"cxogaokonzm\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"kqze\",\"containerName\":\"kdltfzxmhhvhg\"}},\"scalingProperties\":{\"capacity\":1748485864,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"wobdagxtibqdx\",\"capacity\":{\"min\":1020209011,\"max\":709641319}},{\"name\":\"akbogqxndlkzgxh\",\"capacity\":{\"min\":975056149,\"max\":1924988063}},{\"name\":\"plbpodxun\",\"capacity\":{\"min\":1102783029,\"max\":405149242}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"xmubyyntwlrbq\"},\"userProfile\":{\"preferredEmail\":\"ievseotgqrllt\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"wzizxbmpgcjefuzm\",\"revisionDatetime\":\"2021-06-29T22:40:26Z\"},\"botSignaturesPackage\":{\"version\":\"bttdumorppxe\",\"revisionDatetime\":\"2021-08-17T23:26:57Z\"},\"threatCampaignsPackage\":{\"version\":\"zbtbhj\",\"revisionDatetime\":\"2021-08-30T17:38:27Z\"},\"componentVersions\":{\"wafEngineVersion\":\"kfgohdneue\",\"wafNginxVersion\":\"fphsdyhtozfikdow\"}}},\"dataplaneApiEndpoint\":\"uuvxz\"},\"sku\":{\"name\":\"lvithhqzonosgg\"},\"location\":\"c\",\"tags\":{\"iiswacffgdkzze\":\"wdsjnkalju\",\"pfuflrw\":\"kfvhqcrailvpn\"},\"id\":\"mh\",\"name\":\"lxyjr\",\"type\":\"sag\"},{\"identity\":{\"principalId\":\"nihgwqapnedg\",\"tenantId\":\"cvkcvqvpkeqdcv\",\"type\":\"None\",\"userAssignedIdentities\":{\"dldwmgxc\":{\"principalId\":\"dsotbobzd\",\"clientId\":\"cjwvn\"}}},\"properties\":{\"provisioningState\":\"Updating\",\"nginxVersion\":\"mutwuoe\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{}],\"privateIPAddresses\":[{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"yqsluic\"}},\"ipAddress\":\"ggkzzlvmbmpa\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"uefywsbpfvmwy\",\"containerName\":\"fouyf\"}},\"scalingProperties\":{\"capacity\":1378791233,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"wiyzvqtmnubexkp\",\"capacity\":{\"min\":1583015875,\"max\":1254452597}},{\"name\":\"mond\",\"capacity\":{\"min\":1929847054,\"max\":1007666972}},{\"name\":\"uxvypomgkopkwh\",\"capacity\":{\"min\":664596221,\"max\":10985850}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"ajqgxy\"},\"userProfile\":{\"preferredEmail\":\"cmbqfqvmk\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"vhelxprglyatdd\",\"revisionDatetime\":\"2021-09-28T08:18:40Z\"},\"botSignaturesPackage\":{\"version\":\"bcuejrjxgci\",\"revisionDatetime\":\"2021-08-15T14:27:38Z\"},\"threatCampaignsPackage\":{\"version\":\"rhos\",\"revisionDatetime\":\"2021-01-18T20:01:11Z\"},\"componentVersions\":{\"wafEngineVersion\":\"qrhzoymibmrqyib\",\"wafNginxVersion\":\"hwflu\"}}},\"dataplaneApiEndpoint\":\"dtmhrkwofyyvoqa\"},\"sku\":{\"name\":\"iexpbtgiwbwo\"},\"location\":\"washr\",\"tags\":{\"ulpiuj\":\"kcnqxwbpo\",\"obyu\":\"aasipqi\"},\"id\":\"erpqlpqwcciuqg\",\"name\":\"dbutauvfbtkuwhh\",\"type\":\"hykojoxafnndlpic\"},{\"identity\":{\"principalId\":\"ymkcdyhb\",\"tenantId\":\"kpw\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"aeneqnzarrwl\":{\"principalId\":\"vvqfovljxyws\",\"clientId\":\"syrsndsytgadgvra\"},\"iipfpubj\":{\"principalId\":\"uijfqk\",\"clientId\":\"e\"},\"ynl\":{\"principalId\":\"wwiftohqkvpuv\",\"clientId\":\"gplsaknynf\"}}},\"properties\":{\"provisioningState\":\"Updating\",\"nginxVersion\":\"pxodlqiyntorzih\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{},{},{}],\"privateIPAddresses\":[{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"mslyzrpzbchckqqz\"}},\"ipAddress\":\"ox\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"zynkedya\",\"containerName\":\"wyhqmibzyhwits\"}},\"scalingProperties\":{\"capacity\":1679951474,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"pcdpumnz\",\"capacity\":{\"min\":998287381,\"max\":944462660}},{\"name\":\"z\",\"capacity\":{\"min\":1443914942,\"max\":1417683929}},{\"name\":\"biknsorgjhxbld\",\"capacity\":{\"min\":1166597262,\"max\":706339919}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"rlkdmtncvokotl\"},\"userProfile\":{\"preferredEmail\":\"yhgsy\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"tdtbnnhadooc\",\"revisionDatetime\":\"2021-05-16T20:34:23Z\"},\"botSignaturesPackage\":{\"version\":\"cikhnv\",\"revisionDatetime\":\"2021-10-11T09:13:27Z\"},\"threatCampaignsPackage\":{\"version\":\"qgxqquezikyw\",\"revisionDatetime\":\"2021-03-04T16:24:34Z\"},\"componentVersions\":{\"wafEngineVersion\":\"kallatmel\",\"wafNginxVersion\":\"uipiccjzk\"}}},\"dataplaneApiEndpoint\":\"v\"},\"sku\":{\"name\":\"vc\"},\"location\":\"y\",\"tags\":{\"drd\":\"rnxxmueed\",\"alm\":\"stkwqqtch\",\"gdv\":\"mtdaa\"},\"id\":\"vgpiohgwxrt\",\"name\":\"udxepxgyqagv\",\"type\":\"vmnpkukghimdblx\"}],\"nextLink\":\"imfnjhfjx\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"nginxVersion\":\"nvudwtiukb\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{}],\"privateIPAddresses\":[{},{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"pazyxoegukg\"}},\"ipAddress\":\"piu\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"qzntypm\",\"containerName\":\"p\"}},\"scalingProperties\":{\"capacity\":2078386445,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"j\",\"capacity\":{\"min\":1233826604,\"max\":602526970}},{\"name\":\"ydnfyhxdeoejz\",\"capacity\":{\"min\":947981025,\"max\":170373532}},{\"name\":\"ifsjttgzfbishcb\",\"capacity\":{\"min\":1326905161,\"max\":1409405599}},{\"name\":\"jdeyeamdpha\",\"capacity\":{\"min\":1536073800,\"max\":2125402633}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"buxwgip\"},\"userProfile\":{\"preferredEmail\":\"nowkgshw\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"bin\",\"attackSignaturesPackage\":{\"version\":\"pu\",\"revisionDatetime\":\"2021-08-09T20:50:19Z\"},\"botSignaturesPackage\":{\"version\":\"rywn\",\"revisionDatetime\":\"2021-04-17T17:28:27Z\"},\"threatCampaignsPackage\":{\"version\":\"ftiyqzrnkcq\",\"revisionDatetime\":\"2021-08-17T21:46:51Z\"},\"componentVersions\":{\"wafEngineVersion\":\"lwh\",\"wafNginxVersion\":\"lsicohoqqnwv\"}}},\"dataplaneApiEndpoint\":\"yav\"},\"identity\":{\"principalId\":\"eun\",\"tenantId\":\"qhgyxzkonocukok\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ewrmjmwvvjektc\":{\"principalId\":\"onuq\",\"clientId\":\"fkbey\"},\"lihkaetcktvfc\":{\"principalId\":\"enhwlrs\",\"clientId\":\"rzpwvlqdqgbiq\"},\"uwutttxfvjrbi\":{\"principalId\":\"fsnkymuctq\",\"clientId\":\"fbebrjcxer\"},\"uujqgidokgjljyo\":{\"principalId\":\"hxepcyvahfnlj\",\"clientId\":\"qxj\"}}},\"sku\":{\"name\":\"vcltbgsncgh\"},\"location\":\"esz\",\"tags\":{\"gx\":\"ijhtxf\",\"nehmpvecx\":\"fsm\",\"gr\":\"odebfqkkrbmpu\"},\"id\":\"wflzlfbxzpuzy\",\"name\":\"ispnqzahmgkbrp\",\"type\":\"y\"},{\"properties\":{\"provisioningState\":\"Updating\",\"nginxVersion\":\"uqqkpik\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{}],\"privateIPAddresses\":[{},{}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"n\"}},\"ipAddress\":\"ynhijggme\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"butr\",\"containerName\":\"pnazzm\"}},\"scalingProperties\":{\"capacity\":2024670267,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"pxtt\",\"capacity\":{\"min\":480744947,\"max\":1899471786}},{\"name\":\"rbnlankxmyskp\",\"capacity\":{\"min\":1438226066,\"max\":743667383}},{\"name\":\"nbtkcxywnytnr\",\"capacity\":{\"min\":318845420,\"max\":815551540}},{\"name\":\"lqidyby\",\"capacity\":{\"min\":884144034,\"max\":1012286032}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"clha\"},\"userProfile\":{\"preferredEmail\":\"babphlwrqlfk\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"cocmnyyaztt\",\"attackSignaturesPackage\":{\"version\":\"wwrq\",\"revisionDatetime\":\"2021-11-18T03:44:45Z\"},\"botSignaturesPackage\":{\"version\":\"dckzywbiexz\",\"revisionDatetime\":\"2021-06-21T03:22:31Z\"},\"threatCampaignsPackage\":{\"version\":\"ue\",\"revisionDatetime\":\"2021-07-19T01:40:34Z\"},\"componentVersions\":{\"wafEngineVersion\":\"bxu\",\"wafNginxVersion\":\"wbhqwal\"}}},\"dataplaneApiEndpoint\":\"zyoxaepdkzjan\"},\"identity\":{\"principalId\":\"rhdwbavxbniw\",\"tenantId\":\"swzts\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"lcuhxwtctyqiklb\":{\"principalId\":\"ytxhp\",\"clientId\":\"bzpfzab\"},\"uosvmkfssxqukk\":{\"principalId\":\"vplwzbhv\",\"clientId\":\"u\"}}},\"sku\":{\"name\":\"l\"},\"location\":\"gsxnkjzkdeslpv\",\"tags\":{\"baiuebbaumny\":\"wiyighxpkdw\",\"txp\":\"upedeojnabckhs\"},\"id\":\"ie\",\"name\":\"tfhvpesapskrdqmh\",\"type\":\"jdhtldwkyzxu\"}],\"nextLink\":\"kn\"}") .toObject(NginxDeploymentListResponse.class); - Assertions.assertEquals("r", model.value().get(0).location()); - Assertions.assertEquals("cym", model.value().get(0).tags().get("aolps")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ohxcrsbfova", + Assertions.assertEquals("esz", model.value().get(0).location()); + Assertions.assertEquals("ijhtxf", model.value().get(0).tags().get("gx")); + Assertions.assertEquals("pazyxoegukg", model.value().get(0).properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(true, model.value().get(0).properties().enableDiagnosticsSupport()); - Assertions.assertEquals("ubcgjbirxb", - model.value().get(0).properties().logging().storageAccount().accountName()); - Assertions.assertEquals("bsrfbj", model.value().get(0).properties().logging().storageAccount().containerName()); - Assertions.assertEquals(157171235, model.value().get(0).properties().scalingProperties().capacity()); - Assertions.assertEquals("otftpvjzbexilz", - model.value().get(0).properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1948356330, + Assertions.assertTrue(model.value().get(0).properties().enableDiagnosticsSupport()); + Assertions.assertEquals("qzntypm", model.value().get(0).properties().logging().storageAccount().accountName()); + Assertions.assertEquals("p", model.value().get(0).properties().logging().storageAccount().containerName()); + Assertions.assertEquals(2078386445, model.value().get(0).properties().scalingProperties().capacity()); + Assertions.assertEquals("j", model.value().get(0).properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1233826604, model.value().get(0).properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1551412306, + Assertions.assertEquals(602526970, model.value().get(0).properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("oujmkcjhwqytj", - model.value().get(0).properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("n", model.value().get(0).properties().userProfile().preferredEmail()); + Assertions.assertEquals("buxwgip", model.value().get(0).properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("nowkgshw", model.value().get(0).properties().userProfile().preferredEmail()); Assertions.assertEquals(ActivationState.DISABLED, model.value().get(0).properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); - Assertions.assertEquals("gycdu", model.value().get(0).sku().name()); - Assertions.assertEquals("imfnjhfjx", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NginxDeploymentListResponse model - = new NginxDeploymentListResponse() - .withValue(Arrays.asList( - new NginxDeploymentInner().withLocation("r") - .withTags( - mapOf("aolps", "cym", "dnbbglzps", "lqlfm", "adbzmnvdfznud", "iydmcwyhzdxs", "xzb", "od")) - .withIdentity(new IdentityProperties() - .withType(IdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("rmfqjhhkxbpvj", new UserIdentityProperties(), - "wbxqzvszjfau", new UserIdentityProperties(), "bhsfxob", new UserIdentityProperties()))) - .withProperties(new NginxDeploymentProperties() - .withNetworkProfile(new NginxNetworkProfile() - .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress(), - new NginxPublicIpAddress(), new NginxPublicIpAddress())) - .withPrivateIpAddresses( - Arrays.asList(new NginxPrivateIpAddress(), new NginxPrivateIpAddress(), - new NginxPrivateIpAddress(), new NginxPrivateIpAddress()))) - .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("ohxcrsbfova"))) - .withEnableDiagnosticsSupport(true) - .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("ubcgjbirxb").withContainerName("bsrfbj"))) - .withScalingProperties( - new NginxDeploymentScalingProperties().withCapacity(157171235) - .withProfiles( - Arrays - .asList( - new ScaleProfile().withName("otftpvjzbexilz") - .withCapacity(new ScaleProfileCapacity().withMin(1948356330) - .withMax(1551412306)), - new ScaleProfile() - .withName("qqnvwpmq") - .withCapacity(new ScaleProfileCapacity() - .withMin(1787439694) - .withMax(1628769376))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("oujmkcjhwqytj")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("n")) - .withNginxAppProtect(new NginxDeploymentPropertiesNginxAppProtect() - .withWebApplicationFirewallSettings(new WebApplicationFirewallSettings() - .withActivationState(ActivationState.DISABLED)))) - .withSku(new ResourceSku().withName("gycdu")), - new NginxDeploymentInner().withLocation("c") - .withTags(mapOf("iiswacffgdkzze", "wdsjnkalju", "pfuflrw", "kfvhqcrailvpn")) - .withIdentity(new IdentityProperties() - .withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("hhszh", new UserIdentityProperties()))) - .withProperties(new NginxDeploymentProperties() - .withNetworkProfile(new NginxNetworkProfile() - .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses( - Arrays.asList(new NginxPublicIpAddress(), new NginxPublicIpAddress(), - new NginxPublicIpAddress(), new NginxPublicIpAddress())) - .withPrivateIpAddresses( - Arrays.asList(new NginxPrivateIpAddress(), new NginxPrivateIpAddress(), - new NginxPrivateIpAddress(), new NginxPrivateIpAddress()))) - .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("wwtppj"))) - .withEnableDiagnosticsSupport(true) - .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("kqze").withContainerName("kdltfzxmhhvhg"))) - .withScalingProperties( - new NginxDeploymentScalingProperties().withCapacity(1748485864) - .withProfiles( - Arrays - .asList( - new ScaleProfile().withName("wobdagxtibqdx") - .withCapacity(new ScaleProfileCapacity().withMin(1020209011) - .withMax(709641319)), - new ScaleProfile().withName("akbogqxndlkzgxh") - .withCapacity(new ScaleProfileCapacity().withMin(975056149) - .withMax(1924988063)), - new ScaleProfile().withName("plbpodxun") - .withCapacity(new ScaleProfileCapacity().withMin(1102783029) - .withMax(405149242))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("xmubyyntwlrbq")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("ievseotgqrllt")) - .withNginxAppProtect(new NginxDeploymentPropertiesNginxAppProtect() - .withWebApplicationFirewallSettings(new WebApplicationFirewallSettings() - .withActivationState(ActivationState.DISABLED)))) - .withSku(new ResourceSku().withName("lvithhqzonosgg")), - new NginxDeploymentInner().withLocation("washr") - .withTags(mapOf("ulpiuj", "kcnqxwbpo", "obyu", "aasipqi")) - .withIdentity(new IdentityProperties().withType(IdentityType.NONE) - .withUserAssignedIdentities(mapOf("dldwmgxc", new UserIdentityProperties()))) - .withProperties(new NginxDeploymentProperties() - .withNetworkProfile(new NginxNetworkProfile() - .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress(), - new NginxPublicIpAddress(), new NginxPublicIpAddress())) - .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress(), - new NginxPrivateIpAddress(), new NginxPrivateIpAddress()))) - .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("yqsluic"))) - .withEnableDiagnosticsSupport(true) - .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("uefywsbpfvmwy").withContainerName("fouyf"))) - .withScalingProperties( - new NginxDeploymentScalingProperties().withCapacity(1378791233) - .withProfiles( - Arrays - .asList( - new ScaleProfile().withName("wiyzvqtmnubexkp") - .withCapacity(new ScaleProfileCapacity().withMin(1583015875) - .withMax(1254452597)), - new ScaleProfile().withName("mond") - .withCapacity(new ScaleProfileCapacity().withMin(1929847054) - .withMax(1007666972)), - new ScaleProfile().withName("uxvypomgkopkwh") - .withCapacity(new ScaleProfileCapacity().withMin(664596221) - .withMax(10985850))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("ajqgxy")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("cmbqfqvmk")) - .withNginxAppProtect( - new NginxDeploymentPropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED)))) - .withSku(new ResourceSku().withName("iexpbtgiwbwo")), - new NginxDeploymentInner().withLocation("y") - .withTags(mapOf("drd", "rnxxmueed", "alm", "stkwqqtch", "gdv", "mtdaa")) - .withIdentity(new IdentityProperties().withType(IdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("aeneqnzarrwl", new UserIdentityProperties(), "iipfpubj", - new UserIdentityProperties(), "ynl", new UserIdentityProperties()))) - .withProperties(new NginxDeploymentProperties() - .withNetworkProfile(new NginxNetworkProfile() - .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress(), - new NginxPublicIpAddress(), new NginxPublicIpAddress())) - .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress()))) - .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("mslyzrpzbchckqqz"))) - .withEnableDiagnosticsSupport(true) - .withLogging(new NginxLogging() - .withStorageAccount(new NginxStorageAccount().withAccountName("zynkedya") - .withContainerName("wyhqmibzyhwits"))) - .withScalingProperties( - new NginxDeploymentScalingProperties().withCapacity(1679951474) - .withProfiles( - Arrays - .asList( - new ScaleProfile().withName("pcdpumnz") - .withCapacity(new ScaleProfileCapacity().withMin(998287381) - .withMax(944462660)), - new ScaleProfile().withName("z") - .withCapacity(new ScaleProfileCapacity().withMin(1443914942) - .withMax(1417683929)), - new ScaleProfile().withName("biknsorgjhxbld") - .withCapacity(new ScaleProfileCapacity().withMin(1166597262) - .withMax(706339919))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("rlkdmtncvokotl")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("yhgsy")) - .withNginxAppProtect(new NginxDeploymentPropertiesNginxAppProtect() - .withWebApplicationFirewallSettings(new WebApplicationFirewallSettings() - .withActivationState(ActivationState.DISABLED)))) - .withSku(new ResourceSku().withName("vc")))) - .withNextLink("imfnjhfjx"); - model = BinaryData.fromObject(model).toObject(NginxDeploymentListResponse.class); - Assertions.assertEquals("r", model.value().get(0).location()); - Assertions.assertEquals("cym", model.value().get(0).tags().get("aolps")); - Assertions.assertEquals(IdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ohxcrsbfova", - model.value().get(0).properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(true, model.value().get(0).properties().enableDiagnosticsSupport()); - Assertions.assertEquals("ubcgjbirxb", - model.value().get(0).properties().logging().storageAccount().accountName()); - Assertions.assertEquals("bsrfbj", model.value().get(0).properties().logging().storageAccount().containerName()); - Assertions.assertEquals(157171235, model.value().get(0).properties().scalingProperties().capacity()); - Assertions.assertEquals("otftpvjzbexilz", - model.value().get(0).properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1948356330, - model.value().get(0).properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1551412306, - model.value().get(0).properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("oujmkcjhwqytj", - model.value().get(0).properties().autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("n", model.value().get(0).properties().userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, - model.value().get(0).properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); - Assertions.assertEquals("gycdu", model.value().get(0).sku().name()); - Assertions.assertEquals("imfnjhfjx", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("vcltbgsncgh", model.value().get(0).sku().name()); + Assertions.assertEquals("kn", model.nextLink()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesNginxAppProtectTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesNginxAppProtectTests.java index be1dce89d066..df443b1c4030 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesNginxAppProtectTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesNginxAppProtectTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -14,7 +14,7 @@ public final class NginxDeploymentPropertiesNginxAppProtectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentPropertiesNginxAppProtect model = BinaryData.fromString( - "{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"pvfadmwsrcr\",\"revisionDatetime\":\"2021-01-28T15:16:12Z\"},\"botSignaturesPackage\":{\"version\":\"pv\",\"revisionDatetime\":\"2021-07-02T00:35:52Z\"},\"threatCampaignsPackage\":{\"version\":\"zlfmisgwbnbbeld\",\"revisionDatetime\":\"2021-03-30T10:55:40Z\"},\"componentVersions\":{\"wafEngineVersion\":\"zbaliourqha\",\"wafNginxVersion\":\"auhashsfwx\"}}}") + "{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"rvqdra\",\"attackSignaturesPackage\":{\"version\":\"jybige\",\"revisionDatetime\":\"2021-04-03T11:00:19Z\"},\"botSignaturesPackage\":{\"version\":\"fbowskanyk\",\"revisionDatetime\":\"2021-05-13T11:12:13Z\"},\"threatCampaignsPackage\":{\"version\":\"cuiywgqyw\",\"revisionDatetime\":\"2021-04-03T19:54:10Z\"},\"componentVersions\":{\"wafEngineVersion\":\"rvynhzgpph\",\"wafNginxVersion\":\"cgyncocpecf\"}}}") .toObject(NginxDeploymentPropertiesNginxAppProtect.class); Assertions.assertEquals(ActivationState.ENABLED, model.webApplicationFirewallSettings().activationState()); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesTests.java index 35bf7fc06233..e39274b98042 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -29,27 +29,27 @@ public final class NginxDeploymentPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"nginxVersion\":\"yn\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"yxczfclh\"},{\"id\":\"xdbabphlwr\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"tsthsucocm\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"zt\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"wwrq\"}},\"ipAddress\":\"edckzywbiexzfey\",\"enableDiagnosticsSupport\":false,\"logging\":{\"storageAccount\":{\"accountName\":\"xujwbhqwalmuzyo\",\"containerName\":\"epdkzja\"}},\"scalingProperties\":{\"capacity\":1987726952,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"d\",\"capacity\":{\"min\":1400002261,\"max\":1879785159}},{\"name\":\"v\",\"capacity\":{\"min\":1605187994,\"max\":1767161087}},{\"name\":\"iwdjswztsdbpgn\",\"capacity\":{\"min\":1127167490,\"max\":862771413}},{\"name\":\"x\",\"capacity\":{\"min\":1275335894,\"max\":999605731}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"bzpfzab\"},\"userProfile\":{\"preferredEmail\":\"uhxwtctyqiklbbov\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"},\"webApplicationFirewallStatus\":{\"attackSignaturesPackage\":{\"version\":\"vgyuguos\",\"revisionDatetime\":\"2021-01-13T18:03:39Z\"},\"botSignaturesPackage\":{\"version\":\"fssxqukkfplg\",\"revisionDatetime\":\"2021-01-07T21:55:14Z\"},\"threatCampaignsPackage\":{\"version\":\"xnkjzkdesl\",\"revisionDatetime\":\"2021-03-03T09:58:01Z\"},\"componentVersions\":{\"wafEngineVersion\":\"opwi\",\"wafNginxVersion\":\"ighxpk\"}}},\"dataplaneApiEndpoint\":\"zb\"}") + "{\"provisioningState\":\"Succeeded\",\"nginxVersion\":\"mglougpbkw\",\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"qktapspwgcuert\"},{\"id\":\"kdosvqw\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"gbbjfddgmbmbe\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"htqqrolfp\"},{\"privateIPAddress\":\"s\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"qux\"},{\"privateIPAddress\":\"jyj\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"o\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"rtxilner\"}},\"ipAddress\":\"jysvl\",\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"awrlyx\",\"containerName\":\"kcprbnw\"}},\"scalingProperties\":{\"capacity\":19976049,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"bvpyss\",\"capacity\":{\"min\":2030092975,\"max\":881911115}},{\"name\":\"rujqg\",\"capacity\":{\"min\":1493631585,\"max\":1745806154}},{\"name\":\"uouq\",\"capacity\":{\"min\":1747028439,\"max\":1853724475}}]}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"zw\"},\"userProfile\":{\"preferredEmail\":\"uitnwuiz\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"},\"webApplicationFirewallStatus\":{\"wafRelease\":\"izuckyfihrfidfvz\",\"attackSignaturesPackage\":{\"version\":\"zuhtymwisdkfthwx\",\"revisionDatetime\":\"2021-10-31T03:21:56Z\"},\"botSignaturesPackage\":{\"version\":\"eiwaopvkmi\",\"revisionDatetime\":\"2021-06-21T07:18:55Z\"},\"threatCampaignsPackage\":{\"version\":\"mxdcufufsrp\",\"revisionDatetime\":\"2021-09-01T13:41:02Z\"},\"componentVersions\":{\"wafEngineVersion\":\"idnsezcxtb\",\"wafNginxVersion\":\"sgfyccsnew\"}}},\"dataplaneApiEndpoint\":\"wzjeiach\"}") .toObject(NginxDeploymentProperties.class); - Assertions.assertEquals("yxczfclh", + Assertions.assertEquals("qktapspwgcuert", model.networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("tsthsucocm", + Assertions.assertEquals("gbbjfddgmbmbe", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("zt", + Assertions.assertEquals("htqqrolfp", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("wwrq", model.networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(false, model.enableDiagnosticsSupport()); - Assertions.assertEquals("xujwbhqwalmuzyo", model.logging().storageAccount().accountName()); - Assertions.assertEquals("epdkzja", model.logging().storageAccount().containerName()); - Assertions.assertEquals(1987726952, model.scalingProperties().capacity()); - Assertions.assertEquals("d", model.scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1400002261, model.scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1879785159, model.scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("bzpfzab", model.autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("uhxwtctyqiklbbov", model.userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("rtxilner", model.networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertTrue(model.enableDiagnosticsSupport()); + Assertions.assertEquals("awrlyx", model.logging().storageAccount().accountName()); + Assertions.assertEquals("kcprbnw", model.logging().storageAccount().containerName()); + Assertions.assertEquals(19976049, model.scalingProperties().capacity()); + Assertions.assertEquals("bvpyss", model.scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(2030092975, model.scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(881911115, model.scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("zw", model.autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("uitnwuiz", model.userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.ENABLED, model.nginxAppProtect().webApplicationFirewallSettings().activationState()); } @@ -58,49 +58,54 @@ public void testSerialize() throws Exception { NginxDeploymentProperties model = new NginxDeploymentProperties() .withNetworkProfile(new NginxNetworkProfile() .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("yxczfclh"), - new NginxPublicIpAddress().withId("xdbabphlwr"))) - .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress().withPrivateIpAddress("tsthsucocm") - .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("zt")))) - .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("wwrq"))) - .withEnableDiagnosticsSupport(false) - .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("xujwbhqwalmuzyo").withContainerName("epdkzja"))) - .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(1987726952) + .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("qktapspwgcuert"), + new NginxPublicIpAddress().withId("kdosvqw"))) + .withPrivateIpAddresses(Arrays.asList( + new NginxPrivateIpAddress().withPrivateIpAddress("gbbjfddgmbmbe") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("htqqrolfp"), + new NginxPrivateIpAddress().withPrivateIpAddress("s") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("qux"), + new NginxPrivateIpAddress().withPrivateIpAddress("jyj") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("o")))) + .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("rtxilner"))) + .withEnableDiagnosticsSupport(true) + .withLogging(new NginxLogging() + .withStorageAccount(new NginxStorageAccount().withAccountName("awrlyx").withContainerName("kcprbnw"))) + .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(19976049) .withProfiles(Arrays.asList( - new ScaleProfile().withName("d") - .withCapacity(new ScaleProfileCapacity().withMin(1400002261).withMax(1879785159)), - new ScaleProfile().withName("v") - .withCapacity(new ScaleProfileCapacity().withMin(1605187994).withMax(1767161087)), - new ScaleProfile().withName("iwdjswztsdbpgn") - .withCapacity(new ScaleProfileCapacity().withMin(1127167490).withMax(862771413)), - new ScaleProfile().withName("x") - .withCapacity(new ScaleProfileCapacity().withMin(1275335894).withMax(999605731))))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("bzpfzab")) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("uhxwtctyqiklbbov")) + new ScaleProfile().withName("bvpyss") + .withCapacity(new ScaleProfileCapacity().withMin(2030092975).withMax(881911115)), + new ScaleProfile().withName("rujqg") + .withCapacity(new ScaleProfileCapacity().withMin(1493631585).withMax(1745806154)), + new ScaleProfile().withName("uouq") + .withCapacity(new ScaleProfileCapacity().withMin(1747028439).withMax(1853724475))))) + .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("zw")) + .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("uitnwuiz")) .withNginxAppProtect(new NginxDeploymentPropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED))); + new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED))); model = BinaryData.fromObject(model).toObject(NginxDeploymentProperties.class); - Assertions.assertEquals("yxczfclh", + Assertions.assertEquals("qktapspwgcuert", model.networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("tsthsucocm", + Assertions.assertEquals("gbbjfddgmbmbe", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("zt", + Assertions.assertEquals("htqqrolfp", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("wwrq", model.networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals(false, model.enableDiagnosticsSupport()); - Assertions.assertEquals("xujwbhqwalmuzyo", model.logging().storageAccount().accountName()); - Assertions.assertEquals("epdkzja", model.logging().storageAccount().containerName()); - Assertions.assertEquals(1987726952, model.scalingProperties().capacity()); - Assertions.assertEquals("d", model.scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(1400002261, model.scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1879785159, model.scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("bzpfzab", model.autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals("uhxwtctyqiklbbov", model.userProfile().preferredEmail()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("rtxilner", model.networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertTrue(model.enableDiagnosticsSupport()); + Assertions.assertEquals("awrlyx", model.logging().storageAccount().accountName()); + Assertions.assertEquals("kcprbnw", model.logging().storageAccount().containerName()); + Assertions.assertEquals(19976049, model.scalingProperties().capacity()); + Assertions.assertEquals("bvpyss", model.scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(2030092975, model.scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(881911115, model.scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("zw", model.autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("uitnwuiz", model.userProfile().preferredEmail()); + Assertions.assertEquals(ActivationState.ENABLED, model.nginxAppProtect().webApplicationFirewallSettings().activationState()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesAutoScaleSettingsTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesAutoScaleSettingsTests.java index 6977563c3868..1d7b0b63eaef 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesAutoScaleSettingsTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesAutoScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -15,24 +15,26 @@ public final class NginxDeploymentScalingPropertiesAutoScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentScalingPropertiesAutoScaleSettings model = BinaryData.fromString( - "{\"profiles\":[{\"name\":\"mehhseyvjusrtsl\",\"capacity\":{\"min\":1593935423,\"max\":1948338560}},{\"name\":\"kdeemaofmxagkvtm\",\"capacity\":{\"min\":696697077,\"max\":2048736715}}]}") + "{\"profiles\":[{\"name\":\"dtopbob\",\"capacity\":{\"min\":319956486,\"max\":2040578673}},{\"name\":\"hm\",\"capacity\":{\"min\":20476621,\"max\":115410873}},{\"name\":\"a\",\"capacity\":{\"min\":248377661,\"max\":46444609}}]}") .toObject(NginxDeploymentScalingPropertiesAutoScaleSettings.class); - Assertions.assertEquals("mehhseyvjusrtsl", model.profiles().get(0).name()); - Assertions.assertEquals(1593935423, model.profiles().get(0).capacity().min()); - Assertions.assertEquals(1948338560, model.profiles().get(0).capacity().max()); + Assertions.assertEquals("dtopbob", model.profiles().get(0).name()); + Assertions.assertEquals(319956486, model.profiles().get(0).capacity().min()); + Assertions.assertEquals(2040578673, model.profiles().get(0).capacity().max()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxDeploymentScalingPropertiesAutoScaleSettings model = new NginxDeploymentScalingPropertiesAutoScaleSettings().withProfiles(Arrays.asList( - new ScaleProfile().withName("mehhseyvjusrtsl") - .withCapacity(new ScaleProfileCapacity().withMin(1593935423).withMax(1948338560)), - new ScaleProfile().withName("kdeemaofmxagkvtm") - .withCapacity(new ScaleProfileCapacity().withMin(696697077).withMax(2048736715)))); + new ScaleProfile().withName("dtopbob") + .withCapacity(new ScaleProfileCapacity().withMin(319956486).withMax(2040578673)), + new ScaleProfile().withName("hm") + .withCapacity(new ScaleProfileCapacity().withMin(20476621).withMax(115410873)), + new ScaleProfile().withName("a") + .withCapacity(new ScaleProfileCapacity().withMin(248377661).withMax(46444609)))); model = BinaryData.fromObject(model).toObject(NginxDeploymentScalingPropertiesAutoScaleSettings.class); - Assertions.assertEquals("mehhseyvjusrtsl", model.profiles().get(0).name()); - Assertions.assertEquals(1593935423, model.profiles().get(0).capacity().min()); - Assertions.assertEquals(1948338560, model.profiles().get(0).capacity().max()); + Assertions.assertEquals("dtopbob", model.profiles().get(0).name()); + Assertions.assertEquals(319956486, model.profiles().get(0).capacity().min()); + Assertions.assertEquals(2040578673, model.profiles().get(0).capacity().max()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesTests.java index 789b48564943..1345afcbd543 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentScalingPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -15,30 +15,26 @@ public final class NginxDeploymentScalingPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentScalingProperties model = BinaryData.fromString( - "{\"capacity\":1613065996,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"oyrxvwfudwpzntxh\",\"capacity\":{\"min\":1710146471,\"max\":328563559}},{\"name\":\"lrqjbhckfr\",\"capacity\":{\"min\":1523615779,\"max\":2044526914}},{\"name\":\"xsbkyvpyca\",\"capacity\":{\"min\":427278595,\"max\":106855620}},{\"name\":\"bpzkafkuwbc\",\"capacity\":{\"min\":1514524475,\"max\":946722582}}]}}") + "{\"capacity\":569590311,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"cyddglmjthjqk\",\"capacity\":{\"min\":1616692109,\"max\":1532134402}},{\"name\":\"eicxmqciwqvhkhi\",\"capacity\":{\"min\":1316463743,\"max\":213865408}}]}}") .toObject(NginxDeploymentScalingProperties.class); - Assertions.assertEquals(1613065996, model.capacity()); - Assertions.assertEquals("oyrxvwfudwpzntxh", model.profiles().get(0).name()); - Assertions.assertEquals(1710146471, model.profiles().get(0).capacity().min()); - Assertions.assertEquals(328563559, model.profiles().get(0).capacity().max()); + Assertions.assertEquals(569590311, model.capacity()); + Assertions.assertEquals("cyddglmjthjqk", model.profiles().get(0).name()); + Assertions.assertEquals(1616692109, model.profiles().get(0).capacity().min()); + Assertions.assertEquals(1532134402, model.profiles().get(0).capacity().max()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxDeploymentScalingProperties model = new NginxDeploymentScalingProperties().withCapacity(1613065996) + NginxDeploymentScalingProperties model = new NginxDeploymentScalingProperties().withCapacity(569590311) .withProfiles(Arrays.asList( - new ScaleProfile().withName("oyrxvwfudwpzntxh") - .withCapacity(new ScaleProfileCapacity().withMin(1710146471).withMax(328563559)), - new ScaleProfile().withName("lrqjbhckfr") - .withCapacity(new ScaleProfileCapacity().withMin(1523615779).withMax(2044526914)), - new ScaleProfile().withName("xsbkyvpyca") - .withCapacity(new ScaleProfileCapacity().withMin(427278595).withMax(106855620)), - new ScaleProfile().withName("bpzkafkuwbc") - .withCapacity(new ScaleProfileCapacity().withMin(1514524475).withMax(946722582)))); + new ScaleProfile().withName("cyddglmjthjqk") + .withCapacity(new ScaleProfileCapacity().withMin(1616692109).withMax(1532134402)), + new ScaleProfile().withName("eicxmqciwqvhkhi") + .withCapacity(new ScaleProfileCapacity().withMin(1316463743).withMax(213865408)))); model = BinaryData.fromObject(model).toObject(NginxDeploymentScalingProperties.class); - Assertions.assertEquals(1613065996, model.capacity()); - Assertions.assertEquals("oyrxvwfudwpzntxh", model.profiles().get(0).name()); - Assertions.assertEquals(1710146471, model.profiles().get(0).capacity().min()); - Assertions.assertEquals(328563559, model.profiles().get(0).capacity().max()); + Assertions.assertEquals(569590311, model.capacity()); + Assertions.assertEquals("cyddglmjthjqk", model.profiles().get(0).name()); + Assertions.assertEquals(1616692109, model.profiles().get(0).capacity().min()); + Assertions.assertEquals(1532134402, model.profiles().get(0).capacity().max()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java index b673488d24cd..c6917275489a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -36,23 +36,23 @@ public final class NginxDeploymentUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentUpdateParameters model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"btdhxujznbm\",\"tenantId\":\"wuwprzqlv\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"iplrbpbewtghfgb\":{\"principalId\":\"j\",\"clientId\":\"hfxobbcswsrtj\"}}},\"tags\":{\"gibtnm\":\"wxzvlvqhjkb\"},\"sku\":{\"name\":\"ebwwaloayqc\"},\"location\":\"rtzju\",\"properties\":{\"enableDiagnosticsSupport\":false,\"logging\":{\"storageAccount\":{\"accountName\":\"txon\",\"containerName\":\"ts\"}},\"scalingProperties\":{\"capacity\":1151721891,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"wxqpsrknftguvri\",\"capacity\":{\"min\":2067966148,\"max\":346256186}},{\"name\":\"rwmdyvxqtay\",\"capacity\":{\"min\":1285325454,\"max\":357638492}}]}},\"userProfile\":{\"preferredEmail\":\"oyq\"},\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"qibycnojvknm\"},{\"id\":\"qsgzvahapj\"},{\"id\":\"hpvgqz\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"xdjzlmwlxk\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"hzovawjvzunlut\"},{\"privateIPAddress\":\"n\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"i\"},{\"privateIPAddress\":\"ilpjzuaejxdult\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"btdzumveekg\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"zuhkfpbsjyof\"}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"luu\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"}}}}") + "{\"identity\":{\"principalId\":\"lbjnpgacftadehx\",\"tenantId\":\"tyfsoppusuesn\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wxdndnvowgujjug\":{\"principalId\":\"avo\",\"clientId\":\"zdmohctbqvu\"},\"kuofqweykhme\":{\"principalId\":\"kcglhslaz\",\"clientId\":\"yggdtjixh\"},\"amdecte\":{\"principalId\":\"vfyexfw\",\"clientId\":\"bcibvyvdcsitynn\"}}},\"tags\":{\"eypvhezrkg\":\"qsc\",\"sle\":\"hcjrefovgmk\",\"cattpngjcrcczsq\":\"yvxyqjp\"},\"sku\":{\"name\":\"hvmdajvnysounq\"},\"location\":\"a\",\"properties\":{\"enableDiagnosticsSupport\":true,\"logging\":{\"storageAccount\":{\"accountName\":\"hy\",\"containerName\":\"trpmo\"}},\"scalingProperties\":{\"capacity\":584946048,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"tuo\",\"capacity\":{\"min\":1961920372,\"max\":607140678}},{\"name\":\"fu\",\"capacity\":{\"min\":102463289,\"max\":94424945}},{\"name\":\"odsfcpkvxodpuozm\",\"capacity\":{\"min\":2044584540,\"max\":466984415}}]}},\"userProfile\":{\"preferredEmail\":\"gf\"},\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"yiuokktwh\"},{\"id\":\"xw\"},{\"id\":\"wqsmbsur\"},{\"id\":\"imoryocfsfksym\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"tki\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"qyud\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"rq\"}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"poczvyifqrvkdvjs\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"}}}}") .toObject(NginxDeploymentUpdateParameters.class); Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("wxzvlvqhjkb", model.tags().get("gibtnm")); - Assertions.assertEquals("ebwwaloayqc", model.sku().name()); - Assertions.assertEquals("rtzju", model.location()); - Assertions.assertEquals(false, model.properties().enableDiagnosticsSupport()); - Assertions.assertEquals("txon", model.properties().logging().storageAccount().accountName()); - Assertions.assertEquals("ts", model.properties().logging().storageAccount().containerName()); - Assertions.assertEquals(1151721891, model.properties().scalingProperties().capacity()); - Assertions.assertEquals("wxqpsrknftguvri", model.properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(2067966148, model.properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(346256186, model.properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("oyq", model.properties().userProfile().preferredEmail()); - Assertions.assertEquals("qibycnojvknm", + Assertions.assertEquals("qsc", model.tags().get("eypvhezrkg")); + Assertions.assertEquals("hvmdajvnysounq", model.sku().name()); + Assertions.assertEquals("a", model.location()); + Assertions.assertTrue(model.properties().enableDiagnosticsSupport()); + Assertions.assertEquals("hy", model.properties().logging().storageAccount().accountName()); + Assertions.assertEquals("trpmo", model.properties().logging().storageAccount().containerName()); + Assertions.assertEquals(584946048, model.properties().scalingProperties().capacity()); + Assertions.assertEquals("tuo", model.properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1961920372, model.properties().scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(607140678, model.properties().scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("gf", model.properties().userProfile().preferredEmail()); + Assertions.assertEquals("yiuokktwh", model.properties().networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("xdjzlmwlxk", + Assertions.assertEquals("tki", model.properties() .networkProfile() .frontEndIpConfiguration() @@ -66,78 +66,64 @@ public void testDeserialize() throws Exception { .privateIpAddresses() .get(0) .privateIpAllocationMethod()); - Assertions.assertEquals("hzovawjvzunlut", + Assertions.assertEquals("qyud", model.properties().networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("zuhkfpbsjyof", - model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals("luu", model.properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("rq", model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertEquals("poczvyifqrvkdvjs", model.properties().autoUpgradeProfile().upgradeChannel()); Assertions.assertEquals(ActivationState.DISABLED, model.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxDeploymentUpdateParameters model - = new NginxDeploymentUpdateParameters() - .withIdentity(new IdentityProperties().withType(IdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("iplrbpbewtghfgb", new UserIdentityProperties()))) - .withTags(mapOf("gibtnm", "wxzvlvqhjkb")) - .withSku(new ResourceSku().withName("ebwwaloayqc")) - .withLocation("rtzju") - .withProperties( - new NginxDeploymentUpdateProperties().withEnableDiagnosticsSupport(false) - .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("txon").withContainerName("ts"))) - .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(1151721891) - .withProfiles(Arrays.asList(new ScaleProfile().withName("wxqpsrknftguvri") - .withCapacity(new ScaleProfileCapacity().withMin(2067966148).withMax(346256186)), - new ScaleProfile().withName("rwmdyvxqtay") - .withCapacity(new ScaleProfileCapacity().withMin(1285325454).withMax(357638492))))) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("oyq")) - .withNetworkProfile( - new NginxNetworkProfile() - .withFrontEndIpConfiguration( - new NginxFrontendIpConfiguration() - .withPublicIpAddresses( - Arrays.asList(new NginxPublicIpAddress().withId("qibycnojvknm"), - new NginxPublicIpAddress().withId("qsgzvahapj"), - new NginxPublicIpAddress().withId("hpvgqz"))) - .withPrivateIpAddresses( - Arrays.asList( - new NginxPrivateIpAddress().withPrivateIpAddress("xdjzlmwlxk") - .withPrivateIpAllocationMethod( - NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("hzovawjvzunlut"), - new NginxPrivateIpAddress().withPrivateIpAddress("n") - .withPrivateIpAllocationMethod( - NginxPrivateIpAllocationMethod.STATIC) - .withSubnetId("i"), - new NginxPrivateIpAddress().withPrivateIpAddress("ilpjzuaejxdult") - .withPrivateIpAllocationMethod( - NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("btdzumveekg")))) - .withNetworkInterfaceConfiguration( - new NginxNetworkInterfaceConfiguration().withSubnetId("zuhkfpbsjyof"))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("luu")) - .withNginxAppProtect( - new NginxDeploymentUpdatePropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED)))); + NginxDeploymentUpdateParameters model = new NginxDeploymentUpdateParameters() + .withIdentity(new IdentityProperties().withType(IdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("wxdndnvowgujjug", new UserIdentityProperties(), "kuofqweykhme", + new UserIdentityProperties(), "amdecte", new UserIdentityProperties()))) + .withTags(mapOf("eypvhezrkg", "qsc", "sle", "hcjrefovgmk", "cattpngjcrcczsq", "yvxyqjp")) + .withSku(new ResourceSku().withName("hvmdajvnysounq")) + .withLocation("a") + .withProperties(new NginxDeploymentUpdateProperties().withEnableDiagnosticsSupport(true) + .withLogging(new NginxLogging() + .withStorageAccount(new NginxStorageAccount().withAccountName("hy").withContainerName("trpmo"))) + .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(584946048) + .withProfiles(Arrays.asList( + new ScaleProfile().withName("tuo") + .withCapacity(new ScaleProfileCapacity().withMin(1961920372).withMax(607140678)), + new ScaleProfile().withName("fu") + .withCapacity(new ScaleProfileCapacity().withMin(102463289).withMax(94424945)), + new ScaleProfile().withName("odsfcpkvxodpuozm") + .withCapacity(new ScaleProfileCapacity().withMin(2044584540).withMax(466984415))))) + .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("gf")) + .withNetworkProfile(new NginxNetworkProfile() + .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() + .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("yiuokktwh"), + new NginxPublicIpAddress().withId("xw"), new NginxPublicIpAddress().withId("wqsmbsur"), + new NginxPublicIpAddress().withId("imoryocfsfksym"))) + .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress().withPrivateIpAddress("tki") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("qyud")))) + .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("rq"))) + .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("poczvyifqrvkdvjs")) + .withNginxAppProtect( + new NginxDeploymentUpdatePropertiesNginxAppProtect().withWebApplicationFirewallSettings( + new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED)))); model = BinaryData.fromObject(model).toObject(NginxDeploymentUpdateParameters.class); Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("wxzvlvqhjkb", model.tags().get("gibtnm")); - Assertions.assertEquals("ebwwaloayqc", model.sku().name()); - Assertions.assertEquals("rtzju", model.location()); - Assertions.assertEquals(false, model.properties().enableDiagnosticsSupport()); - Assertions.assertEquals("txon", model.properties().logging().storageAccount().accountName()); - Assertions.assertEquals("ts", model.properties().logging().storageAccount().containerName()); - Assertions.assertEquals(1151721891, model.properties().scalingProperties().capacity()); - Assertions.assertEquals("wxqpsrknftguvri", model.properties().scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(2067966148, model.properties().scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(346256186, model.properties().scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("oyq", model.properties().userProfile().preferredEmail()); - Assertions.assertEquals("qibycnojvknm", + Assertions.assertEquals("qsc", model.tags().get("eypvhezrkg")); + Assertions.assertEquals("hvmdajvnysounq", model.sku().name()); + Assertions.assertEquals("a", model.location()); + Assertions.assertTrue(model.properties().enableDiagnosticsSupport()); + Assertions.assertEquals("hy", model.properties().logging().storageAccount().accountName()); + Assertions.assertEquals("trpmo", model.properties().logging().storageAccount().containerName()); + Assertions.assertEquals(584946048, model.properties().scalingProperties().capacity()); + Assertions.assertEquals("tuo", model.properties().scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1961920372, model.properties().scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(607140678, model.properties().scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("gf", model.properties().userProfile().preferredEmail()); + Assertions.assertEquals("yiuokktwh", model.properties().networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("xdjzlmwlxk", + Assertions.assertEquals("tki", model.properties() .networkProfile() .frontEndIpConfiguration() @@ -151,11 +137,10 @@ public void testSerialize() throws Exception { .privateIpAddresses() .get(0) .privateIpAllocationMethod()); - Assertions.assertEquals("hzovawjvzunlut", + Assertions.assertEquals("qyud", model.properties().networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("zuhkfpbsjyof", - model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals("luu", model.properties().autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals("rq", model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertEquals("poczvyifqrvkdvjs", model.properties().autoUpgradeProfile().upgradeChannel()); Assertions.assertEquals(ActivationState.DISABLED, model.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java index 6455f03af4ab..7d32845b2e74 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -14,17 +14,17 @@ public final class NginxDeploymentUpdatePropertiesNginxAppProtectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentUpdatePropertiesNginxAppProtect model - = BinaryData.fromString("{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"}}") + = BinaryData.fromString("{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"}}") .toObject(NginxDeploymentUpdatePropertiesNginxAppProtect.class); - Assertions.assertEquals(ActivationState.ENABLED, model.webApplicationFirewallSettings().activationState()); + Assertions.assertEquals(ActivationState.DISABLED, model.webApplicationFirewallSettings().activationState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxDeploymentUpdatePropertiesNginxAppProtect model = new NginxDeploymentUpdatePropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED)); + new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED)); model = BinaryData.fromObject(model).toObject(NginxDeploymentUpdatePropertiesNginxAppProtect.class); - Assertions.assertEquals(ActivationState.ENABLED, model.webApplicationFirewallSettings().activationState()); + Assertions.assertEquals(ActivationState.DISABLED, model.webApplicationFirewallSettings().activationState()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java index bf7f3522b999..c2e6795806a7 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -29,27 +29,27 @@ public final class NginxDeploymentUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentUpdateProperties model = BinaryData.fromString( - "{\"enableDiagnosticsSupport\":false,\"logging\":{\"storageAccount\":{\"accountName\":\"ekqvkeln\",\"containerName\":\"vbxwyjsflhh\"}},\"scalingProperties\":{\"capacity\":290339428,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"ixisxyawjoy\",\"capacity\":{\"min\":628335164,\"max\":1772436776}},{\"name\":\"slyjpkiid\",\"capacity\":{\"min\":983085062,\"max\":787836165}},{\"name\":\"xznelixhnrztf\",\"capacity\":{\"min\":1975568377,\"max\":434458515}},{\"name\":\"bnxknalaulppg\",\"capacity\":{\"min\":1784168921,\"max\":1987785731}}]}},\"userProfile\":{\"preferredEmail\":\"apnyiropuhpig\"},\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"qgitxmed\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"lynqwwncwzzh\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"rmgucnap\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"oellwp\"}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"d\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Disabled\"}}}") + "{\"enableDiagnosticsSupport\":false,\"logging\":{\"storageAccount\":{\"accountName\":\"t\",\"containerName\":\"n\"}},\"scalingProperties\":{\"capacity\":63177450,\"autoScaleSettings\":{\"profiles\":[{\"name\":\"bczw\",\"capacity\":{\"min\":1309614398,\"max\":1414548234}},{\"name\":\"wiqzbqjvsovmyo\",\"capacity\":{\"min\":1778259828,\"max\":1882721753}},{\"name\":\"spkwlhzdobpxjm\",\"capacity\":{\"min\":288850807,\"max\":967687966}}]}},\"userProfile\":{\"preferredEmail\":\"nchrkcciww\"},\"networkProfile\":{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"rsa\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"uo\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"ghsauuimjmvxied\"},{\"privateIPAddress\":\"gidyjrrf\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"svexcsonpclhoco\"},{\"privateIPAddress\":\"lkevle\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"buhfmvfaxkffeiit\"},{\"privateIPAddress\":\"vmezy\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"mzsb\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"ggi\"}},\"autoUpgradeProfile\":{\"upgradeChannel\":\"xwburvjxxjns\"},\"nginxAppProtect\":{\"webApplicationFirewallSettings\":{\"activationState\":\"Enabled\"}}}") .toObject(NginxDeploymentUpdateProperties.class); - Assertions.assertEquals(false, model.enableDiagnosticsSupport()); - Assertions.assertEquals("ekqvkeln", model.logging().storageAccount().accountName()); - Assertions.assertEquals("vbxwyjsflhh", model.logging().storageAccount().containerName()); - Assertions.assertEquals(290339428, model.scalingProperties().capacity()); - Assertions.assertEquals("ixisxyawjoy", model.scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(628335164, model.scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1772436776, model.scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("apnyiropuhpig", model.userProfile().preferredEmail()); - Assertions.assertEquals("qgitxmed", + Assertions.assertFalse(model.enableDiagnosticsSupport()); + Assertions.assertEquals("t", model.logging().storageAccount().accountName()); + Assertions.assertEquals("n", model.logging().storageAccount().containerName()); + Assertions.assertEquals(63177450, model.scalingProperties().capacity()); + Assertions.assertEquals("bczw", model.scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1309614398, model.scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(1414548234, model.scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("nchrkcciww", model.userProfile().preferredEmail()); + Assertions.assertEquals("rsa", model.networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("lynqwwncwzzh", + Assertions.assertEquals("uo", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("rmgucnap", + Assertions.assertEquals("ghsauuimjmvxied", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("oellwp", model.networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals("d", model.autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("ggi", model.networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertEquals("xwburvjxxjns", model.autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals(ActivationState.ENABLED, model.nginxAppProtect().webApplicationFirewallSettings().activationState()); } @@ -57,51 +57,58 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { NginxDeploymentUpdateProperties model = new NginxDeploymentUpdateProperties().withEnableDiagnosticsSupport(false) - .withLogging(new NginxLogging().withStorageAccount( - new NginxStorageAccount().withAccountName("ekqvkeln").withContainerName("vbxwyjsflhh"))) - .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(290339428) + .withLogging(new NginxLogging() + .withStorageAccount(new NginxStorageAccount().withAccountName("t").withContainerName("n"))) + .withScalingProperties(new NginxDeploymentScalingProperties().withCapacity(63177450) .withProfiles(Arrays.asList( - new ScaleProfile().withName("ixisxyawjoy") - .withCapacity(new ScaleProfileCapacity().withMin(628335164).withMax(1772436776)), - new ScaleProfile().withName("slyjpkiid") - .withCapacity(new ScaleProfileCapacity().withMin(983085062).withMax(787836165)), - new ScaleProfile().withName("xznelixhnrztf") - .withCapacity(new ScaleProfileCapacity().withMin(1975568377).withMax(434458515)), - new ScaleProfile().withName("bnxknalaulppg") - .withCapacity(new ScaleProfileCapacity().withMin(1784168921).withMax(1987785731))))) - .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("apnyiropuhpig")) + new ScaleProfile().withName("bczw") + .withCapacity(new ScaleProfileCapacity().withMin(1309614398).withMax(1414548234)), + new ScaleProfile().withName("wiqzbqjvsovmyo") + .withCapacity(new ScaleProfileCapacity().withMin(1778259828).withMax(1882721753)), + new ScaleProfile().withName("spkwlhzdobpxjm") + .withCapacity(new ScaleProfileCapacity().withMin(288850807).withMax(967687966))))) + .withUserProfile(new NginxDeploymentUserProfile().withPreferredEmail("nchrkcciww")) .withNetworkProfile(new NginxNetworkProfile() .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("qgitxmed"))) - .withPrivateIpAddresses( - Arrays.asList(new NginxPrivateIpAddress().withPrivateIpAddress("lynqwwncwzzh") + .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("rsa"))) + .withPrivateIpAddresses(Arrays.asList( + new NginxPrivateIpAddress().withPrivateIpAddress("uo") .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("rmgucnap")))) - .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("oellwp"))) - .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("d")) + .withSubnetId("ghsauuimjmvxied"), + new NginxPrivateIpAddress().withPrivateIpAddress("gidyjrrf") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("svexcsonpclhoco"), + new NginxPrivateIpAddress().withPrivateIpAddress("lkevle") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("buhfmvfaxkffeiit"), + new NginxPrivateIpAddress().withPrivateIpAddress("vmezy") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("mzsb")))) + .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("ggi"))) + .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("xwburvjxxjns")) .withNginxAppProtect( new NginxDeploymentUpdatePropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED))); + new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED))); model = BinaryData.fromObject(model).toObject(NginxDeploymentUpdateProperties.class); - Assertions.assertEquals(false, model.enableDiagnosticsSupport()); - Assertions.assertEquals("ekqvkeln", model.logging().storageAccount().accountName()); - Assertions.assertEquals("vbxwyjsflhh", model.logging().storageAccount().containerName()); - Assertions.assertEquals(290339428, model.scalingProperties().capacity()); - Assertions.assertEquals("ixisxyawjoy", model.scalingProperties().profiles().get(0).name()); - Assertions.assertEquals(628335164, model.scalingProperties().profiles().get(0).capacity().min()); - Assertions.assertEquals(1772436776, model.scalingProperties().profiles().get(0).capacity().max()); - Assertions.assertEquals("apnyiropuhpig", model.userProfile().preferredEmail()); - Assertions.assertEquals("qgitxmed", + Assertions.assertFalse(model.enableDiagnosticsSupport()); + Assertions.assertEquals("t", model.logging().storageAccount().accountName()); + Assertions.assertEquals("n", model.logging().storageAccount().containerName()); + Assertions.assertEquals(63177450, model.scalingProperties().capacity()); + Assertions.assertEquals("bczw", model.scalingProperties().profiles().get(0).name()); + Assertions.assertEquals(1309614398, model.scalingProperties().profiles().get(0).capacity().min()); + Assertions.assertEquals(1414548234, model.scalingProperties().profiles().get(0).capacity().max()); + Assertions.assertEquals("nchrkcciww", model.userProfile().preferredEmail()); + Assertions.assertEquals("rsa", model.networkProfile().frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("lynqwwncwzzh", + Assertions.assertEquals("uo", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("rmgucnap", + Assertions.assertEquals("ghsauuimjmvxied", model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("oellwp", model.networkProfile().networkInterfaceConfiguration().subnetId()); - Assertions.assertEquals("d", model.autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals(ActivationState.DISABLED, + Assertions.assertEquals("ggi", model.networkProfile().networkInterfaceConfiguration().subnetId()); + Assertions.assertEquals("xwburvjxxjns", model.autoUpgradeProfile().upgradeChannel()); + Assertions.assertEquals(ActivationState.ENABLED, model.nginxAppProtect().webApplicationFirewallSettings().activationState()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUserProfileTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUserProfileTests.java index 0cc2e6e23492..cb150acefba0 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUserProfileTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUserProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,14 +12,14 @@ public final class NginxDeploymentUserProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxDeploymentUserProfile model - = BinaryData.fromString("{\"preferredEmail\":\"mdua\"}").toObject(NginxDeploymentUserProfile.class); - Assertions.assertEquals("mdua", model.preferredEmail()); + = BinaryData.fromString("{\"preferredEmail\":\"xkrxdqmi\"}").toObject(NginxDeploymentUserProfile.class); + Assertions.assertEquals("xkrxdqmi", model.preferredEmail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxDeploymentUserProfile model = new NginxDeploymentUserProfile().withPreferredEmail("mdua"); + NginxDeploymentUserProfile model = new NginxDeploymentUserProfile().withPreferredEmail("xkrxdqmi"); model = BinaryData.fromObject(model).toObject(NginxDeploymentUserProfile.class); - Assertions.assertEquals("mdua", model.preferredEmail()); + Assertions.assertEquals("xkrxdqmi", model.preferredEmail()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxFrontendIpConfigurationTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxFrontendIpConfigurationTests.java index 416241c88f85..1081c1f10937 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxFrontendIpConfigurationTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxFrontendIpConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -16,27 +16,39 @@ public final class NginxFrontendIpConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxFrontendIpConfiguration model = BinaryData.fromString( - "{\"publicIPAddresses\":[{\"id\":\"lo\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"yfjfcnjbkcn\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"ttkphywpnvjtoqne\"}]}") + "{\"publicIPAddresses\":[{\"id\":\"bl\"},{\"id\":\"gpbtoqcjmklj\"},{\"id\":\"bqidtqaj\"},{\"id\":\"ulpkudjkrl\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"hfepgzgqex\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"xscpaierhhbc\"},{\"privateIPAddress\":\"l\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"jtjaodxobnbdxkq\"},{\"privateIPAddress\":\"okaj\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"imexgstxgcpodgma\"},{\"privateIPAddress\":\"r\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"wzrlovmclwhij\"}]}") .toObject(NginxFrontendIpConfiguration.class); - Assertions.assertEquals("lo", model.publicIpAddresses().get(0).id()); - Assertions.assertEquals("yfjfcnjbkcn", model.privateIpAddresses().get(0).privateIpAddress()); + Assertions.assertEquals("bl", model.publicIpAddresses().get(0).id()); + Assertions.assertEquals("hfepgzgqex", model.privateIpAddresses().get(0).privateIpAddress()); Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("ttkphywpnvjtoqne", model.privateIpAddresses().get(0).subnetId()); + Assertions.assertEquals("xscpaierhhbc", model.privateIpAddresses().get(0).subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxFrontendIpConfiguration model = new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("lo"))) - .withPrivateIpAddresses(Arrays.asList(new NginxPrivateIpAddress().withPrivateIpAddress("yfjfcnjbkcn") - .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("ttkphywpnvjtoqne"))); + .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("bl"), + new NginxPublicIpAddress().withId("gpbtoqcjmklj"), new NginxPublicIpAddress().withId("bqidtqaj"), + new NginxPublicIpAddress().withId("ulpkudjkrl"))) + .withPrivateIpAddresses(Arrays.asList( + new NginxPrivateIpAddress().withPrivateIpAddress("hfepgzgqex") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("xscpaierhhbc"), + new NginxPrivateIpAddress().withPrivateIpAddress("l") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("jtjaodxobnbdxkq"), + new NginxPrivateIpAddress().withPrivateIpAddress("okaj") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("imexgstxgcpodgma"), + new NginxPrivateIpAddress().withPrivateIpAddress("r") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) + .withSubnetId("wzrlovmclwhij"))); model = BinaryData.fromObject(model).toObject(NginxFrontendIpConfiguration.class); - Assertions.assertEquals("lo", model.publicIpAddresses().get(0).id()); - Assertions.assertEquals("yfjfcnjbkcn", model.privateIpAddresses().get(0).privateIpAddress()); + Assertions.assertEquals("bl", model.publicIpAddresses().get(0).id()); + Assertions.assertEquals("hfepgzgqex", model.privateIpAddresses().get(0).privateIpAddress()); Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("ttkphywpnvjtoqne", model.privateIpAddresses().get(0).subnetId()); + Assertions.assertEquals("xscpaierhhbc", model.privateIpAddresses().get(0).subnetId()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxLoggingTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxLoggingTests.java index 9ddf45bba3c8..04bde3d556fa 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxLoggingTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxLoggingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -13,18 +13,18 @@ public final class NginxLoggingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxLogging model = BinaryData - .fromString("{\"storageAccount\":{\"accountName\":\"ywpmueefjzwfqkq\",\"containerName\":\"ids\"}}") + .fromString("{\"storageAccount\":{\"accountName\":\"ocjjxhvpmouexh\",\"containerName\":\"xibqeojnx\"}}") .toObject(NginxLogging.class); - Assertions.assertEquals("ywpmueefjzwfqkq", model.storageAccount().accountName()); - Assertions.assertEquals("ids", model.storageAccount().containerName()); + Assertions.assertEquals("ocjjxhvpmouexh", model.storageAccount().accountName()); + Assertions.assertEquals("xibqeojnx", model.storageAccount().containerName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxLogging model = new NginxLogging() - .withStorageAccount(new NginxStorageAccount().withAccountName("ywpmueefjzwfqkq").withContainerName("ids")); + NginxLogging model = new NginxLogging().withStorageAccount( + new NginxStorageAccount().withAccountName("ocjjxhvpmouexh").withContainerName("xibqeojnx")); model = BinaryData.fromObject(model).toObject(NginxLogging.class); - Assertions.assertEquals("ywpmueefjzwfqkq", model.storageAccount().accountName()); - Assertions.assertEquals("ids", model.storageAccount().containerName()); + Assertions.assertEquals("ocjjxhvpmouexh", model.storageAccount().accountName()); + Assertions.assertEquals("xibqeojnx", model.storageAccount().containerName()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkInterfaceConfigurationTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkInterfaceConfigurationTests.java index 037c0e63912f..8e3519d18181 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkInterfaceConfigurationTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkInterfaceConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,14 +12,14 @@ public final class NginxNetworkInterfaceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxNetworkInterfaceConfiguration model - = BinaryData.fromString("{\"subnetId\":\"zq\"}").toObject(NginxNetworkInterfaceConfiguration.class); - Assertions.assertEquals("zq", model.subnetId()); + = BinaryData.fromString("{\"subnetId\":\"pg\"}").toObject(NginxNetworkInterfaceConfiguration.class); + Assertions.assertEquals("pg", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxNetworkInterfaceConfiguration model = new NginxNetworkInterfaceConfiguration().withSubnetId("zq"); + NginxNetworkInterfaceConfiguration model = new NginxNetworkInterfaceConfiguration().withSubnetId("pg"); model = BinaryData.fromObject(model).toObject(NginxNetworkInterfaceConfiguration.class); - Assertions.assertEquals("zq", model.subnetId()); + Assertions.assertEquals("pg", model.subnetId()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkProfileTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkProfileTests.java index aeffee86d390..289e518af218 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkProfileTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxNetworkProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -18,40 +18,37 @@ public final class NginxNetworkProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxNetworkProfile model = BinaryData.fromString( - "{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"baumnyqupedeoj\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"khsmtxpsiebt\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"esap\"},{\"privateIPAddress\":\"rdqmhjjdhtldwkyz\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"kn\"},{\"privateIPAddress\":\"scwsv\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"ogtwrupqsxvnmi\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"vce\"}}") + "{\"frontEndIPConfiguration\":{\"publicIPAddresses\":[{\"id\":\"lnrosfqp\"},{\"id\":\"ehzzvypyqrim\"},{\"id\":\"npvswjdkirso\"}],\"privateIPAddresses\":[{\"privateIPAddress\":\"hc\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"hjtckwhd\"},{\"privateIPAddress\":\"ifiyipjxsqwpgrj\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"rcjxvsnbyxqabn\"}]},\"networkInterfaceConfiguration\":{\"subnetId\":\"pcyshu\"}}") .toObject(NginxNetworkProfile.class); - Assertions.assertEquals("baumnyqupedeoj", model.frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("khsmtxpsiebt", - model.frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); - Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, + Assertions.assertEquals("lnrosfqp", model.frontEndIpConfiguration().publicIpAddresses().get(0).id()); + Assertions.assertEquals("hc", model.frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); + Assertions.assertEquals(NginxPrivateIpAllocationMethod.STATIC, model.frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("esap", model.frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("vce", model.networkInterfaceConfiguration().subnetId()); + Assertions.assertEquals("hjtckwhd", model.frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); + Assertions.assertEquals("pcyshu", model.networkInterfaceConfiguration().subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxNetworkProfile model = new NginxNetworkProfile() .withFrontEndIpConfiguration(new NginxFrontendIpConfiguration() - .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("baumnyqupedeoj"))) + .withPublicIpAddresses(Arrays.asList(new NginxPublicIpAddress().withId("lnrosfqp"), + new NginxPublicIpAddress().withId("ehzzvypyqrim"), + new NginxPublicIpAddress().withId("npvswjdkirso"))) .withPrivateIpAddresses(Arrays.asList( - new NginxPrivateIpAddress().withPrivateIpAddress("khsmtxpsiebt") - .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("esap"), - new NginxPrivateIpAddress().withPrivateIpAddress("rdqmhjjdhtldwkyz") + new NginxPrivateIpAddress().withPrivateIpAddress("hc") .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) - .withSubnetId("kn"), - new NginxPrivateIpAddress().withPrivateIpAddress("scwsv") + .withSubnetId("hjtckwhd"), + new NginxPrivateIpAddress().withPrivateIpAddress("ifiyipjxsqwpgrj") .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) - .withSubnetId("ogtwrupqsxvnmi")))) - .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("vce")); + .withSubnetId("rcjxvsnbyxqabn")))) + .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("pcyshu")); model = BinaryData.fromObject(model).toObject(NginxNetworkProfile.class); - Assertions.assertEquals("baumnyqupedeoj", model.frontEndIpConfiguration().publicIpAddresses().get(0).id()); - Assertions.assertEquals("khsmtxpsiebt", - model.frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); - Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, + Assertions.assertEquals("lnrosfqp", model.frontEndIpConfiguration().publicIpAddresses().get(0).id()); + Assertions.assertEquals("hc", model.frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAddress()); + Assertions.assertEquals(NginxPrivateIpAllocationMethod.STATIC, model.frontEndIpConfiguration().privateIpAddresses().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("esap", model.frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); - Assertions.assertEquals("vce", model.networkInterfaceConfiguration().subnetId()); + Assertions.assertEquals("hjtckwhd", model.frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); + Assertions.assertEquals("pcyshu", model.networkInterfaceConfiguration().subnetId()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPrivateIpAddressTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPrivateIpAddressTests.java index 0eab114b6199..25360ca8cc7c 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPrivateIpAddressTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPrivateIpAddressTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,23 +12,22 @@ public final class NginxPrivateIpAddressTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NginxPrivateIpAddress model = BinaryData - .fromString( - "{\"privateIPAddress\":\"hoxus\",\"privateIPAllocationMethod\":\"Static\",\"subnetId\":\"bgyepsbj\"}") + NginxPrivateIpAddress model = BinaryData.fromString( + "{\"privateIPAddress\":\"fkgukdkexxppof\",\"privateIPAllocationMethod\":\"Dynamic\",\"subnetId\":\"c\"}") .toObject(NginxPrivateIpAddress.class); - Assertions.assertEquals("hoxus", model.privateIpAddress()); - Assertions.assertEquals(NginxPrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("bgyepsbj", model.subnetId()); + Assertions.assertEquals("fkgukdkexxppof", model.privateIpAddress()); + Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.privateIpAllocationMethod()); + Assertions.assertEquals("c", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxPrivateIpAddress model = new NginxPrivateIpAddress().withPrivateIpAddress("hoxus") - .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.STATIC) - .withSubnetId("bgyepsbj"); + NginxPrivateIpAddress model = new NginxPrivateIpAddress().withPrivateIpAddress("fkgukdkexxppof") + .withPrivateIpAllocationMethod(NginxPrivateIpAllocationMethod.DYNAMIC) + .withSubnetId("c"); model = BinaryData.fromObject(model).toObject(NginxPrivateIpAddress.class); - Assertions.assertEquals("hoxus", model.privateIpAddress()); - Assertions.assertEquals(NginxPrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("bgyepsbj", model.subnetId()); + Assertions.assertEquals("fkgukdkexxppof", model.privateIpAddress()); + Assertions.assertEquals(NginxPrivateIpAllocationMethod.DYNAMIC, model.privateIpAllocationMethod()); + Assertions.assertEquals("c", model.subnetId()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPublicIpAddressTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPublicIpAddressTests.java index b6170375f169..03ccd9e4a044 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPublicIpAddressTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxPublicIpAddressTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -11,14 +11,15 @@ public final class NginxPublicIpAddressTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NginxPublicIpAddress model = BinaryData.fromString("{\"id\":\"clfp\"}").toObject(NginxPublicIpAddress.class); - Assertions.assertEquals("clfp", model.id()); + NginxPublicIpAddress model + = BinaryData.fromString("{\"id\":\"ejctbzaqsqsycb\"}").toObject(NginxPublicIpAddress.class); + Assertions.assertEquals("ejctbzaqsqsycb", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NginxPublicIpAddress model = new NginxPublicIpAddress().withId("clfp"); + NginxPublicIpAddress model = new NginxPublicIpAddress().withId("ejctbzaqsqsycb"); model = BinaryData.fromObject(model).toObject(NginxPublicIpAddress.class); - Assertions.assertEquals("clfp", model.id()); + Assertions.assertEquals("ejctbzaqsqsycb", model.id()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxStorageAccountTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxStorageAccountTests.java index f5484edbdb6b..d4100f2dfd30 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxStorageAccountTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxStorageAccountTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,18 +12,18 @@ public final class NginxStorageAccountTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NginxStorageAccount model - = BinaryData.fromString("{\"accountName\":\"onobglaocqx\",\"containerName\":\"cmgyud\"}") + = BinaryData.fromString("{\"accountName\":\"zvddntwndeicbtwn\",\"containerName\":\"aoqvuh\"}") .toObject(NginxStorageAccount.class); - Assertions.assertEquals("onobglaocqx", model.accountName()); - Assertions.assertEquals("cmgyud", model.containerName()); + Assertions.assertEquals("zvddntwndeicbtwn", model.accountName()); + Assertions.assertEquals("aoqvuh", model.containerName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NginxStorageAccount model - = new NginxStorageAccount().withAccountName("onobglaocqx").withContainerName("cmgyud"); + = new NginxStorageAccount().withAccountName("zvddntwndeicbtwn").withContainerName("aoqvuh"); model = BinaryData.fromObject(model).toObject(NginxStorageAccount.class); - Assertions.assertEquals("onobglaocqx", model.accountName()); - Assertions.assertEquals("cmgyud", model.containerName()); + Assertions.assertEquals("zvddntwndeicbtwn", model.accountName()); + Assertions.assertEquals("aoqvuh", model.containerName()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationDisplayTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationDisplayTests.java index f44f68e27222..b3fffa025c6f 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationDisplayTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationDisplayTests.java @@ -1,35 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.nginx.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"baaa\",\"resource\":\"yvayffimrzr\",\"operation\":\"zqogse\",\"description\":\"evfdnwnwm\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); - Assertions.assertEquals("baaa", model.provider()); - Assertions.assertEquals("yvayffimrzr", model.resource()); - Assertions.assertEquals("zqogse", model.operation()); - Assertions.assertEquals("evfdnwnwm", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("baaa") - .withResource("yvayffimrzr") - .withOperation("zqogse") - .withDescription("evfdnwnwm"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("baaa", model.provider()); - Assertions.assertEquals("yvayffimrzr", model.resource()); - Assertions.assertEquals("zqogse", model.operation()); - Assertions.assertEquals("evfdnwnwm", model.description()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationInnerTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationInnerTests.java new file mode 100644 index 000000000000..70a272f496d9 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.nginx.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.nginx.fluent.models.OperationInner; + +public final class OperationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationInner model = BinaryData.fromString( + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + .toObject(OperationInner.class); + } +} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationListResultTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationListResultTests.java index 1a346e8a48ab..b5a8e309dc3d 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationListResultTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationListResultTests.java @@ -1,60 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; -import com.azure.resourcemanager.nginx.models.OperationDisplay; -import com.azure.resourcemanager.nginx.models.OperationListResult; -import java.util.Arrays; +import com.azure.resourcemanager.nginx.implementation.models.OperationListResult; import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"kkfoqr\",\"display\":{\"provider\":\"kzikfjawneaivxwc\",\"resource\":\"lpcirelsf\",\"operation\":\"enwabfatk\",\"description\":\"dxbjhwuaanozj\"},\"isDataAction\":false},{\"name\":\"youlp\",\"display\":{\"provider\":\"xagl\",\"resource\":\"imjwosyt\",\"operation\":\"tcs\",\"description\":\"cktqumiekkezzi\"},\"isDataAction\":false},{\"name\":\"fjhdg\",\"display\":{\"provider\":\"ebdunyg\",\"resource\":\"qidbqfatpxllrxcy\",\"operation\":\"oadsuvar\",\"description\":\"wdmjsjqbjhhyx\"},\"isDataAction\":true}],\"nextLink\":\"yc\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("kkfoqr", model.value().get(0).name()); - Assertions.assertEquals("kzikfjawneaivxwc", model.value().get(0).display().provider()); - Assertions.assertEquals("lpcirelsf", model.value().get(0).display().resource()); - Assertions.assertEquals("enwabfatk", model.value().get(0).display().operation()); - Assertions.assertEquals("dxbjhwuaanozj", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("yc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationResultInner().withName("kkfoqr") - .withDisplay(new OperationDisplay().withProvider("kzikfjawneaivxwc") - .withResource("lpcirelsf") - .withOperation("enwabfatk") - .withDescription("dxbjhwuaanozj")) - .withIsDataAction(false), - new OperationResultInner().withName("youlp") - .withDisplay(new OperationDisplay().withProvider("xagl") - .withResource("imjwosyt") - .withOperation("tcs") - .withDescription("cktqumiekkezzi")) - .withIsDataAction(false), - new OperationResultInner().withName("fjhdg") - .withDisplay(new OperationDisplay().withProvider("ebdunyg") - .withResource("qidbqfatpxllrxcy") - .withOperation("oadsuvar") - .withDescription("wdmjsjqbjhhyx")) - .withIsDataAction(true))) - .withNextLink("yc"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("kkfoqr", model.value().get(0).name()); - Assertions.assertEquals("kzikfjawneaivxwc", model.value().get(0).display().provider()); - Assertions.assertEquals("lpcirelsf", model.value().get(0).display().resource()); - Assertions.assertEquals("enwabfatk", model.value().get(0).display().operation()); - Assertions.assertEquals("dxbjhwuaanozj", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("yc", model.nextLink()); + Assertions.assertEquals("kfo", model.nextLink()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationResultInnerTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationResultInnerTests.java deleted file mode 100644 index e0e5946049b8..000000000000 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationResultInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.nginx.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.nginx.fluent.models.OperationResultInner; -import com.azure.resourcemanager.nginx.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResultInner model = BinaryData.fromString( - "{\"name\":\"uhpkxkgymar\",\"display\":{\"provider\":\"ajxq\",\"resource\":\"jhkycub\",\"operation\":\"dgssofwqmzqal\",\"description\":\"mnjijpxacqqudf\"},\"isDataAction\":true}") - .toObject(OperationResultInner.class); - Assertions.assertEquals("uhpkxkgymar", model.name()); - Assertions.assertEquals("ajxq", model.display().provider()); - Assertions.assertEquals("jhkycub", model.display().resource()); - Assertions.assertEquals("dgssofwqmzqal", model.display().operation()); - Assertions.assertEquals("mnjijpxacqqudf", model.display().description()); - Assertions.assertEquals(true, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInner model = new OperationResultInner().withName("uhpkxkgymar") - .withDisplay(new OperationDisplay().withProvider("ajxq") - .withResource("jhkycub") - .withOperation("dgssofwqmzqal") - .withDescription("mnjijpxacqqudf")) - .withIsDataAction(true); - model = BinaryData.fromObject(model).toObject(OperationResultInner.class); - Assertions.assertEquals("uhpkxkgymar", model.name()); - Assertions.assertEquals("ajxq", model.display().provider()); - Assertions.assertEquals("jhkycub", model.display().resource()); - Assertions.assertEquals("dgssofwqmzqal", model.display().operation()); - Assertions.assertEquals("mnjijpxacqqudf", model.display().description()); - Assertions.assertEquals(true, model.isDataAction()); - } -} diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationsListMockTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationsListMockTests.java index 5ab6459243d2..4639b2351436 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationsListMockTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -11,10 +11,9 @@ import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.nginx.NginxManager; -import com.azure.resourcemanager.nginx.models.OperationResult; +import com.azure.resourcemanager.nginx.models.Operation; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -22,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"cjdx\",\"display\":{\"provider\":\"zoggculapz\",\"resource\":\"rpgogtqxep\",\"operation\":\"lbfu\",\"description\":\"lyjt\"},\"isDataAction\":false}]}"; + = "{\"value\":[{\"name\":\"uvarmywdmjsjq\",\"isDataAction\":false,\"display\":{\"provider\":\"x\",\"resource\":\"wlycoduhpkxkg\",\"operation\":\"areqna\",\"description\":\"qugjhkycube\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,13 +30,7 @@ public void testList() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("cjdx", response.iterator().next().name()); - Assertions.assertEquals("zoggculapz", response.iterator().next().display().provider()); - Assertions.assertEquals("rpgogtqxep", response.iterator().next().display().resource()); - Assertions.assertEquals("lbfu", response.iterator().next().display().operation()); - Assertions.assertEquals("lyjt", response.iterator().next().display().description()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ResourceSkuTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ResourceSkuTests.java index 9f31ae165a0a..4621d73ffdf1 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ResourceSkuTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ResourceSkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -11,14 +11,14 @@ public final class ResourceSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceSku model = BinaryData.fromString("{\"name\":\"jdauwhvy\"}").toObject(ResourceSku.class); - Assertions.assertEquals("jdauwhvy", model.name()); + ResourceSku model = BinaryData.fromString("{\"name\":\"mcy\"}").toObject(ResourceSku.class); + Assertions.assertEquals("mcy", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceSku model = new ResourceSku().withName("jdauwhvy"); + ResourceSku model = new ResourceSku().withName("mcy"); model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals("jdauwhvy", model.name()); + Assertions.assertEquals("mcy", model.name()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileCapacityTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileCapacityTests.java index 12bedc8b1b30..6eb80f1bbf29 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileCapacityTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileCapacityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,16 +12,16 @@ public final class ScaleProfileCapacityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScaleProfileCapacity model - = BinaryData.fromString("{\"min\":1520620796,\"max\":14767496}").toObject(ScaleProfileCapacity.class); - Assertions.assertEquals(1520620796, model.min()); - Assertions.assertEquals(14767496, model.max()); + = BinaryData.fromString("{\"min\":860275212,\"max\":1706248091}").toObject(ScaleProfileCapacity.class); + Assertions.assertEquals(860275212, model.min()); + Assertions.assertEquals(1706248091, model.max()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScaleProfileCapacity model = new ScaleProfileCapacity().withMin(1520620796).withMax(14767496); + ScaleProfileCapacity model = new ScaleProfileCapacity().withMin(860275212).withMax(1706248091); model = BinaryData.fromObject(model).toObject(ScaleProfileCapacity.class); - Assertions.assertEquals(1520620796, model.min()); - Assertions.assertEquals(14767496, model.max()); + Assertions.assertEquals(860275212, model.min()); + Assertions.assertEquals(1706248091, model.max()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileTests.java index 3d21800efb3e..d0d9d91ca564 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/ScaleProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -13,20 +13,20 @@ public final class ScaleProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScaleProfile model - = BinaryData.fromString("{\"name\":\"qkrhahvljua\",\"capacity\":{\"min\":1935710102,\"max\":836090349}}") + = BinaryData.fromString("{\"name\":\"hrzayvvtpgvdf\",\"capacity\":{\"min\":723087340,\"max\":1330318957}}") .toObject(ScaleProfile.class); - Assertions.assertEquals("qkrhahvljua", model.name()); - Assertions.assertEquals(1935710102, model.capacity().min()); - Assertions.assertEquals(836090349, model.capacity().max()); + Assertions.assertEquals("hrzayvvtpgvdf", model.name()); + Assertions.assertEquals(723087340, model.capacity().min()); + Assertions.assertEquals(1330318957, model.capacity().max()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScaleProfile model = new ScaleProfile().withName("qkrhahvljua") - .withCapacity(new ScaleProfileCapacity().withMin(1935710102).withMax(836090349)); + ScaleProfile model = new ScaleProfile().withName("hrzayvvtpgvdf") + .withCapacity(new ScaleProfileCapacity().withMin(723087340).withMax(1330318957)); model = BinaryData.fromObject(model).toObject(ScaleProfile.class); - Assertions.assertEquals("qkrhahvljua", model.name()); - Assertions.assertEquals(1935710102, model.capacity().min()); - Assertions.assertEquals(836090349, model.capacity().max()); + Assertions.assertEquals("hrzayvvtpgvdf", model.name()); + Assertions.assertEquals(723087340, model.capacity().min()); + Assertions.assertEquals(1330318957, model.capacity().max()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/UserIdentityPropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/UserIdentityPropertiesTests.java index c64eba4aab03..212537e65f4c 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/UserIdentityPropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/UserIdentityPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -11,7 +11,7 @@ public final class UserIdentityPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UserIdentityProperties model - = BinaryData.fromString("{\"principalId\":\"rbnlankxmyskp\",\"clientId\":\"enbtkcxywny\"}") + = BinaryData.fromString("{\"principalId\":\"hejjz\",\"clientId\":\"dudgwdslfhot\"}") .toObject(UserIdentityProperties.class); } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallComponentVersionsTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallComponentVersionsTests.java index bf0c8a0df2f0..219f58a99fcb 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallComponentVersionsTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallComponentVersionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -12,19 +12,9 @@ public final class WebApplicationFirewallComponentVersionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebApplicationFirewallComponentVersions model - = BinaryData.fromString("{\"wafEngineVersion\":\"ni\",\"wafNginxVersion\":\"kxfbkpycgklwndn\"}") + = BinaryData.fromString("{\"wafEngineVersion\":\"njampm\",\"wafNginxVersion\":\"gnzscxaqwo\"}") .toObject(WebApplicationFirewallComponentVersions.class); - Assertions.assertEquals("ni", model.wafEngineVersion()); - Assertions.assertEquals("kxfbkpycgklwndn", model.wafNginxVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebApplicationFirewallComponentVersions model - = new WebApplicationFirewallComponentVersions().withWafEngineVersion("ni") - .withWafNginxVersion("kxfbkpycgklwndn"); - model = BinaryData.fromObject(model).toObject(WebApplicationFirewallComponentVersions.class); - Assertions.assertEquals("ni", model.wafEngineVersion()); - Assertions.assertEquals("kxfbkpycgklwndn", model.wafNginxVersion()); + Assertions.assertEquals("njampm", model.wafEngineVersion()); + Assertions.assertEquals("gnzscxaqwo", model.wafNginxVersion()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallPackageTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallPackageTests.java index b7f2bbec8eda..3ed8725c3b00 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallPackageTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallPackageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; @@ -13,18 +13,9 @@ public final class WebApplicationFirewallPackageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebApplicationFirewallPackage model - = BinaryData.fromString("{\"version\":\"nrjawgqwg\",\"revisionDatetime\":\"2021-10-10T15:46:25Z\"}") + = BinaryData.fromString("{\"version\":\"jfeallnwsub\",\"revisionDatetime\":\"2021-03-05T06:08:28Z\"}") .toObject(WebApplicationFirewallPackage.class); - Assertions.assertEquals("nrjawgqwg", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T15:46:25Z"), model.revisionDatetime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebApplicationFirewallPackage model = new WebApplicationFirewallPackage().withVersion("nrjawgqwg") - .withRevisionDatetime(OffsetDateTime.parse("2021-10-10T15:46:25Z")); - model = BinaryData.fromObject(model).toObject(WebApplicationFirewallPackage.class); - Assertions.assertEquals("nrjawgqwg", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T15:46:25Z"), model.revisionDatetime()); + Assertions.assertEquals("jfeallnwsub", model.version()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-05T06:08:28Z"), model.revisionDatetime()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallSettingsTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallSettingsTests.java index 57b830c17692..0975e1277999 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallSettingsTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallStatusTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallStatusTests.java index 291c374286cf..56ac407ca2f7 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallStatusTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/WebApplicationFirewallStatusTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.nginx.models.WebApplicationFirewallStatus; +import org.junit.jupiter.api.Assertions; public final class WebApplicationFirewallStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WebApplicationFirewallStatus model = BinaryData.fromString( - "{\"attackSignaturesPackage\":{\"version\":\"z\",\"revisionDatetime\":\"2021-06-30T00:10:41Z\"},\"botSignaturesPackage\":{\"version\":\"gicjooxdjeb\",\"revisionDatetime\":\"2021-10-10T15:28:34Z\"},\"threatCampaignsPackage\":{\"version\":\"cwwfvovbvme\",\"revisionDatetime\":\"2021-06-02T22:02:30Z\"},\"componentVersions\":{\"wafEngineVersion\":\"ivyhzceuojgjrwju\",\"wafNginxVersion\":\"iotwmcdytdxwit\"}}") + "{\"wafRelease\":\"oo\",\"attackSignaturesPackage\":{\"version\":\"xlzevgbmqjqabcy\",\"revisionDatetime\":\"2021-06-22T17:35:49Z\"},\"botSignaturesPackage\":{\"version\":\"vkwlzuvccfwnf\",\"revisionDatetime\":\"2021-10-07T10:36:49Z\"},\"threatCampaignsPackage\":{\"version\":\"cfionl\",\"revisionDatetime\":\"2021-03-20T17:28:20Z\"},\"componentVersions\":{\"wafEngineVersion\":\"etqgtzxdpnq\",\"wafNginxVersion\":\"qqwx\"}}") .toObject(WebApplicationFirewallStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebApplicationFirewallStatus model = new WebApplicationFirewallStatus(); - model = BinaryData.fromObject(model).toObject(WebApplicationFirewallStatus.class); + Assertions.assertEquals("oo", model.wafRelease()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml b/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml new file mode 100644 index 000000000000..874f27338079 --- /dev/null +++ b/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/nginx/Nginx.Management +commit: aae85aa3e7e4fda95ea2d3abac0ba1d8159db214 +repo: Azure/azure-rest-api-specs +additionalDirectories: From feaa9ab1a14db941aace3c5d99cdaa8dbbc4828b Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 10 Feb 2026 01:29:42 +0000 Subject: [PATCH 2/2] Configurations: 'specification/nginx/Nginx.Management/tspconfig.yaml', API Version: 2025-03-01-preview, SDK Release Type: beta, and CommitSHA: 'de8103ff8e94ea51c56bb22094ded5d2dfc45a6a' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5857234 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-resourcemanager-nginx/CHANGELOG.md | 71 +++++++++++-------- ...oymentUpdatePropertiesNginxAppProtect.java | 3 +- .../NginxDeploymentUpdateProperties.java | 39 +++++++--- .../nginx/models/OperationDisplay.java | 2 +- ...ourcemanager-nginx_apiview_properties.json | 2 +- .../azure-resourcemanager-nginx_metadata.json | 2 +- .../NginxDeploymentUpdateParametersTests.java | 10 ++- ...tUpdatePropertiesNginxAppProtectTests.java | 2 +- .../NginxDeploymentUpdatePropertiesTests.java | 12 ++-- .../tsp-location.yaml | 2 +- 10 files changed, 86 insertions(+), 59 deletions(-) rename sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/{ => fluent}/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java (96%) diff --git a/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md b/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md index f72ab4ff3095..30cd6b8a496d 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md +++ b/sdk/nginx/azure-resourcemanager-nginx/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.4 (2025-10-09) +## 1.1.0-beta.4 (2026-02-10) - Azure Resource Manager Nginx client library for Java. This package contains Microsoft Azure SDK for Nginx Management SDK. Package api-version 2025-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). @@ -18,6 +18,8 @@ #### `models.NginxDeploymentListResponse` was removed +#### `models.NginxDeploymentUpdatePropertiesNginxAppProtect` was removed + #### `models.UserIdentityProperties` was modified * `validate()` was removed @@ -40,15 +42,16 @@ #### `models.AnalysisDiagnostic` was modified -* `withRule(java.lang.String)` was removed -* `float line()` -> `double line()` -* `withFile(java.lang.String)` was removed -* `withDescription(java.lang.String)` was removed +* `AnalysisDiagnostic()` was changed to private access +* `withMessage(java.lang.String)` was removed * `validate()` was removed -* `withId(java.lang.String)` was removed * `withLine(float)` was removed -* `withMessage(java.lang.String)` was removed +* `withFile(java.lang.String)` was removed +* `withRule(java.lang.String)` was removed * `withDirective(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withId(java.lang.String)` was removed +* `float line()` -> `double line()` #### `models.NginxFrontendIpConfiguration` was modified @@ -60,11 +63,12 @@ #### `models.OperationDisplay` was modified -* `withResource(java.lang.String)` was removed -* `withOperation(java.lang.String)` was removed +* `OperationDisplay()` was changed to private access +* `withDescription(java.lang.String)` was removed * `withProvider(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed * `validate()` was removed -* `withDescription(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed #### `models.NginxDeploymentUserProfile` was modified @@ -72,21 +76,24 @@ #### `models.DiagnosticItem` was modified -* `withLine(float)` was removed +* `DiagnosticItem()` was changed to private access * `withMessage(java.lang.String)` was removed -* `withRule(java.lang.String)` was removed -* `withDescription(java.lang.String)` was removed +* `withLine(float)` was removed * `withLevel(models.Level)` was removed -* `withDirective(java.lang.String)` was removed -* `withCategory(java.lang.String)` was removed -* `validate()` was removed +* `float line()` -> `double line()` * `withFile(java.lang.String)` was removed +* `validate()` was removed * `withId(java.lang.String)` was removed -* `float line()` -> `double line()` +* `withRule(java.lang.String)` was removed +* `withDirective(java.lang.String)` was removed +* `withCategory(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed #### `models.NginxDeploymentUpdateProperties` was modified +* `nginxAppProtect()` was removed * `validate()` was removed +* `withNginxAppProtect(models.NginxDeploymentUpdatePropertiesNginxAppProtect)` was removed #### `models.NginxLogging` was modified @@ -114,9 +121,10 @@ #### `models.AnalysisResultData` was modified +* `AnalysisResultData()` was changed to private access * `validate()` was removed -* `withErrors(java.util.List)` was removed * `withDiagnostics(java.util.List)` was removed +* `withErrors(java.util.List)` was removed #### `models.NginxConfigurationRequestProperties` was modified @@ -128,11 +136,12 @@ #### `models.NginxConfigurationResponseProperties` was modified -* `withFiles(java.util.List)` was removed -* `withProtectedFiles(java.util.List)` was removed +* `NginxConfigurationResponseProperties()` was changed to private access * `validate()` was removed -* `withRootFile(java.lang.String)` was removed +* `withProtectedFiles(java.util.List)` was removed * `withPackageProperty(models.NginxConfigurationPackage)` was removed +* `withFiles(java.util.List)` was removed +* `withRootFile(java.lang.String)` was removed #### `models.IdentityProperties` was modified @@ -148,6 +157,7 @@ #### `models.NginxDeploymentApiKeyResponseProperties` was modified +* `NginxDeploymentApiKeyResponseProperties()` was changed to private access * `validate()` was removed * `withEndDateTime(java.time.OffsetDateTime)` was removed @@ -161,8 +171,9 @@ #### `models.WebApplicationFirewallComponentVersions` was modified -* `validate()` was removed +* `WebApplicationFirewallComponentVersions()` was changed to private access * `withWafEngineVersion(java.lang.String)` was removed +* `validate()` was removed * `withWafNginxVersion(java.lang.String)` was removed #### `models.NginxConfigurationProtectedFileRequest` was modified @@ -171,6 +182,7 @@ #### `models.WebApplicationFirewallStatus` was modified +* `WebApplicationFirewallStatus()` was changed to private access * `validate()` was removed #### `models.NginxPublicIpAddress` was modified @@ -187,9 +199,10 @@ #### `models.WebApplicationFirewallPackage` was modified -* `withVersion(java.lang.String)` was removed +* `WebApplicationFirewallPackage()` was changed to private access * `withRevisionDatetime(java.time.OffsetDateTime)` was removed * `validate()` was removed +* `withVersion(java.lang.String)` was removed #### `models.AutoUpgradeProfile` was modified @@ -199,18 +212,15 @@ * `validate()` was removed -#### `models.NginxDeploymentUpdatePropertiesNginxAppProtect` was modified - -* `validate()` was removed - #### `models.AnalysisCreate` was modified * `validate()` was removed #### `models.NginxConfigurationProtectedFileResponse` was modified -* `validate()` was removed +* `NginxConfigurationProtectedFileResponse()` was changed to private access * `withContentHash(java.lang.String)` was removed +* `validate()` was removed * `withVirtualPath(java.lang.String)` was removed #### `models.NginxDeploymentApiKeyRequestProperties` was modified @@ -257,6 +267,11 @@ * `models.DefaultWafPolicies` was added +#### `models.NginxDeploymentUpdateProperties` was modified + +* `withWebApplicationFirewallSettings(models.WebApplicationFirewallSettings)` was added +* `webApplicationFirewallSettings()` was added + #### `models.NginxDeploymentApiKeyRequest` was modified * `systemData()` was added diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java similarity index 96% rename from sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java rename to sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java index 9355cfb976ed..443508ee2937 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java @@ -2,13 +2,14 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.nginx.models; +package com.azure.resourcemanager.nginx.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.nginx.models.WebApplicationFirewallSettings; import java.io.IOException; /** diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java index d576ea5d2b28..972d5cad6b3a 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java @@ -9,6 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentUpdatePropertiesNginxAppProtect; import java.io.IOException; /** @@ -49,7 +50,7 @@ public final class NginxDeploymentUpdateProperties implements JsonSerializable { diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_apiview_properties.json b/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_apiview_properties.json index dd97af1c37b7..95715865acfb 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_apiview_properties.json +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_apiview_properties.json @@ -59,6 +59,7 @@ "com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner": "Nginx.NginxPlus.NginxDeploymentDefaultWafPolicyListResponse", "com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner": "Nginx.NginxPlus.NginxDeployment", "com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentScalingPropertiesAutoScaleSettings": "Nginx.NginxPlus.NginxDeploymentScalingPropertiesAutoScaleSettings", + "com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentUpdatePropertiesNginxAppProtect": "Nginx.NginxPlus.NginxDeploymentUpdatePropertiesNginxAppProtect", "com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner": "Nginx.NginxPlus.NginxDeploymentWafPolicy", "com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner": "Nginx.NginxPlus.NginxDeploymentWafPolicyMetadata", "com.azure.resourcemanager.nginx.fluent.models.OperationInner": "Azure.ResourceManager.CommonTypes.Operation", @@ -98,7 +99,6 @@ "com.azure.resourcemanager.nginx.models.NginxDeploymentScalingProperties": "Nginx.NginxPlus.NginxDeploymentScalingProperties", "com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters": "Nginx.NginxPlus.NginxDeploymentUpdateParameters", "com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateProperties": "Nginx.NginxPlus.NginxDeploymentUpdateProperties", - "com.azure.resourcemanager.nginx.models.NginxDeploymentUpdatePropertiesNginxAppProtect": "Nginx.NginxPlus.NginxDeploymentUpdatePropertiesNginxAppProtect", "com.azure.resourcemanager.nginx.models.NginxDeploymentUserProfile": "Nginx.NginxPlus.NginxDeploymentUserProfile", "com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyApplyingStatus": "Nginx.NginxPlus.NginxDeploymentWafPolicyApplyingStatus", "com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyApplyingStatusCode": "Nginx.NginxPlus.NginxDeploymentWafPolicyApplyingStatusCode", diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_metadata.json b/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_metadata.json index 366c96028649..e44c89f3e991 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_metadata.json +++ b/sdk/nginx/azure-resourcemanager-nginx/src/main/resources/META-INF/azure-resourcemanager-nginx_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2025-03-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.nginx.fluent.ApiKeysClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.createOrUpdate":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.createOrUpdateWithResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.delete":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.delete","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.deleteWithResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.delete","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.get":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.get","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.getWithResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.get","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.list":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.list","com.azure.resourcemanager.nginx.fluent.CertificatesClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.CertificatesClient.beginCreateOrUpdate":"Nginx.NginxPlus.NginxCertificates.createOrUpdate","com.azure.resourcemanager.nginx.fluent.CertificatesClient.beginDelete":"Nginx.NginxPlus.NginxCertificates.delete","com.azure.resourcemanager.nginx.fluent.CertificatesClient.createOrUpdate":"Nginx.NginxPlus.NginxCertificates.createOrUpdate","com.azure.resourcemanager.nginx.fluent.CertificatesClient.delete":"Nginx.NginxPlus.NginxCertificates.delete","com.azure.resourcemanager.nginx.fluent.CertificatesClient.get":"Nginx.NginxPlus.NginxCertificates.get","com.azure.resourcemanager.nginx.fluent.CertificatesClient.getWithResponse":"Nginx.NginxPlus.NginxCertificates.get","com.azure.resourcemanager.nginx.fluent.CertificatesClient.list":"Nginx.NginxPlus.NginxCertificates.list","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.analysis":"Nginx.NginxPlus.NginxConfigurationResponses.analysis","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.analysisWithResponse":"Nginx.NginxPlus.NginxConfigurationResponses.analysis","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.beginCreateOrUpdate":"Nginx.NginxPlus.NginxConfigurationResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.beginDelete":"Nginx.NginxPlus.NginxConfigurationResponses.delete","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.createOrUpdate":"Nginx.NginxPlus.NginxConfigurationResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.delete":"Nginx.NginxPlus.NginxConfigurationResponses.delete","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.get":"Nginx.NginxPlus.NginxConfigurationResponses.get","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.getWithResponse":"Nginx.NginxPlus.NginxConfigurationResponses.get","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.list":"Nginx.NginxPlus.NginxConfigurationResponses.list","com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient.list":"Nginx.NginxPlus.NginxDeployments.defaultWafPolicyList","com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient.listWithResponse":"Nginx.NginxPlus.NginxDeployments.defaultWafPolicyList","com.azure.resourcemanager.nginx.fluent.DeploymentsClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.beginCreateOrUpdate":"Nginx.NginxPlus.NginxDeployments.createOrUpdate","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.beginDelete":"Nginx.NginxPlus.NginxDeployments.delete","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.beginUpdate":"Nginx.NginxPlus.NginxDeployments.update","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.createOrUpdate":"Nginx.NginxPlus.NginxDeployments.createOrUpdate","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.delete":"Nginx.NginxPlus.NginxDeployments.delete","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.getByResourceGroup":"Nginx.NginxPlus.NginxDeployments.get","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.getByResourceGroupWithResponse":"Nginx.NginxPlus.NginxDeployments.get","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.list":"Nginx.NginxPlus.NginxDeployments.list","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.listByResourceGroup":"Nginx.NginxPlus.NginxDeployments.listByResourceGroup","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.update":"Nginx.NginxPlus.NginxDeployments.update","com.azure.resourcemanager.nginx.fluent.NginxManagementClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.OperationsClient":"Nginx.NginxPlus.Operations","com.azure.resourcemanager.nginx.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.beginCreate":"Nginx.NginxPlus.NginxDeploymentWafPolicies.create","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.beginDelete":"Nginx.NginxPlus.NginxDeploymentWafPolicies.delete","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.create":"Nginx.NginxPlus.NginxDeploymentWafPolicies.create","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.delete":"Nginx.NginxPlus.NginxDeploymentWafPolicies.delete","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.get":"Nginx.NginxPlus.NginxDeploymentWafPolicies.get","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.getWithResponse":"Nginx.NginxPlus.NginxDeploymentWafPolicies.get","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.list":"Nginx.NginxPlus.NginxDeployments.wafPolicyList","com.azure.resourcemanager.nginx.fluent.models.AnalysisResultInner":"Nginx.NginxPlus.AnalysisResult","com.azure.resourcemanager.nginx.fluent.models.NginxCertificateInner":"Nginx.NginxPlus.NginxCertificate","com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationResponseInner":"Nginx.NginxPlus.NginxConfigurationResponse","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner":"Nginx.NginxPlus.NginxDeploymentApiKeyResponse","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner":"Nginx.NginxPlus.NginxDeploymentDefaultWafPolicyListResponse","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner":"Nginx.NginxPlus.NginxDeployment","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentScalingPropertiesAutoScaleSettings":"Nginx.NginxPlus.NginxDeploymentScalingPropertiesAutoScaleSettings","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner":"Nginx.NginxPlus.NginxDeploymentWafPolicy","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner":"Nginx.NginxPlus.NginxDeploymentWafPolicyMetadata","com.azure.resourcemanager.nginx.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.nginx.implementation.NginxManagementClientBuilder":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.implementation.models.NginxCertificateListResponse":"Nginx.NginxPlus.NginxCertificateListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxConfigurationListResponse":"Nginx.NginxPlus.NginxConfigurationListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentApiKeyListResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentListResponse":"Nginx.NginxPlus.NginxDeploymentListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentWafPolicyListResponse":"Nginx.NginxPlus.NginxDeploymentWafPolicyListResponse","com.azure.resourcemanager.nginx.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.nginx.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.nginx.models.ActivationState":"Nginx.NginxPlus.ActivationState","com.azure.resourcemanager.nginx.models.AnalysisCreate":"Nginx.NginxPlus.AnalysisCreate","com.azure.resourcemanager.nginx.models.AnalysisCreateConfig":"Nginx.NginxPlus.AnalysisCreateConfig","com.azure.resourcemanager.nginx.models.AnalysisDiagnostic":"Nginx.NginxPlus.AnalysisDiagnostic","com.azure.resourcemanager.nginx.models.AnalysisResultData":"Nginx.NginxPlus.AnalysisResultData","com.azure.resourcemanager.nginx.models.AutoUpgradeProfile":"Nginx.NginxPlus.AutoUpgradeProfile","com.azure.resourcemanager.nginx.models.DiagnosticItem":"Nginx.NginxPlus.DiagnosticItem","com.azure.resourcemanager.nginx.models.IdentityProperties":"Nginx.NginxPlus.IdentityProperties","com.azure.resourcemanager.nginx.models.IdentityType":"Nginx.NginxPlus.IdentityType","com.azure.resourcemanager.nginx.models.Level":"Nginx.NginxPlus.Level","com.azure.resourcemanager.nginx.models.NginxCertificateErrorResponseBody":"Nginx.NginxPlus.NginxCertificateErrorResponseBody","com.azure.resourcemanager.nginx.models.NginxCertificateProperties":"Nginx.NginxPlus.NginxCertificateProperties","com.azure.resourcemanager.nginx.models.NginxConfigurationFile":"Nginx.NginxPlus.NginxConfigurationFile","com.azure.resourcemanager.nginx.models.NginxConfigurationPackage":"Nginx.NginxPlus.NginxConfigurationPackage","com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileRequest":"Nginx.NginxPlus.NginxConfigurationProtectedFileRequest","com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileResponse":"Nginx.NginxPlus.NginxConfigurationProtectedFileResponse","com.azure.resourcemanager.nginx.models.NginxConfigurationRequest":"Nginx.NginxPlus.NginxConfigurationRequest","com.azure.resourcemanager.nginx.models.NginxConfigurationRequestProperties":"Nginx.NginxPlus.NginxConfigurationRequestProperties","com.azure.resourcemanager.nginx.models.NginxConfigurationResponseProperties":"Nginx.NginxPlus.NginxConfigurationResponseProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyRequest":"Nginx.NginxPlus.NginxDeploymentApiKeyRequest","com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyRequestProperties":"Nginx.NginxPlus.NginxDeploymentApiKeyRequestProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyResponseProperties":"Nginx.NginxPlus.NginxDeploymentApiKeyResponseProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyProperties":"Nginx.NginxPlus.NginxDeploymentDefaultWafPolicyProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentProperties":"Nginx.NginxPlus.NginxDeploymentProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentPropertiesNginxAppProtect":"Nginx.NginxPlus.NginxDeploymentPropertiesNginxAppProtect","com.azure.resourcemanager.nginx.models.NginxDeploymentScalingProperties":"Nginx.NginxPlus.NginxDeploymentScalingProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters":"Nginx.NginxPlus.NginxDeploymentUpdateParameters","com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateProperties":"Nginx.NginxPlus.NginxDeploymentUpdateProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentUpdatePropertiesNginxAppProtect":"Nginx.NginxPlus.NginxDeploymentUpdatePropertiesNginxAppProtect","com.azure.resourcemanager.nginx.models.NginxDeploymentUserProfile":"Nginx.NginxPlus.NginxDeploymentUserProfile","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyApplyingStatus":"Nginx.NginxPlus.NginxDeploymentWafPolicyApplyingStatus","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyApplyingStatusCode":"Nginx.NginxPlus.NginxDeploymentWafPolicyApplyingStatusCode","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyCompilingStatus":"Nginx.NginxPlus.NginxDeploymentWafPolicyCompilingStatus","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyCompilingStatusCode":"Nginx.NginxPlus.NginxDeploymentWafPolicyCompilingStatusCode","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyMetadataProperties":"Nginx.NginxPlus.NginxDeploymentWafPolicyMetadataProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyProperties":"Nginx.NginxPlus.NginxDeploymentWafPolicyProperties","com.azure.resourcemanager.nginx.models.NginxFrontendIpConfiguration":"Nginx.NginxPlus.NginxFrontendIPConfiguration","com.azure.resourcemanager.nginx.models.NginxLogging":"Nginx.NginxPlus.NginxLogging","com.azure.resourcemanager.nginx.models.NginxNetworkInterfaceConfiguration":"Nginx.NginxPlus.NginxNetworkInterfaceConfiguration","com.azure.resourcemanager.nginx.models.NginxNetworkProfile":"Nginx.NginxPlus.NginxNetworkProfile","com.azure.resourcemanager.nginx.models.NginxPrivateIpAddress":"Nginx.NginxPlus.NginxPrivateIPAddress","com.azure.resourcemanager.nginx.models.NginxPrivateIpAllocationMethod":"Nginx.NginxPlus.NginxPrivateIPAllocationMethod","com.azure.resourcemanager.nginx.models.NginxPublicIpAddress":"Nginx.NginxPlus.NginxPublicIPAddress","com.azure.resourcemanager.nginx.models.NginxStorageAccount":"Nginx.NginxPlus.NginxStorageAccount","com.azure.resourcemanager.nginx.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.nginx.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.nginx.models.ProvisioningState":"Nginx.NginxPlus.ProvisioningState","com.azure.resourcemanager.nginx.models.ResourceSku":"Nginx.NginxPlus.ResourceSku","com.azure.resourcemanager.nginx.models.ScaleProfile":"Nginx.NginxPlus.ScaleProfile","com.azure.resourcemanager.nginx.models.ScaleProfileCapacity":"Nginx.NginxPlus.ScaleProfileCapacity","com.azure.resourcemanager.nginx.models.UserIdentityProperties":"Nginx.NginxPlus.UserIdentityProperties","com.azure.resourcemanager.nginx.models.WebApplicationFirewallComponentVersions":"Nginx.NginxPlus.WebApplicationFirewallComponentVersions","com.azure.resourcemanager.nginx.models.WebApplicationFirewallPackage":"Nginx.NginxPlus.WebApplicationFirewallPackage","com.azure.resourcemanager.nginx.models.WebApplicationFirewallSettings":"Nginx.NginxPlus.WebApplicationFirewallSettings","com.azure.resourcemanager.nginx.models.WebApplicationFirewallStatus":"Nginx.NginxPlus.WebApplicationFirewallStatus"},"generatedFiles":["src/main/java/com/azure/resourcemanager/nginx/NginxManager.java","src/main/java/com/azure/resourcemanager/nginx/fluent/ApiKeysClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/DefaultWafPoliciesClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/WafPoliciesClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/AnalysisResultInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxCertificateInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentApiKeyResponseInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentDefaultWafPolicyListResponseInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentScalingPropertiesAutoScaleSettings.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyMetadataInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java","src/main/java/com/azure/resourcemanager/nginx/implementation/AnalysisResultImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentApiKeyResponseImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentDefaultWafPolicyListResponseImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyMetadataImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxCertificateListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxConfigurationListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentApiKeyListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentWafPolicyListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/nginx/implementation/package-info.java","src/main/java/com/azure/resourcemanager/nginx/models/ActionType.java","src/main/java/com/azure/resourcemanager/nginx/models/ActivationState.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreate.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreateConfig.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisDiagnostic.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisResult.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisResultData.java","src/main/java/com/azure/resourcemanager/nginx/models/ApiKeys.java","src/main/java/com/azure/resourcemanager/nginx/models/AutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/Certificates.java","src/main/java/com/azure/resourcemanager/nginx/models/Configurations.java","src/main/java/com/azure/resourcemanager/nginx/models/DefaultWafPolicies.java","src/main/java/com/azure/resourcemanager/nginx/models/Deployments.java","src/main/java/com/azure/resourcemanager/nginx/models/DiagnosticItem.java","src/main/java/com/azure/resourcemanager/nginx/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/IdentityType.java","src/main/java/com/azure/resourcemanager/nginx/models/Level.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificate.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateErrorResponseBody.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationFile.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationPackage.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileRequest.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequest.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequestProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponseProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeployment.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequest.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequestProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponseProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyListResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentPropertiesNginxAppProtect.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentScalingProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateParameters.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUserProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicy.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatus.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatusCode.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatus.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatusCode.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadata.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadataProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxFrontendIpConfiguration.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxLogging.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAddress.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAllocationMethod.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxPublicIpAddress.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxStorageAccount.java","src/main/java/com/azure/resourcemanager/nginx/models/Operation.java","src/main/java/com/azure/resourcemanager/nginx/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/nginx/models/Operations.java","src/main/java/com/azure/resourcemanager/nginx/models/Origin.java","src/main/java/com/azure/resourcemanager/nginx/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/nginx/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfileCapacity.java","src/main/java/com/azure/resourcemanager/nginx/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/WafPolicies.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallComponentVersions.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallPackage.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallSettings.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallStatus.java","src/main/java/com/azure/resourcemanager/nginx/models/package-info.java","src/main/java/com/azure/resourcemanager/nginx/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-03-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.nginx.fluent.ApiKeysClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.createOrUpdate":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.createOrUpdateWithResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.delete":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.delete","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.deleteWithResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.delete","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.get":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.get","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.getWithResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.get","com.azure.resourcemanager.nginx.fluent.ApiKeysClient.list":"Nginx.NginxPlus.NginxDeploymentApiKeyResponses.list","com.azure.resourcemanager.nginx.fluent.CertificatesClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.CertificatesClient.beginCreateOrUpdate":"Nginx.NginxPlus.NginxCertificates.createOrUpdate","com.azure.resourcemanager.nginx.fluent.CertificatesClient.beginDelete":"Nginx.NginxPlus.NginxCertificates.delete","com.azure.resourcemanager.nginx.fluent.CertificatesClient.createOrUpdate":"Nginx.NginxPlus.NginxCertificates.createOrUpdate","com.azure.resourcemanager.nginx.fluent.CertificatesClient.delete":"Nginx.NginxPlus.NginxCertificates.delete","com.azure.resourcemanager.nginx.fluent.CertificatesClient.get":"Nginx.NginxPlus.NginxCertificates.get","com.azure.resourcemanager.nginx.fluent.CertificatesClient.getWithResponse":"Nginx.NginxPlus.NginxCertificates.get","com.azure.resourcemanager.nginx.fluent.CertificatesClient.list":"Nginx.NginxPlus.NginxCertificates.list","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.analysis":"Nginx.NginxPlus.NginxConfigurationResponses.analysis","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.analysisWithResponse":"Nginx.NginxPlus.NginxConfigurationResponses.analysis","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.beginCreateOrUpdate":"Nginx.NginxPlus.NginxConfigurationResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.beginDelete":"Nginx.NginxPlus.NginxConfigurationResponses.delete","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.createOrUpdate":"Nginx.NginxPlus.NginxConfigurationResponses.createOrUpdate","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.delete":"Nginx.NginxPlus.NginxConfigurationResponses.delete","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.get":"Nginx.NginxPlus.NginxConfigurationResponses.get","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.getWithResponse":"Nginx.NginxPlus.NginxConfigurationResponses.get","com.azure.resourcemanager.nginx.fluent.ConfigurationsClient.list":"Nginx.NginxPlus.NginxConfigurationResponses.list","com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient.list":"Nginx.NginxPlus.NginxDeployments.defaultWafPolicyList","com.azure.resourcemanager.nginx.fluent.DefaultWafPoliciesClient.listWithResponse":"Nginx.NginxPlus.NginxDeployments.defaultWafPolicyList","com.azure.resourcemanager.nginx.fluent.DeploymentsClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.beginCreateOrUpdate":"Nginx.NginxPlus.NginxDeployments.createOrUpdate","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.beginDelete":"Nginx.NginxPlus.NginxDeployments.delete","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.beginUpdate":"Nginx.NginxPlus.NginxDeployments.update","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.createOrUpdate":"Nginx.NginxPlus.NginxDeployments.createOrUpdate","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.delete":"Nginx.NginxPlus.NginxDeployments.delete","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.getByResourceGroup":"Nginx.NginxPlus.NginxDeployments.get","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.getByResourceGroupWithResponse":"Nginx.NginxPlus.NginxDeployments.get","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.list":"Nginx.NginxPlus.NginxDeployments.list","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.listByResourceGroup":"Nginx.NginxPlus.NginxDeployments.listByResourceGroup","com.azure.resourcemanager.nginx.fluent.DeploymentsClient.update":"Nginx.NginxPlus.NginxDeployments.update","com.azure.resourcemanager.nginx.fluent.NginxManagementClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.OperationsClient":"Nginx.NginxPlus.Operations","com.azure.resourcemanager.nginx.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.beginCreate":"Nginx.NginxPlus.NginxDeploymentWafPolicies.create","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.beginDelete":"Nginx.NginxPlus.NginxDeploymentWafPolicies.delete","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.create":"Nginx.NginxPlus.NginxDeploymentWafPolicies.create","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.delete":"Nginx.NginxPlus.NginxDeploymentWafPolicies.delete","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.get":"Nginx.NginxPlus.NginxDeploymentWafPolicies.get","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.getWithResponse":"Nginx.NginxPlus.NginxDeploymentWafPolicies.get","com.azure.resourcemanager.nginx.fluent.WafPoliciesClient.list":"Nginx.NginxPlus.NginxDeployments.wafPolicyList","com.azure.resourcemanager.nginx.fluent.models.AnalysisResultInner":"Nginx.NginxPlus.AnalysisResult","com.azure.resourcemanager.nginx.fluent.models.NginxCertificateInner":"Nginx.NginxPlus.NginxCertificate","com.azure.resourcemanager.nginx.fluent.models.NginxConfigurationResponseInner":"Nginx.NginxPlus.NginxConfigurationResponse","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentApiKeyResponseInner":"Nginx.NginxPlus.NginxDeploymentApiKeyResponse","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentDefaultWafPolicyListResponseInner":"Nginx.NginxPlus.NginxDeploymentDefaultWafPolicyListResponse","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentInner":"Nginx.NginxPlus.NginxDeployment","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentScalingPropertiesAutoScaleSettings":"Nginx.NginxPlus.NginxDeploymentScalingPropertiesAutoScaleSettings","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentUpdatePropertiesNginxAppProtect":"Nginx.NginxPlus.NginxDeploymentUpdatePropertiesNginxAppProtect","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyInner":"Nginx.NginxPlus.NginxDeploymentWafPolicy","com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentWafPolicyMetadataInner":"Nginx.NginxPlus.NginxDeploymentWafPolicyMetadata","com.azure.resourcemanager.nginx.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.nginx.implementation.NginxManagementClientBuilder":"Nginx.NginxPlus","com.azure.resourcemanager.nginx.implementation.models.NginxCertificateListResponse":"Nginx.NginxPlus.NginxCertificateListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxConfigurationListResponse":"Nginx.NginxPlus.NginxConfigurationListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentApiKeyListResponse":"Nginx.NginxPlus.NginxDeploymentApiKeyListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentListResponse":"Nginx.NginxPlus.NginxDeploymentListResponse","com.azure.resourcemanager.nginx.implementation.models.NginxDeploymentWafPolicyListResponse":"Nginx.NginxPlus.NginxDeploymentWafPolicyListResponse","com.azure.resourcemanager.nginx.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.nginx.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.nginx.models.ActivationState":"Nginx.NginxPlus.ActivationState","com.azure.resourcemanager.nginx.models.AnalysisCreate":"Nginx.NginxPlus.AnalysisCreate","com.azure.resourcemanager.nginx.models.AnalysisCreateConfig":"Nginx.NginxPlus.AnalysisCreateConfig","com.azure.resourcemanager.nginx.models.AnalysisDiagnostic":"Nginx.NginxPlus.AnalysisDiagnostic","com.azure.resourcemanager.nginx.models.AnalysisResultData":"Nginx.NginxPlus.AnalysisResultData","com.azure.resourcemanager.nginx.models.AutoUpgradeProfile":"Nginx.NginxPlus.AutoUpgradeProfile","com.azure.resourcemanager.nginx.models.DiagnosticItem":"Nginx.NginxPlus.DiagnosticItem","com.azure.resourcemanager.nginx.models.IdentityProperties":"Nginx.NginxPlus.IdentityProperties","com.azure.resourcemanager.nginx.models.IdentityType":"Nginx.NginxPlus.IdentityType","com.azure.resourcemanager.nginx.models.Level":"Nginx.NginxPlus.Level","com.azure.resourcemanager.nginx.models.NginxCertificateErrorResponseBody":"Nginx.NginxPlus.NginxCertificateErrorResponseBody","com.azure.resourcemanager.nginx.models.NginxCertificateProperties":"Nginx.NginxPlus.NginxCertificateProperties","com.azure.resourcemanager.nginx.models.NginxConfigurationFile":"Nginx.NginxPlus.NginxConfigurationFile","com.azure.resourcemanager.nginx.models.NginxConfigurationPackage":"Nginx.NginxPlus.NginxConfigurationPackage","com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileRequest":"Nginx.NginxPlus.NginxConfigurationProtectedFileRequest","com.azure.resourcemanager.nginx.models.NginxConfigurationProtectedFileResponse":"Nginx.NginxPlus.NginxConfigurationProtectedFileResponse","com.azure.resourcemanager.nginx.models.NginxConfigurationRequest":"Nginx.NginxPlus.NginxConfigurationRequest","com.azure.resourcemanager.nginx.models.NginxConfigurationRequestProperties":"Nginx.NginxPlus.NginxConfigurationRequestProperties","com.azure.resourcemanager.nginx.models.NginxConfigurationResponseProperties":"Nginx.NginxPlus.NginxConfigurationResponseProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyRequest":"Nginx.NginxPlus.NginxDeploymentApiKeyRequest","com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyRequestProperties":"Nginx.NginxPlus.NginxDeploymentApiKeyRequestProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentApiKeyResponseProperties":"Nginx.NginxPlus.NginxDeploymentApiKeyResponseProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentDefaultWafPolicyProperties":"Nginx.NginxPlus.NginxDeploymentDefaultWafPolicyProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentProperties":"Nginx.NginxPlus.NginxDeploymentProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentPropertiesNginxAppProtect":"Nginx.NginxPlus.NginxDeploymentPropertiesNginxAppProtect","com.azure.resourcemanager.nginx.models.NginxDeploymentScalingProperties":"Nginx.NginxPlus.NginxDeploymentScalingProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters":"Nginx.NginxPlus.NginxDeploymentUpdateParameters","com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateProperties":"Nginx.NginxPlus.NginxDeploymentUpdateProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentUserProfile":"Nginx.NginxPlus.NginxDeploymentUserProfile","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyApplyingStatus":"Nginx.NginxPlus.NginxDeploymentWafPolicyApplyingStatus","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyApplyingStatusCode":"Nginx.NginxPlus.NginxDeploymentWafPolicyApplyingStatusCode","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyCompilingStatus":"Nginx.NginxPlus.NginxDeploymentWafPolicyCompilingStatus","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyCompilingStatusCode":"Nginx.NginxPlus.NginxDeploymentWafPolicyCompilingStatusCode","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyMetadataProperties":"Nginx.NginxPlus.NginxDeploymentWafPolicyMetadataProperties","com.azure.resourcemanager.nginx.models.NginxDeploymentWafPolicyProperties":"Nginx.NginxPlus.NginxDeploymentWafPolicyProperties","com.azure.resourcemanager.nginx.models.NginxFrontendIpConfiguration":"Nginx.NginxPlus.NginxFrontendIPConfiguration","com.azure.resourcemanager.nginx.models.NginxLogging":"Nginx.NginxPlus.NginxLogging","com.azure.resourcemanager.nginx.models.NginxNetworkInterfaceConfiguration":"Nginx.NginxPlus.NginxNetworkInterfaceConfiguration","com.azure.resourcemanager.nginx.models.NginxNetworkProfile":"Nginx.NginxPlus.NginxNetworkProfile","com.azure.resourcemanager.nginx.models.NginxPrivateIpAddress":"Nginx.NginxPlus.NginxPrivateIPAddress","com.azure.resourcemanager.nginx.models.NginxPrivateIpAllocationMethod":"Nginx.NginxPlus.NginxPrivateIPAllocationMethod","com.azure.resourcemanager.nginx.models.NginxPublicIpAddress":"Nginx.NginxPlus.NginxPublicIPAddress","com.azure.resourcemanager.nginx.models.NginxStorageAccount":"Nginx.NginxPlus.NginxStorageAccount","com.azure.resourcemanager.nginx.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.nginx.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.nginx.models.ProvisioningState":"Nginx.NginxPlus.ProvisioningState","com.azure.resourcemanager.nginx.models.ResourceSku":"Nginx.NginxPlus.ResourceSku","com.azure.resourcemanager.nginx.models.ScaleProfile":"Nginx.NginxPlus.ScaleProfile","com.azure.resourcemanager.nginx.models.ScaleProfileCapacity":"Nginx.NginxPlus.ScaleProfileCapacity","com.azure.resourcemanager.nginx.models.UserIdentityProperties":"Nginx.NginxPlus.UserIdentityProperties","com.azure.resourcemanager.nginx.models.WebApplicationFirewallComponentVersions":"Nginx.NginxPlus.WebApplicationFirewallComponentVersions","com.azure.resourcemanager.nginx.models.WebApplicationFirewallPackage":"Nginx.NginxPlus.WebApplicationFirewallPackage","com.azure.resourcemanager.nginx.models.WebApplicationFirewallSettings":"Nginx.NginxPlus.WebApplicationFirewallSettings","com.azure.resourcemanager.nginx.models.WebApplicationFirewallStatus":"Nginx.NginxPlus.WebApplicationFirewallStatus"},"generatedFiles":["src/main/java/com/azure/resourcemanager/nginx/NginxManager.java","src/main/java/com/azure/resourcemanager/nginx/fluent/ApiKeysClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/CertificatesClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/ConfigurationsClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/DefaultWafPoliciesClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/DeploymentsClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/NginxManagementClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/WafPoliciesClient.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/AnalysisResultInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxCertificateInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxConfigurationResponseInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentApiKeyResponseInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentDefaultWafPolicyListResponseInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentScalingPropertiesAutoScaleSettings.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentUpdatePropertiesNginxAppProtect.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/NginxDeploymentWafPolicyMetadataInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/nginx/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/nginx/fluent/package-info.java","src/main/java/com/azure/resourcemanager/nginx/implementation/AnalysisResultImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ApiKeysImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/CertificatesImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DefaultWafPoliciesImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/DeploymentsImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxCertificateImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxConfigurationResponseImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentApiKeyResponseImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentDefaultWafPolicyListResponseImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxDeploymentWafPolicyMetadataImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/nginx/implementation/NginxManagementClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/WafPoliciesImpl.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxCertificateListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxConfigurationListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentApiKeyListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/NginxDeploymentWafPolicyListResponse.java","src/main/java/com/azure/resourcemanager/nginx/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/nginx/implementation/package-info.java","src/main/java/com/azure/resourcemanager/nginx/models/ActionType.java","src/main/java/com/azure/resourcemanager/nginx/models/ActivationState.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreate.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisCreateConfig.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisDiagnostic.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisResult.java","src/main/java/com/azure/resourcemanager/nginx/models/AnalysisResultData.java","src/main/java/com/azure/resourcemanager/nginx/models/ApiKeys.java","src/main/java/com/azure/resourcemanager/nginx/models/AutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/Certificates.java","src/main/java/com/azure/resourcemanager/nginx/models/Configurations.java","src/main/java/com/azure/resourcemanager/nginx/models/DefaultWafPolicies.java","src/main/java/com/azure/resourcemanager/nginx/models/Deployments.java","src/main/java/com/azure/resourcemanager/nginx/models/DiagnosticItem.java","src/main/java/com/azure/resourcemanager/nginx/models/IdentityProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/IdentityType.java","src/main/java/com/azure/resourcemanager/nginx/models/Level.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificate.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateErrorResponseBody.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxCertificateProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationFile.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationPackage.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileRequest.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationProtectedFileResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequest.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationRequestProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxConfigurationResponseProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeployment.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequest.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyRequestProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentApiKeyResponseProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyListResponse.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentDefaultWafPolicyProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentPropertiesNginxAppProtect.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentScalingProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateParameters.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUpdateProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentUserProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicy.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatus.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyApplyingStatusCode.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatus.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyCompilingStatusCode.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadata.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyMetadataProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxDeploymentWafPolicyProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxFrontendIpConfiguration.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxLogging.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkInterfaceConfiguration.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxNetworkProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAddress.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxPrivateIpAllocationMethod.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxPublicIpAddress.java","src/main/java/com/azure/resourcemanager/nginx/models/NginxStorageAccount.java","src/main/java/com/azure/resourcemanager/nginx/models/Operation.java","src/main/java/com/azure/resourcemanager/nginx/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/nginx/models/Operations.java","src/main/java/com/azure/resourcemanager/nginx/models/Origin.java","src/main/java/com/azure/resourcemanager/nginx/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/nginx/models/ResourceSku.java","src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/nginx/models/ScaleProfileCapacity.java","src/main/java/com/azure/resourcemanager/nginx/models/UserIdentityProperties.java","src/main/java/com/azure/resourcemanager/nginx/models/WafPolicies.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallComponentVersions.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallPackage.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallSettings.java","src/main/java/com/azure/resourcemanager/nginx/models/WebApplicationFirewallStatus.java","src/main/java/com/azure/resourcemanager/nginx/models/package-info.java","src/main/java/com/azure/resourcemanager/nginx/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java index c6917275489a..e5aeecee6ff9 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdateParametersTests.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.nginx.models.NginxDeploymentScalingProperties; import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateParameters; import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateProperties; -import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdatePropertiesNginxAppProtect; import com.azure.resourcemanager.nginx.models.NginxDeploymentUserProfile; import com.azure.resourcemanager.nginx.models.NginxFrontendIpConfiguration; import com.azure.resourcemanager.nginx.models.NginxLogging; @@ -71,7 +70,7 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("rq", model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); Assertions.assertEquals("poczvyifqrvkdvjs", model.properties().autoUpgradeProfile().upgradeChannel()); Assertions.assertEquals(ActivationState.DISABLED, - model.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); + model.properties().webApplicationFirewallSettings().activationState()); } @org.junit.jupiter.api.Test @@ -105,9 +104,8 @@ public void testSerialize() throws Exception { .withSubnetId("qyud")))) .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("rq"))) .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("poczvyifqrvkdvjs")) - .withNginxAppProtect( - new NginxDeploymentUpdatePropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED)))); + .withWebApplicationFirewallSettings( + new WebApplicationFirewallSettings().withActivationState(ActivationState.DISABLED))); model = BinaryData.fromObject(model).toObject(NginxDeploymentUpdateParameters.class); Assertions.assertEquals(IdentityType.USER_ASSIGNED, model.identity().type()); Assertions.assertEquals("qsc", model.tags().get("eypvhezrkg")); @@ -142,7 +140,7 @@ public void testSerialize() throws Exception { Assertions.assertEquals("rq", model.properties().networkProfile().networkInterfaceConfiguration().subnetId()); Assertions.assertEquals("poczvyifqrvkdvjs", model.properties().autoUpgradeProfile().upgradeChannel()); Assertions.assertEquals(ActivationState.DISABLED, - model.properties().nginxAppProtect().webApplicationFirewallSettings().activationState()); + model.properties().webApplicationFirewallSettings().activationState()); } // Use "Map.of" if available diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java index 7d32845b2e74..f024b6052e75 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesNginxAppProtectTests.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.nginx.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.nginx.fluent.models.NginxDeploymentUpdatePropertiesNginxAppProtect; import com.azure.resourcemanager.nginx.models.ActivationState; -import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdatePropertiesNginxAppProtect; import com.azure.resourcemanager.nginx.models.WebApplicationFirewallSettings; import org.junit.jupiter.api.Assertions; diff --git a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java index c2e6795806a7..e481bb391cd8 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java +++ b/sdk/nginx/azure-resourcemanager-nginx/src/test/java/com/azure/resourcemanager/nginx/generated/NginxDeploymentUpdatePropertiesTests.java @@ -9,7 +9,6 @@ import com.azure.resourcemanager.nginx.models.AutoUpgradeProfile; import com.azure.resourcemanager.nginx.models.NginxDeploymentScalingProperties; import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdateProperties; -import com.azure.resourcemanager.nginx.models.NginxDeploymentUpdatePropertiesNginxAppProtect; import com.azure.resourcemanager.nginx.models.NginxDeploymentUserProfile; import com.azure.resourcemanager.nginx.models.NginxFrontendIpConfiguration; import com.azure.resourcemanager.nginx.models.NginxLogging; @@ -49,8 +48,7 @@ public void testDeserialize() throws Exception { model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); Assertions.assertEquals("ggi", model.networkProfile().networkInterfaceConfiguration().subnetId()); Assertions.assertEquals("xwburvjxxjns", model.autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals(ActivationState.ENABLED, - model.nginxAppProtect().webApplicationFirewallSettings().activationState()); + Assertions.assertEquals(ActivationState.ENABLED, model.webApplicationFirewallSettings().activationState()); } @org.junit.jupiter.api.Test @@ -86,9 +84,8 @@ public void testSerialize() throws Exception { .withSubnetId("mzsb")))) .withNetworkInterfaceConfiguration(new NginxNetworkInterfaceConfiguration().withSubnetId("ggi"))) .withAutoUpgradeProfile(new AutoUpgradeProfile().withUpgradeChannel("xwburvjxxjns")) - .withNginxAppProtect( - new NginxDeploymentUpdatePropertiesNginxAppProtect().withWebApplicationFirewallSettings( - new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED))); + .withWebApplicationFirewallSettings( + new WebApplicationFirewallSettings().withActivationState(ActivationState.ENABLED)); model = BinaryData.fromObject(model).toObject(NginxDeploymentUpdateProperties.class); Assertions.assertFalse(model.enableDiagnosticsSupport()); Assertions.assertEquals("t", model.logging().storageAccount().accountName()); @@ -108,7 +105,6 @@ public void testSerialize() throws Exception { model.networkProfile().frontEndIpConfiguration().privateIpAddresses().get(0).subnetId()); Assertions.assertEquals("ggi", model.networkProfile().networkInterfaceConfiguration().subnetId()); Assertions.assertEquals("xwburvjxxjns", model.autoUpgradeProfile().upgradeChannel()); - Assertions.assertEquals(ActivationState.ENABLED, - model.nginxAppProtect().webApplicationFirewallSettings().activationState()); + Assertions.assertEquals(ActivationState.ENABLED, model.webApplicationFirewallSettings().activationState()); } } diff --git a/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml b/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml index 874f27338079..ab177f8e2110 100644 --- a/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml +++ b/sdk/nginx/azure-resourcemanager-nginx/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/nginx/Nginx.Management -commit: aae85aa3e7e4fda95ea2d3abac0ba1d8159db214 +commit: de8103ff8e94ea51c56bb22094ded5d2dfc45a6a repo: Azure/azure-rest-api-specs additionalDirectories: