diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 9996bed8c3eb..ecbf79312e7a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md @@ -1,14 +1,179 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2025-03-07) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-2025-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.SessionContainer` was added + +* `models.Runtime` was added + +* `models.SessionPoolUpdatableProperties` was added + +* `models.JavaComponentPropertiesScale` was added + +* `models.ScaleConfiguration` was added + +* `models.PoolManagementType` was added + +* `models.CertificateKeyVaultProperties` was added + +* `models.IdentitySettingsLifeCycle` was added + +* `models.SessionPoolProvisioningState` was added + +* `models.SpringBootAdminComponent` was added + +* `models.JavaComponentServiceBind` was added + +* `models.SessionPool$UpdateStages` was added + +* `models.JavaComponentConfigurationProperty` was added + +* `models.SpringCloudConfigComponent` was added + +* `models.SessionPool$Definition` was added + +* `models.LifecycleConfiguration` was added + +* `models.JavaComponent$Definition` was added + +* `models.SessionPool$DefinitionStages` was added + +* `models.SessionIngress` was added + +* `models.SessionPool` was added + +* `models.NfsAzureFileProperties` was added + +* `models.ContainerAppRunningStatus` was added + +* `models.SessionContainerResources` was added + +* `models.SessionPoolSecret` was added + +* `models.SessionPool$Update` was added + +* `models.JavaComponentsCollection` was added + +* `models.JavaComponent` was added + +* `models.SessionNetworkStatus` was added + +* `models.RuntimeJava` was added + +* `models.JavaComponent$UpdateStages` was added + +* `models.JavaComponentProvisioningState` was added + +* `models.ManagedIdentitySetting` was added -### Bugs Fixed +* `models.CustomContainerTemplate` was added + +* `models.SessionNetworkConfiguration` was added + +* `models.DynamicPoolConfiguration` was added + +* `models.JavaComponent$DefinitionStages` was added + +* `models.ContainerType` was added + +* `models.SessionRegistryCredentials` was added + +* `models.JavaComponentType` was added + +* `models.JavaComponentProperties` was added + +* `models.LifecycleType` was added + +* `models.ContainerAppsSessionPools` was added + +* `models.SessionPoolCollection` was added -### Other Changes +* `models.JavaComponent$Update` was added + +* `models.JavaComponentIngress` was added + +* `models.JavaComponents` was added + +* `models.SpringCloudEurekaComponent` was added + +#### `models.ManagedEnvironment$Update` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.QueueScaleRule` was modified + +* `withIdentity(java.lang.String)` was added +* `identity()` was added +* `accountName()` was added +* `withAccountName(java.lang.String)` was added + +#### `models.ManagedEnvironment$Definition` was modified + +* `withIdentity(models.ManagedServiceIdentity)` was added + +#### `models.ManagedEnvironmentStorageProperties` was modified + +* `withNfsAzureFile(models.NfsAzureFileProperties)` was added +* `nfsAzureFile()` was added + +#### `models.TcpScaleRule` was modified + +* `identity()` was added +* `withIdentity(java.lang.String)` was added + +#### `models.Scale` was modified + +* `pollingInterval()` was added +* `withCooldownPeriod(java.lang.Integer)` was added +* `withPollingInterval(java.lang.Integer)` was added +* `cooldownPeriod()` was added + +#### `models.ManagedEnvironment` was modified + +* `identity()` was added + +#### `models.HttpScaleRule` was modified + +* `identity()` was added +* `withIdentity(java.lang.String)` was added + +#### `models.CertificateProperties` was modified + +* `withCertificateKeyVaultProperties(models.CertificateKeyVaultProperties)` was added +* `certificateKeyVaultProperties()` was added + +#### `models.ContainerApp` was modified + +* `runningStatus()` was added + +#### `models.JobScaleRule` was modified + +* `withIdentity(java.lang.String)` was added +* `identity()` was added + +#### `ContainerAppsApiManager` was modified + +* `containerAppsSessionPools()` was added +* `javaComponents()` was added + +#### `models.CustomScaleRule` was modified + +* `identity()` was added +* `withIdentity(java.lang.String)` was added + +#### `models.CustomDomainConfiguration` was modified + +* `certificateKeyVaultProperties()` was added +* `withCertificateKeyVaultProperties(models.CertificateKeyVaultProperties)` was added + +#### `models.Configuration` was modified + +* `withRuntime(models.Runtime)` was added +* `runtime()` was added ## 1.1.0-beta.1 (2024-10-17) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index 3c7c1dc62405..aee2d0611b4c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ContainerAppsApi client library for Java. -This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-08. 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 ContainerAppsApi Management SDK. Package tag package-2025-01-01. 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 @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ContainerAppsApiManager manager = ContainerAppsApiManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index 7eeafade7da3..80eb5b365951 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -1,14 +1,6 @@ # Code snippets and samples -## AppResiliency - -- [CreateOrUpdate](#appresiliency_createorupdate) -- [Delete](#appresiliency_delete) -- [Get](#appresiliency_get) -- [List](#appresiliency_list) -- [Update](#appresiliency_update) - ## AvailableWorkloadProfiles - [Get](#availableworkloadprofiles_get) @@ -17,29 +9,6 @@ - [Get](#billingmeters_get) -## BuildAuthToken - -- [List](#buildauthtoken_list) - -## Builders - -- [CreateOrUpdate](#builders_createorupdate) -- [Delete](#builders_delete) -- [GetByResourceGroup](#builders_getbyresourcegroup) -- [List](#builders_list) -- [ListByResourceGroup](#builders_listbyresourcegroup) -- [Update](#builders_update) - -## Builds - -- [CreateOrUpdate](#builds_createorupdate) -- [Delete](#builds_delete) -- [Get](#builds_get) - -## BuildsByBuilderResource - -- [List](#buildsbybuilderresource_list) - ## Certificates - [CreateOrUpdate](#certificates_createorupdate) @@ -102,15 +71,6 @@ - [Get](#containerappsauthconfigs_get) - [ListByContainerApp](#containerappsauthconfigs_listbycontainerapp) -## ContainerAppsBuilds - -- [Delete](#containerappsbuilds_delete) -- [Get](#containerappsbuilds_get) - -## ContainerAppsBuildsByContainerApp - -- [List](#containerappsbuildsbycontainerapp_list) - ## ContainerAppsDiagnostics - [GetDetector](#containerappsdiagnostics_getdetector) @@ -119,14 +79,6 @@ - [ListDetectors](#containerappsdiagnostics_listdetectors) - [ListRevisions](#containerappsdiagnostics_listrevisions) -## ContainerAppsPatches - -- [Apply](#containerappspatches_apply) -- [Delete](#containerappspatches_delete) -- [Get](#containerappspatches_get) -- [ListByContainerApp](#containerappspatches_listbycontainerapp) -- [SkipConfigure](#containerappspatches_skipconfigure) - ## ContainerAppsRevisionReplicas - [GetReplica](#containerappsrevisionreplicas_getreplica) @@ -156,13 +108,6 @@ - [Get](#containerappssourcecontrols_get) - [ListByContainerApp](#containerappssourcecontrols_listbycontainerapp) -## DaprComponentResiliencyPolicies - -- [CreateOrUpdate](#daprcomponentresiliencypolicies_createorupdate) -- [Delete](#daprcomponentresiliencypolicies_delete) -- [Get](#daprcomponentresiliencypolicies_get) -- [List](#daprcomponentresiliencypolicies_list) - ## DaprComponents - [CreateOrUpdate](#daprcomponents_createorupdate) @@ -171,25 +116,6 @@ - [List](#daprcomponents_list) - [ListSecrets](#daprcomponents_listsecrets) -## DaprSubscriptions - -- [CreateOrUpdate](#daprsubscriptions_createorupdate) -- [Delete](#daprsubscriptions_delete) -- [Get](#daprsubscriptions_get) -- [List](#daprsubscriptions_list) - -## DotNetComponents - -- [CreateOrUpdate](#dotnetcomponents_createorupdate) -- [Delete](#dotnetcomponents_delete) -- [Get](#dotnetcomponents_get) -- [List](#dotnetcomponents_list) -- [Update](#dotnetcomponents_update) - -## FunctionsExtension - -- [InvokeFunctionsHost](#functionsextension_invokefunctionshost) - ## JavaComponents - [CreateOrUpdate](#javacomponents_createorupdate) @@ -209,28 +135,15 @@ - [ListDetectors](#jobs_listdetectors) - [ListSecrets](#jobs_listsecrets) - [ProxyGet](#jobs_proxyget) -- [Resume](#jobs_resume) - [Start](#jobs_start) - [StopExecution](#jobs_stopexecution) - [StopMultipleExecutions](#jobs_stopmultipleexecutions) -- [Suspend](#jobs_suspend) - [Update](#jobs_update) ## JobsExecutions - [List](#jobsexecutions_list) -## LogicApps - -- [CreateOrUpdate](#logicapps_createorupdate) -- [Delete](#logicapps_delete) -- [DeployWorkflowArtifacts](#logicapps_deployworkflowartifacts) -- [Get](#logicapps_get) -- [GetWorkflow](#logicapps_getworkflow) -- [Invoke](#logicapps_invoke) -- [ListWorkflows](#logicapps_listworkflows) -- [ListWorkflowsConnections](#logicapps_listworkflowsconnections) - ## ManagedCertificates - [CreateOrUpdate](#managedcertificates_createorupdate) @@ -244,17 +157,6 @@ - [GetDetector](#managedenvironmentdiagnostics_getdetector) - [ListDetectors](#managedenvironmentdiagnostics_listdetectors) -## ManagedEnvironmentPrivateEndpointConnections - -- [CreateOrUpdate](#managedenvironmentprivateendpointconnections_createorupdate) -- [Delete](#managedenvironmentprivateendpointconnections_delete) -- [Get](#managedenvironmentprivateendpointconnections_get) -- [List](#managedenvironmentprivateendpointconnections_list) - -## ManagedEnvironmentPrivateLinkResources - -- [List](#managedenvironmentprivatelinkresources_list) - ## ManagedEnvironmentUsages - [List](#managedenvironmentusages_list) @@ -297,269 +199,200 @@ ## Usages - [List](#usages_list) -### AppResiliency_CreateOrUpdate +### AvailableWorkloadProfiles_Get ```java -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HeaderMatch; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import java.util.Arrays; - /** - * Samples for AppResiliency CreateOrUpdate. + * Samples for AvailableWorkloadProfiles Get. */ -public final class AppResiliencyCreateOrUpdateSamples { +public final class AvailableWorkloadProfilesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_CreateOrUpdate - * .json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AvailableWorkloadProfiles_Get.json */ /** - * Sample code: Create or Update App Resiliency. + * Sample code: BillingMeters_Get. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - createOrUpdateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies() - .define("resiliency-policy-1") - .withExistingContainerApp("rg", "testcontainerApp0") - .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(15).withConnectionTimeoutInSeconds(5)) - .withHttpRetryPolicy( - new HttpRetryPolicy().withMaxRetries(5) - .withInitialDelayInMilliseconds(1000L) - .withMaxIntervalInMilliseconds(10000L) - .withHeaders( - Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) - .withHttpStatusCodes(Arrays.asList(502, 503)) - .withErrors(Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", - "retriable-status-codes"))) - .withTcpRetryPolicy(new TcpRetryPolicy().withMaxConnectAttempts(3)) - .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5) - .withIntervalInSeconds(10) - .withMaxEjectionPercent(50)) - .withHttpConnectionPool( - new HttpConnectionPool().withHttp1MaxPendingRequests(1024).withHttp2MaxRequests(1024)) - .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)) - .create(); + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.availableWorkloadProfiles().get("East US", com.azure.core.util.Context.NONE); } } ``` -### AppResiliency_Delete +### BillingMeters_Get ```java /** - * Samples for AppResiliency Delete. + * Samples for BillingMeters Get. */ -public final class AppResiliencyDeleteSamples { +public final class BillingMetersGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/BillingMeters_Get.json */ /** - * Sample code: Delete App Resiliency. + * Sample code: BillingMeters_Get. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies() - .deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.billingMeters().getWithResponse("East US", com.azure.core.util.Context.NONE); } } ``` -### AppResiliency_Get +### Certificates_CreateOrUpdate ```java -/** - * Samples for AppResiliency Get. - */ -public final class AppResiliencyGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Get.json - */ - /** - * Sample code: Get App Resiliency. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies() - .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); - } -} -``` - -### AppResiliency_List +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateKeyVaultProperties; +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -```java /** - * Samples for AppResiliency List. + * Samples for Certificates CreateOrUpdate. */ -public final class AppResiliencyListSamples { +public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * Certificate_CreateOrUpdate_FromKeyVault.json */ /** - * Sample code: List App Resiliency. + * Sample code: Create or Update Certificate using Managed Identity. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().list("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void createOrUpdateCertificateUsingManagedIdentity( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates() + .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties() + .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") + .withKeyVaultUrl("fakeTokenPlaceholder"))), + com.azure.core.util.Context.NONE); } -} -``` - -### AppResiliency_Update - -```java -import com.azure.resourcemanager.appcontainers.models.AppResiliency; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -/** - * Samples for AppResiliency Update. - */ -public final class AppResiliencyUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificate_CreateOrUpdate.json */ /** - * Sample code: Update App Resiliency. + * Sample code: Create or Update Certificate. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void updateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - AppResiliency resource = manager.appResiliencies() - .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(30).withConnectionTimeoutInSeconds(40)) - .apply(); + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates() + .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes())), + com.azure.core.util.Context.NONE); } } ``` -### AvailableWorkloadProfiles_Get +### Certificates_Delete ```java /** - * Samples for AvailableWorkloadProfiles Get. + * Samples for Certificates Delete. */ -public final class AvailableWorkloadProfilesGetSamples { +public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * AvailableWorkloadProfiles_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificate_Delete.json */ /** - * Sample code: BillingMeters_Get. + * Sample code: Delete Certificate. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.availableWorkloadProfiles().get("East US", com.azure.core.util.Context.NONE); + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` -### BillingMeters_Get +### Certificates_Get ```java /** - * Samples for BillingMeters Get. + * Samples for Certificates Get. */ -public final class BillingMetersGetSamples { +public final class CertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/BillingMeters_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificate_Get.json */ /** - * Sample code: BillingMeters_Get. + * Sample code: Get Certificate. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.billingMeters().getWithResponse("East US", com.azure.core.util.Context.NONE); + public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` -### BuildAuthToken_List +### Certificates_List ```java /** - * Samples for BuildAuthToken List. + * Samples for Certificates List. */ -public final class BuildAuthTokenListSamples { +public final class CertificatesListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListAuthToken.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificates_ListByManagedEnvironment + * .json */ /** - * Sample code: Get Build Auth Token. + * Sample code: List Certificates by Managed Environment. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getBuildAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.buildAuthTokens().listWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + public static void + listCertificatesByManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } ``` -### Builders_CreateOrUpdate +### Certificates_Update ```java -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import java.util.HashMap; import java.util.Map; /** - * Samples for Builders CreateOrUpdate. + * Samples for Certificates Update. */ -public final class BuildersCreateOrUpdateSamples { +public final class CertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificates_Patch.json */ /** - * Sample code: Builders_CreateOrUpdate_0. + * Sample code: Patch Certificate. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - buildersCreateOrUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders() - .define("testBuilder") - .withRegion("eastus") - .withExistingResourceGroup("rg") - .withTags(mapOf("company", "Microsoft")) - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", - new UserAssignedIdentity()))) - .withEnvironmentId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv") - .withContainerRegistries(Arrays.asList(new ContainerRegistry() - .withContainerRegistryServer("test.azurecr.io") - .withIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), - new ContainerRegistry().withContainerRegistryServer("test2.azurecr.io") - .withIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) - .create(); + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates() + .updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -576,310 +409,198 @@ public final class BuildersCreateOrUpdateSamples { } ``` -### Builders_Delete +### ConnectedEnvironments_CheckNameAvailability ```java +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; + /** - * Samples for Builders Delete. + * Samples for ConnectedEnvironments CheckNameAvailability. */ -public final class BuildersDeleteSamples { +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** - * Sample code: Builders_Delete_0. + * Sample code: Certificates_CheckNameAvailability. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void buildersDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().delete("rg", "testBuilder", com.azure.core.util.Context.NONE); + public static void + certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcertificatename") + .withType("Microsoft.App/connectedEnvironments/certificates"), + com.azure.core.util.Context.NONE); } } ``` -### Builders_GetByResourceGroup +### ConnectedEnvironments_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; + /** - * Samples for Builders GetByResourceGroup. + * Samples for ConnectedEnvironments CreateOrUpdate. */ -public final class BuildersGetByResourceGroupSamples { +public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_CreateOrUpdate. + * json */ /** - * Sample code: Builders_Get_0. + * Sample code: Create kube environments. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void buildersGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE); + public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments() + .define("testenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) + .create(); } } ``` -### Builders_List +### ConnectedEnvironments_Delete ```java /** - * Samples for Builders List. + * Samples for ConnectedEnvironments Delete. */ -public final class BuildersListSamples { +public final class ConnectedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListBySubscription. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_Delete.json */ /** - * Sample code: Builders_ListBySubscription_0. + * Sample code: Delete connected environment by connectedEnvironmentName. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - buildersListBySubscription0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().list(com.azure.core.util.Context.NONE); + public static void deleteConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } ``` -### Builders_ListByResourceGroup +### ConnectedEnvironments_GetByResourceGroup ```java /** - * Samples for Builders ListByResourceGroup. + * Samples for ConnectedEnvironments GetByResourceGroup. */ -public final class BuildersListByResourceGroupSamples { +public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListByResourceGroup - * .json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_Get.json */ /** - * Sample code: Builders_ListByResourceGroup_0. + * Sample code: Get connected environment by connectedEnvironmentName. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - buildersListByResourceGroup0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + public static void getConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments() + .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } ``` -### Builders_Update +### ConnectedEnvironments_List ```java -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for Builders Update. + * Samples for ConnectedEnvironments List. */ -public final class BuildersUpdateSamples { +public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Update.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironments_ListBySubscription.json */ /** - * Sample code: Builders_Update_0. + * Sample code: List connected environments by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - BuilderResource resource = manager.builders() - .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); - } - - // 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; + public static void listConnectedEnvironmentsBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().list(com.azure.core.util.Context.NONE); } } ``` -### Builds_CreateOrUpdate +### ConnectedEnvironments_ListByResourceGroup ```java -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; - /** - * Samples for Builds CreateOrUpdate. + * Samples for ConnectedEnvironments ListByResourceGroup. */ -public final class BuildsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_CreateOrUpdate.json - */ - /** - * Sample code: Builds_CreateOrUpdate_WithConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildsCreateOrUpdateWithConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds() - .define("testBuild-123456789az") - .withExistingBuilder("rg", "testBuilder") - .withDestinationContainerRegistry(new ContainerRegistryWithCustomImage().withServer("test.azurecr.io") - .withImage("test.azurecr.io/repo:tag")) - .withConfiguration(new BuildConfiguration().withBaseOs("DebianBullseye") - .withPlatform("dotnetcore") - .withPlatformVersion("7.0") - .withEnvironmentVariables(Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), - new EnvironmentVariable().withName("foo2").withValue("bar2"))) - .withPreBuildSteps(Arrays.asList( - new PreBuildStep().withDescription("First pre build step.") - .withScripts(Arrays.asList("echo 'hello'", "echo 'world'")) - .withHttpGet(new HttpGet().withUrl("https://microsoft.com") - .withFileName("output.txt") - .withHeaders(Arrays.asList("foo", "bar"))), - new PreBuildStep().withDescription("Second pre build step.") - .withScripts(Arrays.asList("echo 'hello'", "echo 'again'")) - .withHttpGet(new HttpGet().withUrl("https://microsoft.com") - .withFileName("output.txt") - .withHeaders(Arrays.asList("foo")))))) - .create(); - } - +public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Builds_CreateOrUpdate_NoConfig.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironments_ListByResourceGroup.json */ /** - * Sample code: Builds_CreateOrUpdate_NoConfig. + * Sample code: List environments by resource group. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - buildsCreateOrUpdateNoConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().define("testBuild").withExistingBuilder("rg", "testBuilder").create(); + listEnvironmentsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } ``` -### Builds_Delete +### ConnectedEnvironments_Update ```java /** - * Samples for Builds Delete. + * Samples for ConnectedEnvironments Update. */ -public final class BuildsDeleteSamples { +public final class ConnectedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_Patch.json */ /** - * Sample code: Builds_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().delete("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); - } -} -``` - -### Builds_Get - -```java -/** - * Samples for Builds Get. - */ -public final class BuildsGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Get.json - */ - /** - * Sample code: Builds_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().getWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); - } -} -``` - -### BuildsByBuilderResource_List - -```java -/** - * Samples for BuildsByBuilderResource List. - */ -public final class BuildsByBuilderResourceListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListByBuilderResource - * .json - */ - /** - * Sample code: Builds_ListByBuilderResource_0. + * Sample code: Patch Managed Environment. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - buildsListByBuilderResource0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.buildsByBuilderResources().list("rg", "testBuilder", com.azure.core.util.Context.NONE); + patchManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.Context.NONE); } } ``` -### Certificates_CreateOrUpdate +### ConnectedEnvironmentsCertificates_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateKeyVaultProperties; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -import com.azure.resourcemanager.appcontainers.models.CertificateType; /** - * Samples for Certificates CreateOrUpdate. + * Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ -public final class CertificatesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Certificate_CreateOrUpdate_FromKeyVault.json - */ - /** - * Sample code: Create or Update Certificate using Managed Identity. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateCertificateUsingManagedIdentity( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates() - .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificateInner().withLocation("East US") - .withProperties(new CertificateProperties() - .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") - .withKeyVaultUrl("fakeTokenPlaceholder")) - .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), - com.azure.core.util.Context.NONE); - } - +public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_CreateOrUpdate. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -888,27 +609,27 @@ public final class CertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates() - .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificateInner().withLocation("East US") - .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes()) - .withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingConnectedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) + .create(); } } ``` -### Certificates_Delete +### ConnectedEnvironmentsCertificates_Delete ```java /** - * Samples for Certificates Delete. + * Samples for ConnectedEnvironmentsCertificates Delete. */ -public final class CertificatesDeleteSamples { +public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -916,23 +637,24 @@ public final class CertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates() + manager.connectedEnvironmentsCertificates() .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` -### Certificates_Get +### ConnectedEnvironmentsCertificates_Get ```java /** - * Samples for Certificates Get. + * Samples for ConnectedEnvironmentsCertificates Get. */ -public final class CertificatesGetSamples { +public final class ConnectedEnvironmentsCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsCertificate_Get. + * json */ /** * Sample code: Get Certificate. @@ -940,50 +662,51 @@ public final class CertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates() + manager.connectedEnvironmentsCertificates() .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); } } ``` -### Certificates_List +### ConnectedEnvironmentsCertificates_List ```java /** - * Samples for Certificates List. + * Samples for ConnectedEnvironmentsCertificates List. */ -public final class CertificatesListSamples { +public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** - * Sample code: List Certificates by Managed Environment. + * Sample code: List Certificates by Connected Environment. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - listCertificatesByManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + public static void listCertificatesByConnectedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates() + .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } ``` -### Certificates_Update +### ConnectedEnvironmentsCertificates_Update ```java -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import com.azure.resourcemanager.appcontainers.models.Certificate; import java.util.HashMap; import java.util.Map; /** - * Samples for Certificates Update. + * Samples for ConnectedEnvironmentsCertificates Update. */ -public final class CertificatesUpdateSamples { +public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -991,10 +714,11 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates() - .updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - com.azure.core.util.Context.NONE); + Certificate resource = manager.connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } // Use "Map.of" if available @@ -1011,670 +735,321 @@ public final class CertificatesUpdateSamples { } ``` -### ConnectedEnvironments_CheckNameAvailability +### ConnectedEnvironmentsDaprComponents_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; +import java.util.Arrays; /** - * Samples for ConnectedEnvironments CheckNameAvailability. + * Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ -public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { +public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** - * Sample code: Certificates_CheckNameAvailability. + * Sample code: Create or update dapr component. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments() - .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", - new CheckNameAvailabilityRequest().withName("testcertificatename") - .withType("Microsoft.App/connectedEnvironments/certificates"), - com.azure.core.util.Context.NONE); + createOrUpdateDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents() + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); } } ``` -### ConnectedEnvironments_CreateOrUpdate +### ConnectedEnvironmentsDaprComponents_Delete ```java -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; - /** - * Samples for ConnectedEnvironments CreateOrUpdate. + * Samples for ConnectedEnvironmentsDaprComponents Delete. */ -public final class ConnectedEnvironmentsCreateOrUpdateSamples { +public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsDaprComponents_Delete.json */ /** - * Sample code: Create kube environments. + * Sample code: Delete dapr component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments() - .define("testenv") - .withRegion("East US") - .withExistingResourceGroup("examplerg") - .withStaticIp("1.2.3.4") - .withDaprAIConnectionString( - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) - .create(); + public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_Delete +### ConnectedEnvironmentsDaprComponents_Get ```java /** - * Samples for ConnectedEnvironments Delete. + * Samples for ConnectedEnvironmentsDaprComponents Get. */ -public final class ConnectedEnvironmentsDeleteSamples { +public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Delete - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsDaprComponents_Get.json */ /** - * Sample code: Delete connected environment by connectedEnvironmentName. + * Sample code: Get Dapr Component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteConnectedEnvironmentByConnectedEnvironmentName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); + public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_GetByResourceGroup +### ConnectedEnvironmentsDaprComponents_List ```java /** - * Samples for ConnectedEnvironments GetByResourceGroup. + * Samples for ConnectedEnvironmentsDaprComponents List. */ -public final class ConnectedEnvironmentsGetByResourceGroupSamples { +public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Get. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsDaprComponents_List.json */ /** - * Sample code: Get connected environment by connectedEnvironmentName. + * Sample code: List Dapr Components. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getConnectedEnvironmentByConnectedEnvironmentName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments() - .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); + public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents() + .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_List +### ConnectedEnvironmentsDaprComponents_ListSecrets ```java /** - * Samples for ConnectedEnvironments List. + * Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ -public final class ConnectedEnvironmentsListSamples { +public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** - * Sample code: List connected environments by subscription. + * Sample code: List Container Apps Secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listConnectedEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().list(com.azure.core.util.Context.NONE); + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_ListByResourceGroup +### ConnectedEnvironmentsStorages_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.AccessMode; +import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; + /** - * Samples for ConnectedEnvironments ListByResourceGroup. + * Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ -public final class ConnectedEnvironmentsListByResourceGroupSamples { +public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** - * Sample code: List environments by resource group. + * Sample code: Create or update environments storage. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listEnvironmentsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); + createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages() + .define("jlaw-demo1") + .withExistingConnectedEnvironment("examplerg", "env") + .withProperties(new ConnectedEnvironmentStorageProperties() + .withAzureFile(new AzureFileProperties().withAccountName("account1") + .withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) + .create(); } } ``` -### ConnectedEnvironments_Update +### ConnectedEnvironmentsStorages_Delete ```java /** - * Samples for ConnectedEnvironments Update. + * Samples for ConnectedEnvironmentsStorages Delete. */ -public final class ConnectedEnvironmentsUpdateSamples { +public final class ConnectedEnvironmentsStoragesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsStorages_Delete. * json */ /** - * Sample code: Patch Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - patchManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsCertificates_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; - -/** - * Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. - */ -public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificate_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingConnectedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) - .create(); - } -} -``` - -### ConnectedEnvironmentsCertificates_Delete - -```java -/** - * Samples for ConnectedEnvironmentsCertificates Delete. - */ -public final class ConnectedEnvironmentsCertificatesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Delete.json - */ - /** - * Sample code: Delete Certificate. + * Sample code: List environments storages by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages() + .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_Get +### ConnectedEnvironmentsStorages_Get ```java /** - * Samples for ConnectedEnvironmentsCertificates Get. + * Samples for ConnectedEnvironmentsStorages Get. */ -public final class ConnectedEnvironmentsCertificatesGetSamples { +public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsStorages_Get. + * json */ /** - * Sample code: Get Certificate. + * Sample code: get a environments storage properties by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + public static void getAEnvironmentsStoragePropertiesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages() + .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_List +### ConnectedEnvironmentsStorages_List ```java /** - * Samples for ConnectedEnvironmentsCertificates List. + * Samples for ConnectedEnvironmentsStorages List. */ -public final class ConnectedEnvironmentsCertificatesListSamples { +public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsStorages_List. + * json */ /** - * Sample code: List Certificates by Connected Environment. + * Sample code: List environments storages by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listCertificatesByConnectedEnvironment( + public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates() - .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_Update +### ContainerApps_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.Affinity; +import com.azure.resourcemanager.appcontainers.models.AppProtocol; +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.CorsPolicy; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; +import com.azure.resourcemanager.appcontainers.models.Dapr; +import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; +import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; +import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.Scale; +import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.Service; +import com.azure.resourcemanager.appcontainers.models.ServiceBind; +import com.azure.resourcemanager.appcontainers.models.StorageType; +import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; +import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficWeight; +import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.Volume; +import com.azure.resourcemanager.appcontainers.models.VolumeMount; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for ConnectedEnvironmentsCertificates Update. - */ -public final class ConnectedEnvironmentsCertificatesUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificates_Patch.json - */ - /** - * Sample code: Patch Certificate. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = manager.connectedEnvironmentsCertificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // 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; - } -} -``` - -### ConnectedEnvironmentsDaprComponents_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; - -/** - * Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. + * Samples for ContainerApps CreateOrUpdate. */ -public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { +public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CreateOrUpdate.json */ /** - * Sample code: Create or update dapr component. + * Sample code: Create or Update Container App. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - createOrUpdateDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents() - .define("reddog") - .withExistingConnectedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) - .create(); - } -} -``` - -### ConnectedEnvironmentsDaprComponents_Delete - -```java -/** - * Samples for ConnectedEnvironmentsDaprComponents Delete. - */ -public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_Delete.json - */ - /** - * Sample code: Delete dapr component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsDaprComponents_Get - -```java -/** - * Samples for ConnectedEnvironmentsDaprComponents Get. - */ -public final class ConnectedEnvironmentsDaprComponentsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_Get.json - */ - /** - * Sample code: Get Dapr Component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsDaprComponents_List - -```java -/** - * Samples for ConnectedEnvironmentsDaprComponents List. - */ -public final class ConnectedEnvironmentsDaprComponentsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_List.json - */ - /** - * Sample code: List Dapr Components. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents() - .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsDaprComponents_ListSecrets - -```java -/** - * Samples for ConnectedEnvironmentsDaprComponents ListSecrets. - */ -public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_ListSecrets.json - */ - /** - * Sample code: List Container Apps Secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsStorages_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.AccessMode; -import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; - -/** - * Samples for ConnectedEnvironmentsStorages CreateOrUpdate. - */ -public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_CreateOrUpdate.json - */ - /** - * Sample code: Create or update environments storage. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages() - .define("jlaw-demo1") - .withExistingConnectedEnvironment("examplerg", "env") - .withProperties(new ConnectedEnvironmentStorageProperties() - .withAzureFile(new AzureFileProperties().withAccountName("account1") - .withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) - .create(); - } -} -``` - -### ConnectedEnvironmentsStorages_Delete - -```java -/** - * Samples for ConnectedEnvironmentsStorages Delete. - */ -public final class ConnectedEnvironmentsStoragesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_Delete.json - */ - /** - * Sample code: List environments storages by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsStoragesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages() - .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsStorages_Get - -```java -/** - * Samples for ConnectedEnvironmentsStorages Get. - */ -public final class ConnectedEnvironmentsStoragesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_Get.json - */ - /** - * Sample code: get a environments storage properties by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAEnvironmentsStoragePropertiesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages() - .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); - } -} -``` - -### ConnectedEnvironmentsStorages_List - -```java -/** - * Samples for ConnectedEnvironmentsStorages List. - */ -public final class ConnectedEnvironmentsStoragesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_List.json - */ - /** - * Sample code: List environments storages by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listEnvironmentsStoragesBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages() - .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.CorsPolicy; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.IdentitySettings; -import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; -import com.azure.resourcemanager.appcontainers.models.ImageType; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; -import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.Kind; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.PatchingMode; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.Runtime; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; -import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.Service; -import com.azure.resourcemanager.appcontainers.models.ServiceBind; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import com.azure.resourcemanager.appcontainers.models.Type; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import com.azure.resourcemanager.appcontainers.models.Volume; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ContainerApps CreateOrUpdate. - */ -public final class ContainerAppsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_SourceToCloudApp_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update SourceToCloud App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateSourceToCloudApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps() - .define("testcontainerApp0") + .define("testcontainerapp0") .withRegion("East US") .withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withWorkloadProfileName("My-GP-01") - .withPatchingConfiguration( - new ContainerAppPropertiesPatchingConfiguration().withPatchingMode(PatchingMode.AUTOMATIC)) .withConfiguration( new Configuration() .withIngress(new Ingress().withExternal(true) .withTargetPort(3000) .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") + .withRevisionName("testcontainerapp0-ab1234") .withWeight(100) .withLabel("production"))) .withCustomDomains(Arrays.asList(new CustomDomain() @@ -1718,18 +1093,18 @@ public final class ContainerAppsCreateOrUpdateSamples { .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true))) .withMaxInactiveRevisions(10) .withService(new Service().withType("redis"))) .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerapp0:v4") .withName("testinitcontainerApp0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) .withContainers(Arrays.asList(new Container() - .withImage("") - .withImageType(ImageType.CLOUD_BUILD) - .withName("testcontainerApp0") + .withImage("repo/testcontainerapp0:v1") + .withName("testcontainerapp0") .withVolumeMounts( Arrays.asList( new VolumeMount().withVolumeName("azurefile") @@ -1746,3555 +1121,2147 @@ public final class ContainerAppsCreateOrUpdateSamples { .withValue("Awesome"))) .withPath("/health") .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") - .withCustom(new CustomScaleRule().withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withCooldownPeriod(350) + .withPollingInterval(35) + .withRules(Arrays.asList( + new ScaleRule().withName("httpscalingrule") + .withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))), + new ScaleRule().withName("servicebus") + .withCustom(new CustomScaleRule().withType("azure-servicebus") + .withMetadata( + mapOf("messageCount", "5", "namespace", "mynamespace", "queueName", "myqueue")) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")), + new ScaleRule().withName("azure-queue") + .withAzureQueue(new QueueScaleRule().withAccountName("account1") + .withQueueName("queue1") + .withQueueLength(1) + .withIdentity("system"))))) .withVolumes(Arrays.asList( new Volume().withName("azurefile") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("storage"), - new Volume().withName("nfsazurefile") - .withStorageType(StorageType.NFS_AZURE_FILE) - .withStorageName("nfsStorage"))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService") - .withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json - */ - /** - * Sample code: Create or Update App On A Connected Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateAppOnAConnectedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration( - new Configuration() - .withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) - .withMaxAge(1234) - .withAllowCredentials(true)) - .withAdditionalPortMappings(Arrays.asList( - new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( - new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) - .withMaxInactiveRevisions(10)) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") - .withCustom(new CustomScaleRule().withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) - .create(); - } - - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_CreateOrUpdate - * .json - */ - /** - * Sample code: Create or Update Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", - new UserAssignedIdentity()))) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileName("My-GP-01") - .withConfiguration( - new Configuration() - .withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) - .withMaxAge(1234) - .withAllowCredentials(true)) - .withAdditionalPortMappings(Arrays.asList( - new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withRuntime(new Runtime().withJava(new RuntimeJava() - .withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent() - .withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings( - Arrays.asList(new LoggerSetting().withLogger("org.springframework.boot") - .withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis")) - .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") - .withLifecycle(IdentitySettingsLifeCycle.ALL), - new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withVolumeMounts( - Arrays.asList( - new VolumeMount().withVolumeName("azurefile") - .withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount() - .withVolumeName("nfsazurefile") - .withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes( - Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList( - new ScaleRule().withName("httpscalingrule") - .withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))), - new ScaleRule().withName("servicebus") - .withCustom(new CustomScaleRule().withType("azure-servicebus") - .withMetadata( - mapOf("messageCount", "5", "namespace", "mynamespace", "queueName", "myqueue")) - .withIdentity( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")), - new ScaleRule().withName("azure-queue") - .withAzureQueue(new QueueScaleRule().withAccountName("account1") - .withQueueName("queue1") - .withQueueLength(1) - .withIdentity("system"))))) - .withVolumes(Arrays.asList( - new Volume().withName("azurefile") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("storage"), - new Volume().withName("nfsazurefile") - .withStorageType(StorageType.NFS_AZURE_FILE) - .withStorageName("nfsStorage"))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService") - .withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_TcpApp_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update Tcp App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerAppTcp") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new Configuration().withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) - .withTraffic(Arrays - .asList(new TrafficWeight().withRevisionName("testcontainerAppTcp-ab1234").withWeight(100))))) - .withTemplate(new Template() - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppTcp:v1") - .withName("testcontainerAppTcp") - .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") - .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_Kind_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update App Kind. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerAppKind") - .withRegion("East Us") - .withExistingResourceGroup("rg") - .withManagedBy( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind") - .withKind(Kind.WORKFLOWAPP) - .withManagedEnvironmentId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3") - .withConfiguration(new Configuration().withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withIngress(new Ingress().withExternal(true).withTargetPort(80).withAllowInsecure(true))) - .withTemplate(new Template() - .withContainers(Arrays.asList(new Container().withImage("default/logicapps-base:latest") - .withName("logicapps-container") - .withResources(new ContainerResources().withCpu(1.0D).withMemory("2.0Gi")))) - .withScale( - new Scale().withMinReplicas(1).withMaxReplicas(30).withCooldownPeriod(350).withPollingInterval(35))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_ManagedBy_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update ManagedBy App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerAppManagedBy") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withManagedBy( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) - .withTraffic(Arrays - .asList(new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234").withWeight(100))))) - .withTemplate(new Template() - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppManagedBy:v1") - .withName("testcontainerAppManagedBy") - .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") - .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) - .create(); - } - - // 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; - } -} -``` - -### ContainerApps_Delete - -```java -/** - * Samples for ContainerApps Delete. - */ -public final class ContainerAppsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Delete.json - */ - /** - * Sample code: Delete Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().delete("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_GetAuthToken - -```java -/** - * Samples for ContainerApps GetAuthToken. - */ -public final class ContainerAppsGetAuthTokenSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_GetAuthToken. - * json - */ - /** - * Sample code: Get Container App Auth Token. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getContainerAppAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_GetByResourceGroup - -```java -/** - * Samples for ContainerApps GetByResourceGroup. - */ -public final class ContainerAppsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json - */ - /** - * Sample code: Get Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_List - -```java -/** - * Samples for ContainerApps List. - */ -public final class ContainerAppsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_ListBySubscription.json - */ - /** - * Sample code: List Container Apps by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().list(com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_ListByResourceGroup - -```java -/** - * Samples for ContainerApps ListByResourceGroup. - */ -public final class ContainerAppsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_ListByResourceGroup.json - */ - /** - * Sample code: List Container Apps by resource group. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_ListCustomHostnameAnalysis - -```java -/** - * Samples for ContainerApps ListCustomHostnameAnalysis. - */ -public final class ContainerAppsListCustomHostnameAnalysisSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_ListCustomHostNameAnalysis.json - */ - /** - * Sample code: Analyze Custom Hostname. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_ListSecrets - -```java -/** - * Samples for ContainerApps ListSecrets. - */ -public final class ContainerAppsListSecretsSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListSecrets. - * json - */ - /** - * Sample code: List Container Apps Secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_Start - -```java -/** - * Samples for ContainerApps Start. - */ -public final class ContainerAppsStartSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Start.json - */ - /** - * Sample code: Start Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void startContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().start("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_Stop - -```java -/** - * Samples for ContainerApps Stop. - */ -public final class ContainerAppsStopSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Stop.json - */ - /** - * Sample code: Stop Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void stopContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().stop("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerApps_Update - -```java -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.Runtime; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; -import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.Service; -import com.azure.resourcemanager.appcontainers.models.ServiceBind; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for ContainerApps Update. - */ -public final class ContainerAppsUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Patch.json - */ - /** - * Sample code: Patch Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ContainerApp resource = manager.containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) - .withDapr(new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( - new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis"))) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules( - Arrays.asList(new ScaleRule().withName("httpscalingrule") - .withCustom(new CustomScaleRule().withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") - .withName("service") - .withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) - .apply(); - } - - // 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; - } -} -``` - -### ContainerAppsAuthConfigs_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; - -/** - * Samples for ContainerAppsAuthConfigs CreateOrUpdate. - */ -public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_CreateOrUpdate. - * json - */ - /** - * Sample code: Create or Update Container App AuthConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withPlatform(new AuthPlatform().withEnabled(true)) - .withGlobalValidation( - new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) - .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( - new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) - .withEncryptionSettings( - new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") - .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) - .create(); - } -} -``` - -### ContainerAppsAuthConfigs_Delete - -```java -/** - * Samples for ContainerAppsAuthConfigs Delete. - */ -public final class ContainerAppsAuthConfigsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Delete.json - */ - /** - * Sample code: Delete Container App AuthConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - deleteContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs() - .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsAuthConfigs_Get - -```java -/** - * Samples for ContainerAppsAuthConfigs Get. - */ -public final class ContainerAppsAuthConfigsGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Get.json - */ - /** - * Sample code: Get Container App's AuthConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getContainerAppSAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsAuthConfigs_ListByContainerApp - -```java -/** - * Samples for ContainerAppsAuthConfigs ListByContainerApp. - */ -public final class ContainerAppsAuthConfigsListByContainerAppSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_ListByContainer. - * json - */ - /** - * Sample code: List Auth Configs by Container Apps. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listAuthConfigsByContainerApps(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs() - .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsBuilds_Delete - -```java -/** - * Samples for ContainerAppsBuilds Delete. - */ -public final class ContainerAppsBuildsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Delete. - * json - */ - /** - * Sample code: ContainerAppsBuilds_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsBuildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsBuilds().delete("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsBuilds_Get - -```java -/** - * Samples for ContainerAppsBuilds Get. - */ -public final class ContainerAppsBuildsGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Get.json - */ - /** - * Sample code: ContainerAppsBuilds_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsBuildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsBuilds().getWithResponse("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsBuildsByContainerApp_List - -```java -/** - * Samples for ContainerAppsBuildsByContainerApp List. - */ -public final class ContainerAppsBuildsByContainerAppListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsBuilds_ListByContainerApp.json - */ - /** - * Sample code: ContainerAppsBuilds_ListByContainerApp_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void containerAppsBuildsListByContainerApp0( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsBuildsByContainerApps().list("rg", "testCapp", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsDiagnostics_GetDetector - -```java -/** - * Samples for ContainerAppsDiagnostics GetDetector. - */ -public final class ContainerAppsDiagnosticsGetDetectorSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsDiagnostics_Get - * .json - */ - /** - * Sample code: Get Container App's diagnostics info. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getContainerAppSDiagnosticsInfo(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics() - .getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsDiagnostics_GetRevision - -```java -/** - * Samples for ContainerAppsDiagnostics GetRevision. - */ -public final class ContainerAppsDiagnosticsGetRevisionSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json - */ - /** - * Sample code: Get Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsDiagnostics_GetRoot - -```java -/** - * Samples for ContainerAppsDiagnostics GetRoot. - */ -public final class ContainerAppsDiagnosticsGetRootSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json - */ - /** - * Sample code: Get Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics() - .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsDiagnostics_ListDetectors - -```java -/** - * Samples for ContainerAppsDiagnostics ListDetectors. - */ -public final class ContainerAppsDiagnosticsListDetectorsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsDiagnostics_List.json - */ - /** - * Sample code: Get the list of available diagnostics for a given Container App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics() - .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsDiagnostics_ListRevisions - -```java -/** - * Samples for ContainerAppsDiagnostics ListRevisions. - */ -public final class ContainerAppsDiagnosticsListRevisionsSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json - */ - /** - * Sample code: List Container App's revisions. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics() - .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsPatches_Apply - -```java -/** - * Samples for ContainerAppsPatches Apply. - */ -public final class ContainerAppsPatchesApplySamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Apply. - * json - */ - /** - * Sample code: ContainerAppsPatches_Apply_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches().apply("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsPatches_Delete - -```java -/** - * Samples for ContainerAppsPatches Delete. - */ -public final class ContainerAppsPatchesDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Delete. - * json - */ - /** - * Sample code: ContainerAppsPatches_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches().delete("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsPatches_Get - -```java -/** - * Samples for ContainerAppsPatches Get. - */ -public final class ContainerAppsPatchesGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Get. - * json - */ - /** - * Sample code: ContainerAppsPatches_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches() - .getWithResponse("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsPatches_ListByContainerApp - -```java -/** - * Samples for ContainerAppsPatches ListByContainerApp. - */ -public final class ContainerAppsPatchesListByContainerAppSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsPatches_ListByContainerApp.json - */ - /** - * Sample code: ContainerAppsPatches_ListByContainerApp_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void containerAppsPatchesListByContainerApp0( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches().listByContainerApp("rg", "test-app", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsPatches_SkipConfigure - -```java -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; - -/** - * Samples for ContainerAppsPatches SkipConfigure. - */ -public final class ContainerAppsPatchesSkipConfigureSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsPatches_Skip_Configure.json - */ - /** - * Sample code: ContainerAppsPatches_Skip_Configure_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches() - .skipConfigure("rg", "test-app", "testPatch-25fe4b", new PatchSkipConfig().withSkip(true), - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisionReplicas_GetReplica - -```java -/** - * Samples for ContainerAppsRevisionReplicas GetReplica. - */ -public final class ContainerAppsRevisionReplicasGetReplicaSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_Get.json - */ - /** - * Sample code: Get Container App's revision replica. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisionReplicas() - .getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisionReplicas_ListReplicas - -```java -/** - * Samples for ContainerAppsRevisionReplicas ListReplicas. - */ -public final class ContainerAppsRevisionReplicasListReplicasSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_List.json - */ - /** - * Sample code: List Container App's replicas. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisionReplicas() - .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisions_ActivateRevision - -```java -/** - * Samples for ContainerAppsRevisions ActivateRevision. - */ -public final class ContainerAppsRevisionsActivateRevisionSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Activate.json - */ - /** - * Sample code: Activate Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions() - .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisions_DeactivateRevision - -```java -/** - * Samples for ContainerAppsRevisions DeactivateRevision. - */ -public final class ContainerAppsRevisionsDeactivateRevisionSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Deactivate.json - */ - /** - * Sample code: Deactivate Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions() - .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisions_GetRevision - -```java -/** - * Samples for ContainerAppsRevisions GetRevision. - */ -public final class ContainerAppsRevisionsGetRevisionSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json - */ - /** - * Sample code: Get Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions() - .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisions_ListRevisions - -```java -/** - * Samples for ContainerAppsRevisions ListRevisions. - */ -public final class ContainerAppsRevisionsListRevisionsSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json - */ - /** - * Sample code: List Container App's revisions. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions() - .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsRevisions_RestartRevision - -```java -/** - * Samples for ContainerAppsRevisions RestartRevision. - */ -public final class ContainerAppsRevisionsRestartRevisionSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Restart.json - */ - /** - * Sample code: Restart Container App's revision. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions() - .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsSessionPools_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.ContainerType; -import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; -import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExecutionType; -import com.azure.resourcemanager.appcontainers.models.PoolManagementType; -import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionContainer; -import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; -import com.azure.resourcemanager.appcontainers.models.SessionIngress; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; -import java.util.Arrays; - -/** - * Samples for ContainerAppsSessionPools CreateOrUpdate. - */ -public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_CreateOrUpdate. - * json - */ - /** - * Sample code: Create or Update Session Pool. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSessionPools() - .define("testsessionpool") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withContainerType(ContainerType.CUSTOM_CONTAINER) - .withPoolManagementType(PoolManagementType.DYNAMIC) - .withScaleConfiguration( - new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) - .withDynamicPoolConfiguration( - new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) - .withCustomContainerTemplate(new CustomContainerTemplate() - .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") - .withName("testinitcontainer") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) - .withIngress(new SessionIngress().withTargetPort(80))) - .withSessionNetworkConfiguration( - new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) - .create(); - } -} -``` - -### ContainerAppsSessionPools_Delete - -```java -/** - * Samples for ContainerAppsSessionPools Delete. - */ -public final class ContainerAppsSessionPoolsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Delete.json - */ - /** - * Sample code: Delete Session Pool. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSessionPools().delete("rg", "testsessionpool", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsSessionPools_GetByResourceGroup - -```java -/** - * Samples for ContainerAppsSessionPools GetByResourceGroup. - */ -public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Get.json - */ - /** - * Sample code: Get Session Pool. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSessionPools() - .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsSessionPools_List - -```java -/** - * Samples for ContainerAppsSessionPools List. - */ -public final class ContainerAppsSessionPoolsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SessionPools_ListBySubscription.json - */ - /** - * Sample code: List Session Pools by subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listSessionPoolsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSessionPools().list(com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsSessionPools_ListByResourceGroup - -```java -/** - * Samples for ContainerAppsSessionPools ListByResourceGroup. - */ -public final class ContainerAppsSessionPoolsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SessionPools_ListByResourceGroup.json - */ - /** - * Sample code: List Session Pools by resource group. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listSessionPoolsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSessionPools().listByResourceGroup("rg", com.azure.core.util.Context.NONE); - } -} -``` - -### ContainerAppsSessionPools_Update - -```java -import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; -import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExecutionType; -import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionContainer; -import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; -import com.azure.resourcemanager.appcontainers.models.SessionIngress; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; -import com.azure.resourcemanager.appcontainers.models.SessionPool; -import java.util.Arrays; - -/** - * Samples for ContainerAppsSessionPools Update. - */ -public final class ContainerAppsSessionPoolsUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Patch.json - */ - /** - * Sample code: Update Session Pool. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void updateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - SessionPool resource = manager.containerAppsSessionPools() - .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withScaleConfiguration( - new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) - .withDynamicPoolConfiguration( - new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) - .withCustomContainerTemplate(new CustomContainerTemplate() - .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") - .withName("testinitcontainer") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) - .withIngress(new SessionIngress().withTargetPort(80))) - .withSessionNetworkConfiguration( - new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) - .apply(); + .withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService")))) + .create(); } -} -``` - -### ContainerAppsSourceControls_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.AzureCredentials; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.RegistryInfo; -import java.util.Arrays; -/** - * Samples for ContainerAppsSourceControls CreateOrUpdate. - */ -public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SourceControls_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_TcpApp_CreateOrUpdate. + * json */ /** - * Sample code: Create or Update Container App SourceControl. + * Sample code: Create or Update Tcp App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withRepoUrl("https://github.com/xwang971/ghatest") - .withBranch("master") - .withGithubActionConfiguration(new GithubActionConfiguration() - .withRegistryInfo(new RegistryInfo().withRegistryUrl("test-registry.azurecr.io") - .withRegistryUsername("test-registry") - .withRegistryPassword("fakeTokenPlaceholder")) - .withAzureCredentials(new AzureCredentials().withClientId("") - .withClientSecret("fakeTokenPlaceholder") - .withTenantId("") - .withKind("feaderated")) - .withContextPath("./") - .withDockerfilePath("./Dockerfile") - .withGithubPersonalAccessToken("fakeTokenPlaceholder") - .withImage("image/tag") - .withBuildEnvironmentVariables( - Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), - new EnvironmentVariable().withName("foo2").withValue("bar2")))) - .withXMsGithubAuxiliary("githubaccesstoken") + public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .define("testcontainerapptcp") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration( + new Configuration().withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerapptcp-ab1234").withWeight(100))))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerapptcp:v1") + .withName("testcontainerapptcp") + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withCooldownPeriod(350) + .withPollingInterval(35) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } -} -``` -### ContainerAppsSourceControls_Delete - -```java -/** - * Samples for ContainerAppsSourceControls Delete. - */ -public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** - * Sample code: Delete Container App SourceControl. + * Sample code: Create or Update ManagedBy App. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls() - .delete("workerapps-rg-xj", "testcanadacentral", "current", "githubaccesstoken", false, false, - com.azure.core.util.Context.NONE); + createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .define("testcontainerappmanagedby") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerappmanagedby-ab1234").withWeight(100))))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerappmanagedby:v1") + .withName("testcontainerappmanagedby") + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withCooldownPeriod(350) + .withPollingInterval(35) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) + .create(); + } + + // 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; } } ``` -### ContainerAppsSourceControls_Get +### ContainerApps_Delete ```java /** - * Samples for ContainerAppsSourceControls Get. + * Samples for ContainerApps Delete. */ -public final class ContainerAppsSourceControlsGetSamples { +public final class ContainerAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Delete.json */ /** - * Sample code: Get Container App's SourceControl. + * Sample code: Delete Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - getContainerAppSSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().delete("rg", "testworkerapp0", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsSourceControls_ListByContainerApp +### ContainerApps_GetAuthToken ```java /** - * Samples for ContainerAppsSourceControls ListByContainerApp. + * Samples for ContainerApps GetAuthToken. */ -public final class ContainerAppsSourceControlsListByContainerAppSamples { +public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SourceControls_ListByContainer.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_GetAuthToken.json */ /** - * Sample code: List App's Source Controls. + * Sample code: Get Container App Auth Token. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls() - .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); + public static void + getContainerAppAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } } ``` -### DaprComponentResiliencyPolicies_CreateOrUpdate +### ContainerApps_GetByResourceGroup ```java -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; - /** - * Samples for DaprComponentResiliencyPolicies CreateOrUpdate. + * Samples for ContainerApps GetByResourceGroup. */ -public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { +public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json */ /** - * Sample code: Create or update dapr component resiliency policy with outbound policy only. + * Sample code: Get Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .define("myresiliencypolicy") - .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100) - .withMaxIntervalInMilliseconds(30000))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) - .withTimeoutInSeconds(20) - .withIntervalInSeconds(60))) - .create(); + public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json - */ - /** - * Sample code: Create or update dapr component resiliency policy with all options. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .define("myresiliencypolicy") - .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(15) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000) - .withMaxIntervalInMilliseconds(5500))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(30)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(5) - .withTimeoutInSeconds(10) - .withIntervalInSeconds(4))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100) - .withMaxIntervalInMilliseconds(30000))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) - .withTimeoutInSeconds(20) - .withIntervalInSeconds(60))) - .create(); - } +### ContainerApps_List +```java +/** + * Samples for ContainerApps List. + */ +public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_ListBySubscription.json */ /** - * Sample code: Create or update dapr component resiliency policy with sparse options. + * Sample code: List Container Apps by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .define("myresiliencypolicy") - .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000) - .withMaxIntervalInMilliseconds(5500))) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) - .withTimeoutInSeconds(20))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration().withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12))) - .create(); + public static void + listContainerAppsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().list(com.azure.core.util.Context.NONE); } } ``` -### DaprComponentResiliencyPolicies_Delete +### ContainerApps_ListByResourceGroup ```java /** - * Samples for DaprComponentResiliencyPolicies Delete. + * Samples for ContainerApps ListByResourceGroup. */ -public final class DaprComponentResiliencyPoliciesDeleteSamples { +public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicies_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_ListByResourceGroup. + * json */ /** - * Sample code: Delete dapr component resiliency policy. + * Sample code: List Container Apps by resource group. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - deleteDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", - com.azure.core.util.Context.NONE); + listContainerAppsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` -### DaprComponentResiliencyPolicies_Get +### ContainerApps_ListCustomHostnameAnalysis ```java /** - * Samples for DaprComponentResiliencyPolicies Get. + * Samples for ContainerApps ListCustomHostnameAnalysis. */ -public final class DaprComponentResiliencyPoliciesGetSamples { +public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicies_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * ContainerApps_ListCustomHostNameAnalysis.json */ /** - * Sample code: Get Dapr component resiliency policy. + * Sample code: Analyze Custom Hostname. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - getDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .getWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", + public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .listCustomHostnameAnalysisWithResponse("rg", "testcontainerapp0", "my.name.corp", com.azure.core.util.Context.NONE); } } ``` -### DaprComponentResiliencyPolicies_List +### ContainerApps_ListSecrets ```java /** - * Samples for DaprComponentResiliencyPolicies List. + * Samples for ContainerApps ListSecrets. */ -public final class DaprComponentResiliencyPoliciesListSamples { +public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicies_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_ListSecrets.json */ /** - * Sample code: List Dapr component resiliency policies. + * Sample code: List Container Apps Secrets. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listDaprComponentResiliencyPolicies(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .list("examplerg", "myenvironment", "mydaprcomponent", com.azure.core.util.Context.NONE); + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().listSecretsWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_CreateOrUpdate +### ContainerApps_Start ```java -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; - /** - * Samples for DaprComponents CreateOrUpdate. + * Samples for ContainerApps Start. */ -public final class DaprComponentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponents_CreateOrUpdate_Secrets.json - */ - /** - * Sample code: Create or update dapr component with secrets. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentWithSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents() - .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), - com.azure.core.util.Context.NONE); - } - +public final class ContainerAppsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Start.json */ /** - * Sample code: Create or update dapr component with secret store component. + * Sample code: Start Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponentWithSecretStoreComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents() - .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("fakeTokenPlaceholder") - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), - com.azure.core.util.Context.NONE); + public static void startContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().start("rg", "testworkerapp0", com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_Delete +### ContainerApps_Stop ```java /** - * Samples for DaprComponents Delete. + * Samples for ContainerApps Stop. */ -public final class DaprComponentsDeleteSamples { +public final class ContainerAppsStopSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Stop.json */ /** - * Sample code: Delete dapr component. + * Sample code: Stop Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void stopContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().stop("rg", "testworkerApp0", com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_Get +### ContainerApps_Update ```java +import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.Affinity; +import com.azure.resourcemanager.appcontainers.models.AppProtocol; +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; +import com.azure.resourcemanager.appcontainers.models.Dapr; +import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.Scale; +import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.Service; +import com.azure.resourcemanager.appcontainers.models.ServiceBind; +import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficWeight; +import com.azure.resourcemanager.appcontainers.models.Type; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for DaprComponents Get. + * Samples for ContainerApps Update. */ -public final class DaprComponentsGetSamples { +public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Patch.json */ /** - * Sample code: Get Dapr Component with secret store component. + * Sample code: Patch Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponentWithSecretStoreComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ContainerApp resource = manager.containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerapp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr(new Dapr().withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true))) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerapp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerapp0:v1") + .withName("testcontainerapp0") + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withCooldownPeriod(350) + .withPollingInterval(35) + .withRules( + Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") + .withName("service")))) + .apply(); + } + + // 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; } +} +``` + +### ContainerAppsAuthConfigs_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.AppRegistration; +import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; +import com.azure.resourcemanager.appcontainers.models.Facebook; +import com.azure.resourcemanager.appcontainers.models.GlobalValidation; +import com.azure.resourcemanager.appcontainers.models.IdentityProviders; +import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; +/** + * Samples for ContainerAppsAuthConfigs CreateOrUpdate. + */ +public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Get_Secrets. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_CreateOrUpdate.json */ /** - * Sample code: Get Dapr Component with secrets. + * Sample code: Create or Update Container App AuthConfig. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getDaprComponentWithSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + createOrUpdateContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .define("current") + .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) + .create(); } } ``` -### DaprComponents_List +### ContainerAppsAuthConfigs_Delete ```java /** - * Samples for DaprComponents List. + * Samples for ContainerAppsAuthConfigs Delete. */ -public final class DaprComponentsListSamples { +public final class ContainerAppsAuthConfigsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_Delete.json */ /** - * Sample code: List Dapr Components. + * Sample code: Delete Container App AuthConfig. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + public static void + deleteContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_ListSecrets +### ContainerAppsAuthConfigs_Get ```java /** - * Samples for DaprComponents ListSecrets. + * Samples for ContainerAppsAuthConfigs Get. */ -public final class DaprComponentsListSecretsSamples { +public final class ContainerAppsAuthConfigsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_ListSecrets. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_Get.json */ /** - * Sample code: List Container Apps Secrets. + * Sample code: Get Container App's AuthConfig. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + getContainerAppSAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` -### DaprSubscriptions_CreateOrUpdate +### ContainerAppsAuthConfigs_ListByContainerApp ```java -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DaprSubscriptions CreateOrUpdate. + * Samples for ContainerAppsAuthConfigs ListByContainerApp. */ -public final class DaprSubscriptionsCreateOrUpdateSamples { +public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_ListByContainer.json */ /** - * Sample code: Create or update dapr subscription with route rules and metadata. + * Sample code: List Auth Configs by Container Apps. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withPubsubName("mypubsubcomponent") - .withTopic("inventory") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList( - new DaprSubscriptionRouteRule().withMatch("event.type == 'widget'").withPath("/widgets"), - new DaprSubscriptionRouteRule().withMatch("event.type == 'gadget'").withPath("/gadgets"))) - .withDefaultProperty("/products")) - .withMetadata(mapOf("foo", "bar", "hello", "world")) - .create(); + public static void + listAuthConfigsByContainerApps(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json - */ - /** - * Sample code: Create or update dapr subscription with default route only. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withPubsubName("mypubsubcomponent") - .withTopic("inventory") - .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) - .create(); - } +### ContainerAppsDiagnostics_GetDetector +```java +/** + * Samples for ContainerAppsDiagnostics GetDetector. + */ +public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerAppsDiagnostics_Get.json */ /** - * Sample code: Create or update dapr subscription with bulk subscribe configuration and scopes. + * Sample code: Get Container App's diagnostics info. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withPubsubName("mypubsubcomponent") - .withTopic("inventory") - .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) - .withScopes(Arrays.asList("warehouseapp", "customersupportapp")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(123) - .withMaxAwaitDurationMs(500)) - .create(); - } - - // 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; + public static void + getContainerAppSDiagnosticsInfo(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", + com.azure.core.util.Context.NONE); } } ``` -### DaprSubscriptions_Delete +### ContainerAppsDiagnostics_GetRevision ```java /** - * Samples for DaprSubscriptions Delete. + * Samples for ContainerAppsDiagnostics GetRevision. */ -public final class DaprSubscriptionsDeleteSamples { +public final class ContainerAppsDiagnosticsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_Delete. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Get.json */ /** - * Sample code: Delete dapr subscription. + * Sample code: Get Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteDaprSubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .deleteWithResponse("examplerg", "myenvironment", "mysubscription", com.azure.core.util.Context.NONE); + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### DaprSubscriptions_Get +### ContainerAppsDiagnostics_GetRoot ```java /** - * Samples for DaprSubscriptions Get. + * Samples for ContainerAppsDiagnostics GetRoot. */ -public final class DaprSubscriptionsGetSamples { +public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_Get_DefaultRoute.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json */ /** - * Sample code: Get Dapr subscription with bulk subscribe configuration and scopes. + * Sample code: Get Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); + public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics() + .getRootWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } +} +``` - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_Get_BulkSubscribeAndScopes.json - */ - /** - * Sample code: Get Dapr subscription with default route only. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprSubscriptionWithDefaultRouteOnly( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); - } +### ContainerAppsDiagnostics_ListDetectors +```java +/** + * Samples for ContainerAppsDiagnostics ListDetectors. + */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_Get_RouteRulesAndMetadata.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerAppsDiagnostics_List.json */ /** - * Sample code: GetDapr subscription with route rules and metadata. + * Sample code: Get the list of available diagnostics for a given Container App. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprSubscriptionWithRouteRulesAndMetadata( + public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); } } ``` -### DaprSubscriptions_List +### ContainerAppsDiagnostics_ListRevisions ```java /** - * Samples for DaprSubscriptions List. + * Samples for ContainerAppsDiagnostics ListRevisions. */ -public final class DaprSubscriptionsListSamples { +public final class ContainerAppsDiagnosticsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_List.json */ /** - * Sample code: List Dapr subscriptions. + * Sample code: List Container App's revisions. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listDaprSubscriptions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } ``` -### DotNetComponents_CreateOrUpdate +### ContainerAppsRevisionReplicas_GetReplica ```java -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; - /** - * Samples for DotNetComponents CreateOrUpdate. + * Samples for ContainerAppsRevisionReplicas GetReplica. */ -public final class DotNetComponentsCreateOrUpdateSamples { +public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Replicas_Get.json */ /** - * Sample code: Create or Update .NET Component. + * Sample code: Get Container App's revision replica. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - createOrUpdateNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .define("mydotnetcomponent") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .create(); + getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas() + .getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", + com.azure.core.util.Context.NONE); } +} +``` + +### ContainerAppsRevisionReplicas_ListReplicas +```java +/** + * Samples for ContainerAppsRevisionReplicas ListReplicas. + */ +public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_CreateOrUpdate_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Replicas_List.json */ /** - * Sample code: Create or Update .NET Component with ServiceBinds. + * Sample code: List Container App's replicas. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateNETComponentWithServiceBinds( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .define("mydotnetcomponent") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") - .withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) - .create(); + public static void + listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas() + .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); } } ``` -### DotNetComponents_Delete +### ContainerAppsRevisions_ActivateRevision ```java /** - * Samples for DotNetComponents Delete. + * Samples for ContainerAppsRevisions ActivateRevision. */ -public final class DotNetComponentsDeleteSamples { +public final class ContainerAppsRevisionsActivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Activate.json */ /** - * Sample code: Delete .NET Component. + * Sample code: Activate Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .delete("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); + public static void + activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### DotNetComponents_Get +### ContainerAppsRevisions_DeactivateRevision ```java /** - * Samples for DotNetComponents Get. + * Samples for ContainerAppsRevisions DeactivateRevision. */ -public final class DotNetComponentsGetSamples { +public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_Get_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Deactivate.json */ /** - * Sample code: Get .NET Component with ServiceBinds. + * Sample code: Deactivate Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); + deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } +} +``` + +### ContainerAppsRevisions_GetRevision +```java +/** + * Samples for ContainerAppsRevisions GetRevision. + */ +public final class ContainerAppsRevisionsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Get.json */ /** - * Sample code: Get .NET Component. + * Sample code: Get Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### DotNetComponents_List +### ContainerAppsRevisions_ListRevisions ```java /** - * Samples for DotNetComponents List. + * Samples for ContainerAppsRevisions ListRevisions. */ -public final class DotNetComponentsListSamples { +public final class ContainerAppsRevisionsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_List.json */ /** - * Sample code: List .NET Components. + * Sample code: List Container App's revisions. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listNETComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } +} +``` + +### ContainerAppsRevisions_RestartRevision +```java +/** + * Samples for ContainerAppsRevisions RestartRevision. + */ +public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_List_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Restart.json */ /** - * Sample code: List .NET Components with ServiceBinds. + * Sample code: Restart Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listNETComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### DotNetComponents_Update +### ContainerAppsSessionPools_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import com.azure.resourcemanager.appcontainers.models.ContainerType; +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; +import com.azure.resourcemanager.appcontainers.models.LifecycleConfiguration; +import com.azure.resourcemanager.appcontainers.models.LifecycleType; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.PoolManagementType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionContainer; +import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; +import com.azure.resourcemanager.appcontainers.models.SessionIngress; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionRegistryCredentials; import java.util.Arrays; /** - * Samples for DotNetComponents Update. + * Samples for ContainerAppsSessionPools CreateOrUpdate. */ -public final class DotNetComponentsUpdateSamples { +public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_Patch_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * SessionPools_LifecycleOnContainerExit_CreateOrUpdate.json */ /** - * Sample code: Patch .NET Component with ServiceBinds. + * Sample code: Create or Update Session Pool with lifecycle OnContainerExit Timed. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - patchNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - DotNetComponent resource = manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") - .withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) - .apply(); + public static void createOrUpdateSessionPoolWithLifecycleOnContainerExitTimed( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .define("testsessionpool") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withContainerType(ContainerType.CUSTOM_CONTAINER) + .withPoolManagementType(PoolManagementType.DYNAMIC) + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration(new DynamicPoolConfiguration().withLifecycleConfiguration( + new LifecycleConfiguration().withLifecycleType(LifecycleType.ON_CONTAINER_EXIT) + .withMaxAlivePeriodInSeconds(86400))) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withRegistryCredentials(new SessionRegistryCredentials().withServer("test.azurecr.io") + .withIdentity( + "/subscriptions/7a497526-bb8d-4816-9795-db1418a1f977/resourcegroups/test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testSP")) + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .withManagedIdentitySettings(Arrays.asList( + new ManagedIdentitySetting().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.MAIN))) + .create(); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * SessionPools_LifecycleTimed_CreateOrUpdate.json */ /** - * Sample code: Patch .NET Component. + * Sample code: Create or Update Session Pool with lifecycle type Timed. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - DotNetComponent resource = manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .apply(); + public static void createOrUpdateSessionPoolWithLifecycleTypeTimed( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .define("testsessionpool") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withContainerType(ContainerType.CUSTOM_CONTAINER) + .withPoolManagementType(PoolManagementType.DYNAMIC) + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration(new DynamicPoolConfiguration().withLifecycleConfiguration( + new LifecycleConfiguration().withLifecycleType(LifecycleType.ON_CONTAINER_EXIT) + .withMaxAlivePeriodInSeconds(86400))) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withRegistryCredentials(new SessionRegistryCredentials().withServer("test.azurecr.io") + .withIdentity( + "/subscriptions/7a497526-bb8d-4816-9795-db1418a1f977/resourcegroups/test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testSP")) + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .withManagedIdentitySettings(Arrays.asList( + new ManagedIdentitySetting().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.MAIN))) + .create(); } } ``` -### FunctionsExtension_InvokeFunctionsHost +### ContainerAppsSessionPools_Delete ```java /** - * Samples for FunctionsExtension InvokeFunctionsHost. + * Samples for ContainerAppsSessionPools Delete. */ -public final class FunctionsExtensionInvokeFunctionsHostSamples { +public final class ContainerAppsSessionPoolsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/FunctionsExtension_Post.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_Delete.json */ /** - * Sample code: Invoke Functions host using Functions Extension API. + * Sample code: Delete Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void invokeFunctionsHostUsingFunctionsExtensionAPI( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.functionsExtensions() - .invokeFunctionsHostWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void deleteSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().delete("rg", "testsessionpool", com.azure.core.util.Context.NONE); } } ``` -### JavaComponents_CreateOrUpdate +### ContainerAppsSessionPools_GetByResourceGroup ```java -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; -import java.util.Arrays; - /** - * Samples for JavaComponents CreateOrUpdate. + * Samples for ContainerAppsSessionPools GetByResourceGroup. */ -public final class JavaComponentsCreateOrUpdateSamples { +public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_CreateOrUpdate_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_Get.json */ /** - * Sample code: Create or Update Java Component with ServiceBinds. + * Sample code: Get Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateJavaComponentWithServiceBinds( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents() - .define("myjavacomponent") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") - .withValue("true"), - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") - .withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) - .create(); + public static void getSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsSessionPools_List + +```java +/** + * Samples for ContainerAppsSessionPools List. + */ +public final class ContainerAppsSessionPoolsListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_ListBySubscription.json + */ + /** + * Sample code: List Session Pools by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listSessionPoolsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().list(com.azure.core.util.Context.NONE); } +} +``` + +### ContainerAppsSessionPools_ListByResourceGroup +```java +/** + * Samples for ContainerAppsSessionPools ListByResourceGroup. + */ +public final class ContainerAppsSessionPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_ListByResourceGroup.json */ /** - * Sample code: Create or Update Java Component. + * Sample code: List Session Pools by resource group. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents() - .define("myjavacomponent") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") - .withValue("true"), - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1))) - .create(); + listSessionPoolsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` -### JavaComponents_Delete +### ContainerAppsSessionPools_Update ```java +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionContainer; +import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; +import com.azure.resourcemanager.appcontainers.models.SessionIngress; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionPool; +import java.util.Arrays; + /** - * Samples for JavaComponents Delete. + * Samples for ContainerAppsSessionPools Update. */ -public final class JavaComponentsDeleteSamples { +public final class ContainerAppsSessionPoolsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_Patch.json */ /** - * Sample code: Delete Java Component. + * Sample code: Update Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents() - .delete("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); + public static void updateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + SessionPool resource = manager.containerAppsSessionPools() + .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .apply(); } } ``` -### JavaComponents_Get +### ContainerAppsSourceControls_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.AzureCredentials; +import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; +import com.azure.resourcemanager.appcontainers.models.RegistryInfo; + /** - * Samples for JavaComponents Get. + * Samples for ContainerAppsSourceControls CreateOrUpdate. */ -public final class JavaComponentsGetSamples { +public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_CreateOrUpdate.json */ /** - * Sample code: Get Java Component. + * Sample code: Create or Update Container App SourceControl. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents() - .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); + public static void createOrUpdateContainerAppSourceControl( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls() + .define("current") + .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") + .withRepoUrl("https://github.com/xwang971/ghatest") + .withBranch("master") + .withGithubActionConfiguration(new GithubActionConfiguration() + .withRegistryInfo(new RegistryInfo().withRegistryUrl("test-registry.azurecr.io") + .withRegistryUsername("test-registry") + .withRegistryPassword("fakeTokenPlaceholder")) + .withAzureCredentials(new AzureCredentials().withClientId("") + .withClientSecret("fakeTokenPlaceholder") + .withTenantId("") + .withKind("feaderated")) + .withContextPath("./") + .withGithubPersonalAccessToken("fakeTokenPlaceholder") + .withImage("image/tag")) + .create(); } +} +``` + +### ContainerAppsSourceControls_Delete +```java +/** + * Samples for ContainerAppsSourceControls Delete. + */ +public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_Get_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_Delete.json */ /** - * Sample code: Get Java Component with ServiceBinds. + * Sample code: Delete Container App SourceControl. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents() - .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); + deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls() + .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` -### JavaComponents_List +### ContainerAppsSourceControls_Get ```java /** - * Samples for JavaComponents List. + * Samples for ContainerAppsSourceControls Get. */ -public final class JavaComponentsListSamples { +public final class ContainerAppsSourceControlsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_Get.json */ /** - * Sample code: List Java Components. + * Sample code: Get Container App's SourceControl. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listJavaComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + public static void + getContainerAppSSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls() + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } +} +``` +### ContainerAppsSourceControls_ListByContainerApp + +```java +/** + * Samples for ContainerAppsSourceControls ListByContainerApp. + */ +public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_List_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_ListByContainer.json */ /** - * Sample code: List Java Components with ServiceBinds. + * Sample code: List App's Source Controls. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - listJavaComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } ``` -### JavaComponents_Update +### DaprComponents_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; /** - * Samples for JavaComponents Update. + * Samples for DaprComponents CreateOrUpdate. */ -public final class JavaComponentsUpdateSamples { +public final class DaprComponentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_CreateOrUpdate_Secrets + * .json */ /** - * Sample code: Patch Java Component. + * Sample code: Create or update dapr component with secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - JavaComponent resource = manager.javaComponents() - .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") - .withValue("true"), - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1))) - .apply(); + public static void createOrUpdateDaprComponentWithSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents() + .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_Patch_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** - * Sample code: Patch Java Component with ServiceBinds. + * Sample code: Create or update dapr component with secret store component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - patchJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - JavaComponent resource = manager.javaComponents() - .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") - .withValue("true"), - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") - .withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) - .apply(); + public static void createOrUpdateDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents() + .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + com.azure.core.util.Context.NONE); } } ``` -### Jobs_CreateOrUpdate - -```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.IdentitySettings; -import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.JobConfiguration; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; -import com.azure.resourcemanager.appcontainers.models.JobScale; -import com.azure.resourcemanager.appcontainers.models.JobScaleRule; -import com.azure.resourcemanager.appcontainers.models.JobTemplate; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.TriggerType; -import com.azure.resourcemanager.appcontainers.models.Type; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +### DaprComponents_Delete +```java /** - * Samples for Jobs CreateOrUpdate. + * Samples for DaprComponents Delete. */ -public final class JobsCreateOrUpdateSamples { +public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Job_CreateorUpdate_ConnectedEnvironment.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_Delete.json */ /** - * Sample code: Create or Update Container Apps Job On A Connected Environment. + * Sample code: Delete dapr component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(5) - .withPeriodSeconds(3) - .withType(Type.LIVENESS)))))) - .create(); + public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } +} +``` + +### DaprComponents_Get +```java +/** + * Samples for DaprComponents Get. + */ +public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * DaprComponents_Get_SecretStoreComponent.json */ /** - * Sample code: Create or Update Container Apps Job With Event Driven Trigger. + * Sample code: Get Dapr Component with secret store component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { - manager.jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", - new UserAssignedIdentity()))) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withEventTriggerConfig(new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1) - .withParallelism(4) - .withScale(new JobScale().withPollingInterval(40) - .withMinExecutions(1) - .withMaxExecutions(5) - .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON)) - .withIdentity( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList( - new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0")))) - .create(); + public static void getDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_CreateorUpdate.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_Get_Secrets.json */ /** - * Sample code: Create or Update Container Apps Job. + * Sample code: Get Dapr Component with secrets. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", - new UserAssignedIdentity()))) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4)) - .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") - .withLifecycle(IdentitySettingsLifeCycle.ALL), - new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile") - .withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile") - .withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(5) - .withPeriodSeconds(3) - .withType(Type.LIVENESS)))))) - .create(); - } - - // 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; + getDaprComponentWithSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` -### Jobs_Delete +### DaprComponents_List ```java /** - * Samples for Jobs Delete. + * Samples for DaprComponents List. */ -public final class JobsDeleteSamples { +public final class DaprComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_List.json */ /** - * Sample code: Delete Container Apps Job. + * Sample code: List Dapr Components. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().delete("rg", "testWorkerContainerAppsJob0", com.azure.core.util.Context.NONE); + public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### Jobs_GetByResourceGroup +### DaprComponents_ListSecrets ```java /** - * Samples for Jobs GetByResourceGroup. + * Samples for DaprComponents ListSecrets. */ -public final class JobsGetByResourceGroupSamples { +public final class DaprComponentsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_ListSecrets.json */ /** - * Sample code: Get Container Apps Job. + * Sample code: List Container Apps Secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` -### Jobs_GetDetector +### JavaComponents_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; +import java.util.Arrays; + /** - * Samples for Jobs GetDetector. + * Samples for JavaComponents CreateOrUpdate. */ -public final class JobsGetDetectorSamples { +public final class JavaComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * JavaComponents_CreateOrUpdate_ServiceBind.json + */ + /** + * Sample code: Create or Update Java Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateJavaComponentWithServiceBinds( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents() + .define("myjavacomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1)) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) + .create(); + } + /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_GetDetector.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_CreateOrUpdate.json */ /** - * Sample code: Get diagnostic data for a Container App Job. + * Sample code: Create or Update Java Component. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getDiagnosticDataForAContainerAppJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs() - .getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", - com.azure.core.util.Context.NONE); + createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents() + .define("myjavacomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1))) + .create(); } } ``` -### Jobs_List +### JavaComponents_Delete ```java /** - * Samples for Jobs List. + * Samples for JavaComponents Delete. */ -public final class JobsListSamples { +public final class JavaComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListBySubscription.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Delete.json */ /** - * Sample code: List Container Apps Jobs by subscription. + * Sample code: Delete Java Component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - listContainerAppsJobsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().list(com.azure.core.util.Context.NONE); + public static void deleteJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents() + .delete("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } } ``` -### Jobs_ListByResourceGroup +### JavaComponents_Get ```java /** - * Samples for Jobs ListByResourceGroup. + * Samples for JavaComponents Get. */ -public final class JobsListByResourceGroupSamples { +public final class JavaComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListByResourceGroup. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Get.json */ /** - * Sample code: List Container Apps Jobs by resource group. + * Sample code: Get Java Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Get_ServiceBind.json + */ + /** + * Sample code: Get Java Component with ServiceBinds. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listContainerAppsJobsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + getJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } } ``` -### Jobs_ListDetectors +### JavaComponents_List ```java /** - * Samples for Jobs ListDetectors. + * Samples for JavaComponents List. */ -public final class JobsListDetectorsSamples { +public final class JavaComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListDetectors.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_List.json */ /** - * Sample code: Get the list of available diagnostic data for a Container App Job. + * Sample code: List Java Components. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getTheListOfAvailableDiagnosticDataForAContainerAppJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().listDetectors("mikono-workerapp-test-rg", "mikonojob1", com.azure.core.util.Context.NONE); - } -} -``` - -### Jobs_ListSecrets + public static void listJavaComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } -```java -/** - * Samples for Jobs ListSecrets. - */ -public final class JobsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListSecrets.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_List_ServiceBind.json */ /** - * Sample code: List Container Apps Job Secrets. + * Sample code: List Java Components with ServiceBinds. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listContainerAppsJobSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().listSecretsWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + listJavaComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### Jobs_ProxyGet +### JavaComponents_Update ```java +import com.azure.resourcemanager.appcontainers.models.JavaComponent; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; +import java.util.Arrays; + /** - * Samples for Jobs ProxyGet. + * Samples for JavaComponents Update. */ -public final class JobsProxyGetSamples { +public final class JavaComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ProxyGet.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Patch.json */ /** - * Sample code: Get Container App Job by name. + * Sample code: Patch Java Component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - getContainerAppJobByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().proxyGetWithResponse("rg", "testcontainerAppsJob0", "rootApi", com.azure.core.util.Context.NONE); + public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + JavaComponent resource = manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1))) + .apply(); } -} -``` -### Jobs_Resume - -```java -/** - * Samples for Jobs Resume. - */ -public final class JobsResumeSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Patch_ServiceBind.json */ /** - * Sample code: Resume Job. + * Sample code: Patch Java Component with ServiceBinds. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void resumeJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().resume("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + public static void + patchJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + JavaComponent resource = manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withScale(new JavaComponentPropertiesScale().withMinReplicas(1).withMaxReplicas(1)) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) + .apply(); } } ``` -### Jobs_Start +### Jobs_CreateOrUpdate ```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.JobConfiguration; +import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; +import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; +import com.azure.resourcemanager.appcontainers.models.JobScale; +import com.azure.resourcemanager.appcontainers.models.JobScaleRule; +import com.azure.resourcemanager.appcontainers.models.JobTemplate; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.StorageType; +import com.azure.resourcemanager.appcontainers.models.TriggerType; +import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; +import com.azure.resourcemanager.appcontainers.models.Volume; +import com.azure.resourcemanager.appcontainers.models.VolumeMount; +import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** - * Samples for Jobs Start. + * Samples for Jobs CreateOrUpdate. */ -public final class JobsStartSamples { +public final class JobsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Start.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate_EventTrigger.json */ /** - * Sample code: Run a Container Apps Job. + * Sample code: Create or Update Container Apps Job With Event Driven Trigger. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { manager.jobs() - .start("rg", "testcontainerAppsJob0", new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testcontainerAppsJob0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") + .define("testcontainerappsjob0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withEventTriggerConfig(new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1) + .withParallelism(4) + .withScale(new JobScale().withPollingInterval(40) + .withMinExecutions(1) + .withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON)) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerappsjob0:v4") .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), - com.azure.core.util.Context.NONE); + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerappsjob0:v1").withName("testcontainerappsjob0")))) + .create(); } -} -``` -### Jobs_StopExecution - -```java -/** - * Samples for Jobs StopExecution. - */ -public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Execution.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate.json */ /** - * Sample code: Terminate a Container Apps Job. + * Sample code: Create or Update Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - terminateAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().stopExecution("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs() + .define("testcontainerappsjob0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerappsjob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerappsjob0:v1") + .withName("testcontainerappsjob0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount() + .withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile") + .withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage")))) + .create(); + } + + // 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; } } ``` -### Jobs_StopMultipleExecutions +### Jobs_Delete ```java /** - * Samples for Jobs StopMultipleExecutions. + * Samples for Jobs Delete. */ -public final class JobsStopMultipleExecutionsSamples { +public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Delete.json */ /** - * Sample code: Terminate Multiple Container Apps Job. + * Sample code: Delete Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - terminateMultipleContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().stopMultipleExecutions("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + public static void deleteContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().delete("rg", "testworkercontainerappsjob0", com.azure.core.util.Context.NONE); } } ``` -### Jobs_Suspend +### Jobs_GetByResourceGroup ```java /** - * Samples for Jobs Suspend. + * Samples for Jobs GetByResourceGroup. */ -public final class JobsSuspendSamples { +public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Get.json */ /** - * Sample code: Suspend Job. + * Sample code: Get Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void suspendJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().suspend("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + public static void getContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().getByResourceGroupWithResponse("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE); } } ``` -### Jobs_Update +### Jobs_GetDetector ```java -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.Job; -import com.azure.resourcemanager.appcontainers.models.JobConfiguration; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; -import com.azure.resourcemanager.appcontainers.models.JobPatchPropertiesProperties; -import com.azure.resourcemanager.appcontainers.models.JobTemplate; -import com.azure.resourcemanager.appcontainers.models.TriggerType; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; - /** - * Samples for Jobs Update. + * Samples for Jobs GetDetector. */ -public final class JobsUpdateSamples { +public final class JobsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_GetDetector.json */ /** - * Sample code: Patch Container Apps Job. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Job resource = manager.jobs() - .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new JobPatchPropertiesProperties() - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays - .asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))))) - .apply(); + * Sample code: Get diagnostic data for a Container App Job. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getDiagnosticDataForAContainerAppJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", + com.azure.core.util.Context.NONE); } } ``` -### JobsExecutions_List +### Jobs_List ```java /** - * Samples for JobsExecutions List. + * Samples for Jobs List. */ -public final class JobsExecutionsListSamples { +public final class JobsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Executions_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Jobs_ListBySubscription.json */ /** - * Sample code: Get a Container Apps Job Executions. + * Sample code: List Container Apps Jobs by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getAContainerAppsJobExecutions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobsExecutions().list("rg", "testcontainerAppsJob0", null, com.azure.core.util.Context.NONE); + listContainerAppsJobsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().list(com.azure.core.util.Context.NONE); } } ``` -### LogicApps_CreateOrUpdate +### Jobs_ListByResourceGroup ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import java.io.IOException; - /** - * Samples for LogicApps CreateOrUpdate. + * Samples for Jobs ListByResourceGroup. */ -public final class LogicAppsCreateOrUpdateSamples { +public final class JobsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Create.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Jobs_ListByResourceGroup.json */ /** - * Sample code: Create logic app extension. + * Sample code: List Container Apps Jobs by resource group. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createLogicAppExtension(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) - throws IOException { - manager.logicApps() - .define("testcontainerApp0") - .withExistingContainerApp("examplerg", "testcontainerApp0") - .withProperties(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) - .create(); + public static void + listContainerAppsJobsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` -### LogicApps_Delete +### Jobs_ListDetectors ```java /** - * Samples for LogicApps Delete. + * Samples for Jobs ListDetectors. */ -public final class LogicAppsDeleteSamples { +public final class JobsListDetectorsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_ListDetectors.json */ /** - * Sample code: Create logic app extension. + * Sample code: Get the list of available diagnostic data for a Container App Job. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - createLogicAppExtension(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .deleteWithResponse("examplerg", "testcontainerApp0", "testcontainerApp0", - com.azure.core.util.Context.NONE); + public static void getTheListOfAvailableDiagnosticDataForAContainerAppJob( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().listDetectors("mikono-workerapp-test-rg", "mikonojob1", com.azure.core.util.Context.NONE); } } ``` -### LogicApps_DeployWorkflowArtifacts +### Jobs_ListSecrets ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import java.io.IOException; -import java.util.Arrays; - /** - * Samples for LogicApps DeployWorkflowArtifacts. + * Samples for Jobs ListSecrets. */ -public final class LogicAppsDeployWorkflowArtifactsSamples { +public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * LogicApps_PostDeployWorkflowArtifacts.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_ListSecrets.json */ /** - * Sample code: Deploys workflow artifacts. + * Sample code: List Container Apps Job Secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deploysWorkflowArtifacts(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) - throws IOException { - manager.logicApps() - .deployWorkflowArtifactsWithResponse("testrg123", "testapp2", "testapp2", new WorkflowArtifacts() - .withAppSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize( - "{\"eventHub_connectionString\":\"Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=\"}", - Object.class, SerializerEncoding.JSON)) - .withFiles(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize( - "{\"connections.json\":{\"managedApiConnections\":{},\"serviceProviderConnections\":{\"eventHub\":{\"displayName\":\"example1\",\"parameterValues\":{\"connectionString\":\"@appsetting('eventHub_connectionString')\"},\"serviceProvider\":{\"id\":\"/serviceProviders/eventHub\"}}}},\"test1/workflow.json\":{\"definition\":{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"actions\":{},\"contentVersion\":\"1.0.0.0\",\"outputs\":{},\"triggers\":{\"When_events_are_available_in_Event_hub\":{\"type\":\"ServiceProvider\",\"inputs\":{\"parameters\":{\"eventHubName\":\"test123\"},\"serviceProviderConfiguration\":{\"operationId\":\"receiveEvents\",\"connectionName\":\"eventHub\",\"serviceProviderId\":\"/serviceProviders/eventHub\"}},\"splitOn\":\"@triggerOutputs()?['body']\"}}},\"kind\":\"Stateful\"}}", - Object.class, SerializerEncoding.JSON)), - com.azure.core.util.Context.NONE); + public static void + listContainerAppsJobSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().listSecretsWithResponse("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE); } +} +``` +### Jobs_ProxyGet + +```java +/** + * Samples for Jobs ProxyGet. + */ +public final class JobsProxyGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * LogicApps_DeleteDeployWorkflowArtifacts.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_ProxyGet.json */ /** - * Sample code: Delete workflow artifacts. + * Sample code: Get Container App Job by name. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - deleteWorkflowArtifacts(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .deployWorkflowArtifactsWithResponse("testrg123", "testapp2", "testapp2", - new WorkflowArtifacts().withFilesToDelete(Arrays.asList("test/workflow.json", "test/")), - com.azure.core.util.Context.NONE); + getContainerAppJobByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().proxyGetWithResponse("rg", "testcontainerappsjob0", "rootApi", com.azure.core.util.Context.NONE); } } ``` -### LogicApps_Get +### Jobs_Start ```java +import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; +import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; +import java.util.Arrays; + /** - * Samples for LogicApps Get. + * Samples for Jobs Start. */ -public final class LogicAppsGetSamples { +public final class JobsStartSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Start.json */ /** - * Sample code: Get logic app extension by name. + * Sample code: Run a Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - getLogicAppExtensionByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .getWithResponse("examplerg", "testcontainerApp0", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs() + .start("rg", "testcontainerappsjob0", new JobExecutionTemplate() + .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerappsjob0:v4") + .withName("testcontainerappsjob0") + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerappsjob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))), + com.azure.core.util.Context.NONE); } } ``` -### LogicApps_GetWorkflow +### Jobs_StopExecution ```java /** - * Samples for LogicApps GetWorkflow. + * Samples for Jobs StopExecution. */ -public final class LogicAppsGetWorkflowSamples { +public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_GetWorkflow.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Stop_Execution.json */ /** - * Sample code: GET a workflow. + * Sample code: Terminate a Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void gETAWorkflow(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .getWorkflowWithResponse("examplerg", "testcontainerApp0", "testcontainerApp0", "stateful1", - com.azure.core.util.Context.NONE); + public static void + terminateAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().stopExecution("rg", "testcontainerappsjob0", "jobExecution1", com.azure.core.util.Context.NONE); } } ``` -### LogicApps_Invoke +### Jobs_StopMultipleExecutions ```java -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; - /** - * Samples for LogicApps Invoke. + * Samples for Jobs StopMultipleExecutions. */ -public final class LogicAppsInvokeSamples { +public final class JobsStopMultipleExecutionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListCallbackURL. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Stop_Multiple.json */ /** - * Sample code: Get workflow list call back URL. + * Sample code: Terminate Multiple Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getWorkflowListCallBackURL(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .invokeWithResponse("testrg123", "testapp2", "testapp2", - "/runtime/webhooks/workflow/api/management/workflows/Stateful1/triggers/When_a_HTTP_request_is_received/listCallbackUrl", - LogicAppsProxyMethod.POST, com.azure.core.util.Context.NONE); + terminateMultipleContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().stopMultipleExecutions("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE); } } ``` -### LogicApps_ListWorkflows +### Jobs_Update ```java +import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.Job; +import com.azure.resourcemanager.appcontainers.models.JobConfiguration; +import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; +import com.azure.resourcemanager.appcontainers.models.JobPatchPropertiesProperties; +import com.azure.resourcemanager.appcontainers.models.JobTemplate; +import com.azure.resourcemanager.appcontainers.models.TriggerType; +import com.azure.resourcemanager.appcontainers.models.Type; +import java.util.Arrays; + /** - * Samples for LogicApps ListWorkflows. + * Samples for Jobs Update. */ -public final class LogicAppsListWorkflowsSamples { +public final class JobsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListWorkflows.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Patch.json */ /** - * Sample code: List the workflows. + * Sample code: Patch Container Apps Job. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listTheWorkflows(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .listWorkflows("examplerg", "testcontainerApp0", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + Job resource = manager.jobs() + .getByResourceGroupWithResponse("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new JobPatchPropertiesProperties() + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerappsjob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerappsjob0:v1") + .withName("testcontainerappsjob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays + .asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withType(Type.LIVENESS))))))) + .apply(); } } ``` -### LogicApps_ListWorkflowsConnections +### JobsExecutions_List ```java /** - * Samples for LogicApps ListWorkflowsConnections. + * Samples for JobsExecutions List. */ -public final class LogicAppsListWorkflowsConnectionsSamples { +public final class JobsExecutionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListConnections. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Executions_Get.json */ /** - * Sample code: List the Workflows Configuration Connections. + * Sample code: Get a Container Apps Job Executions. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listTheWorkflowsConfigurationConnections( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .listWorkflowsConnectionsWithResponse("testrg123", "testapp2", "testapp2", - com.azure.core.util.Context.NONE); + public static void + getAContainerAppsJobExecutions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobsExecutions().list("rg", "testcontainerappsjob0", null, com.azure.core.util.Context.NONE); } } ``` @@ -5310,8 +3277,9 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperti */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificate_CreateOrUpdate. + * json */ /** * Sample code: Create or Update Certificate. @@ -5340,8 +3308,7 @@ public final class ManagedCertificatesCreateOrUpdateSamples { public final class ManagedCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Delete. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -5365,7 +3332,7 @@ public final class ManagedCertificatesDeleteSamples { public final class ManagedCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -5388,7 +3355,7 @@ public final class ManagedCertificatesGetSamples { */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedCertificates_ListByManagedEnvironment.json */ /** @@ -5416,8 +3383,7 @@ import java.util.Map; public final class ManagedCertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificates_Patch. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. @@ -5455,8 +3421,9 @@ public final class ManagedCertificatesUpdateSamples { */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentDiagnostics_Get. + * json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -5480,8 +3447,9 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentDiagnostics_List. + * json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -5496,136 +3464,6 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { } ``` -### ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate - -```java -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; - -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections CreateOrUpdate. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json - */ - /** - * Sample code: Update a Private Endpoint Connection by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void updateAPrivateEndpointConnectionByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - PrivateEndpointConnection resource = manager.managedEnvironmentPrivateEndpointConnections() - .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withActionsRequired("None")) - .apply(); - } -} -``` - -### ManagedEnvironmentPrivateEndpointConnections_Delete - -```java -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections Delete. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_Delete.json - */ - /** - * Sample code: Delete a Private Endpoint Connection by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteAPrivateEndpointConnectionByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateEndpointConnections() - .delete("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedEnvironmentPrivateEndpointConnections_Get - -```java -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections Get. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_Get.json - */ - /** - * Sample code: Get a Private Endpoint Connection by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAPrivateEndpointConnectionByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateEndpointConnections() - .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedEnvironmentPrivateEndpointConnections_List - -```java -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections List. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_List.json - */ - /** - * Sample code: List Private Endpoint Connections by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listPrivateEndpointConnectionsByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateEndpointConnections() - .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); - } -} -``` - -### ManagedEnvironmentPrivateLinkResources_List - -```java -/** - * Samples for ManagedEnvironmentPrivateLinkResources List. - */ -public final class ManagedEnvironmentPrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateLinkResources_List.json - */ - /** - * Sample code: List Private Link Resources by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listPrivateLinkResourcesByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateLinkResources() - .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); - } -} -``` - ### ManagedEnvironmentUsages_List ```java @@ -5634,8 +3472,8 @@ public final class ManagedEnvironmentPrivateLinkResourcesListSamples { */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentUsages_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentUsages_List.json */ /** * Sample code: List managed environment usages. @@ -5652,24 +3490,15 @@ public final class ManagedEnvironmentUsagesListSamples { ### ManagedEnvironments_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.DataDogConfiguration; -import com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration; -import com.azure.resourcemanager.appcontainers.models.Header; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; -import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; import com.azure.resourcemanager.appcontainers.models.Mtls; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.OtlpConfiguration; -import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; @@ -5682,7 +3511,7 @@ import java.util.Map; */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** @@ -5708,7 +3537,6 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( new WorkloadProfile().withName("My-GP-01") - .withEnableFips(true) .withWorkloadProfileType("GeneralPurpose") .withMinimumCount(3) .withMaximumCount(12), @@ -5726,8 +3554,9 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_CreateOrUpdate. + * json */ /** * Sample code: Create environments. @@ -5748,35 +3577,14 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) - .withAppLogsConfiguration(new AppLogsConfiguration() - .withLogAnalyticsConfiguration(new LogAnalyticsConfiguration().withCustomerId("string") - .withSharedKey("fakeTokenPlaceholder") - .withDynamicJsonColumns(true))) - .withAppInsightsConfiguration(new AppInsightsConfiguration().withConnectionString( - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/")) - .withOpenTelemetryConfiguration( - new OpenTelemetryConfiguration() - .withDestinationsConfiguration( - new DestinationsConfiguration() - .withDataDogConfiguration( - new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder")) - .withOtlpConfigurations(Arrays.asList(new OtlpConfiguration().withName("dashboard") - .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80") - .withInsecure(true) - .withHeaders(Arrays - .asList(new Header().withKey("fakeTokenPlaceholder").withValue("xxxxxxxxxxx")))))) - .withTracesConfiguration( - new TracesConfiguration().withIncludeDapr(true).withDestinations(Arrays.asList("appInsights"))) - .withLogsConfiguration(new LogsConfiguration().withDestinations(Arrays.asList("appInsights"))) - .withMetricsConfiguration( - new MetricsConfiguration().withIncludeKeda(true).withDestinations(Arrays.asList("dataDog")))) + .withAppLogsConfiguration(new AppLogsConfiguration().withLogAnalyticsConfiguration( + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") .withCertificateValue("Y2VydA==".getBytes()) .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( new WorkloadProfile().withName("My-GP-01") - .withEnableFips(true) .withWorkloadProfileType("GeneralPurpose") .withMinimumCount(3) .withMaximumCount(12), @@ -5819,8 +3627,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { public final class ManagedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Delete. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -5842,8 +3649,8 @@ public final class ManagedEnvironmentsDeleteSamples { */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -5866,7 +3673,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { public final class ManagedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -5888,7 +3695,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_ListBySubscription.json */ /** @@ -5911,7 +3718,7 @@ public final class ManagedEnvironmentsListSamples { */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_ListByResourceGroup.json */ /** @@ -5934,7 +3741,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_ListWorkloadProfileStates.json */ /** @@ -5963,8 +3770,7 @@ import java.util.Map; public final class ManagedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Patch. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -6002,7 +3808,7 @@ public final class ManagedEnvironmentsUpdateSamples { public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -6029,7 +3835,7 @@ import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** @@ -6050,7 +3856,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** @@ -6081,8 +3887,9 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentsStorages_Delete. + * json */ /** * Sample code: List environments storages by subscription. @@ -6105,8 +3912,8 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage. @@ -6120,7 +3927,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** @@ -6144,8 +3951,8 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentsStorages_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -6170,8 +3977,9 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Certificates_CheckNameAvailability.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificates_CheckNameAvailability. + * json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -6188,8 +3996,9 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_CheckNameAvailability.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CheckNameAvailability. + * json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -6215,7 +4024,7 @@ public final class NamespacesCheckNameAvailabilitySamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Operations_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -6236,7 +4045,7 @@ public final class OperationsListSamples { */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * Subscriptions_GetCustomDomainVerificationId.json */ /** @@ -6259,7 +4068,7 @@ public final class ResourceProviderGetCustomDomainVerificationIdSamples { public final class ResourceProviderJobExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Execution_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -6268,7 +4077,7 @@ public final class ResourceProviderJobExecutionSamples { */ public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.resourceProviders() - .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + .jobExecutionWithResponse("rg", "testcontainerappsjob0", "jobExecution1", com.azure.core.util.Context.NONE); } } ``` @@ -6281,8 +4090,7 @@ public final class ResourceProviderJobExecutionSamples { */ public final class UsagesListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Usages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 504587ca7d51..adb9f6905441 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-08. + This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2025-01-01. https://github.com/Azure/azure-sdk-for-java @@ -46,6 +46,7 @@ 0 0 true + false diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java index 37ba91013964..dc5febadc38d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,18 +20,13 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; -import com.azure.resourcemanager.appcontainers.implementation.AppResilienciesImpl; import com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesImpl; import com.azure.resourcemanager.appcontainers.implementation.BillingMetersImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildersImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.CertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsImpl; @@ -38,28 +34,18 @@ import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsApiClientBuilder; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsByContainerAppsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSessionPoolsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsImpl; -import com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsImpl; -import com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JavaComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsImpl; -import com.azure.resourcemanager.appcontainers.implementation.LogicAppsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateLinkResourcesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsImpl; @@ -68,13 +54,8 @@ import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; import com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.appcontainers.implementation.UsagesImpl; -import com.azure.resourcemanager.appcontainers.models.AppResiliencies; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; import com.azure.resourcemanager.appcontainers.models.BillingMeters; -import com.azure.resourcemanager.appcontainers.models.BuildAuthTokens; -import com.azure.resourcemanager.appcontainers.models.Builders; -import com.azure.resourcemanager.appcontainers.models.Builds; -import com.azure.resourcemanager.appcontainers.models.BuildsByBuilderResources; import com.azure.resourcemanager.appcontainers.models.Certificates; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; @@ -82,27 +63,17 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.ContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; import com.azure.resourcemanager.appcontainers.models.ContainerAppsSessionPools; import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicies; import com.azure.resourcemanager.appcontainers.models.DaprComponents; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; -import com.azure.resourcemanager.appcontainers.models.DotNetComponents; -import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; import com.azure.resourcemanager.appcontainers.models.JavaComponents; import com.azure.resourcemanager.appcontainers.models.Jobs; import com.azure.resourcemanager.appcontainers.models.JobsExecutions; -import com.azure.resourcemanager.appcontainers.models.LogicApps; import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateEndpointConnections; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateLinkResources; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; @@ -115,32 +86,20 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to ContainerAppsApiManager. - * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the - * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions - * extension resource. */ public final class ContainerAppsApiManager { - private AppResiliencies appResiliencies; - private ContainerAppsAuthConfigs containerAppsAuthConfigs; private AvailableWorkloadProfiles availableWorkloadProfiles; private BillingMeters billingMeters; - private Builders builders; - - private BuildsByBuilderResources buildsByBuilderResources; - - private Builds builds; - - private BuildAuthTokens buildAuthTokens; - private ConnectedEnvironments connectedEnvironments; private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; @@ -151,12 +110,6 @@ public final class ContainerAppsApiManager { private ContainerApps containerApps; - private ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps; - - private ContainerAppsBuilds containerAppsBuilds; - - private ContainerAppsPatches containerAppsPatches; - private ContainerAppsRevisions containerAppsRevisions; private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; @@ -169,10 +122,6 @@ public final class ContainerAppsApiManager { private Jobs jobs; - private DotNetComponents dotNetComponents; - - private FunctionsExtensions functionsExtensions; - private Operations operations; private JavaComponents javaComponents; @@ -181,8 +130,6 @@ public final class ContainerAppsApiManager { private ResourceProviders resourceProviders; - private LogicApps logicApps; - private ManagedEnvironments managedEnvironments; private Certificates certificates; @@ -191,16 +138,8 @@ public final class ContainerAppsApiManager { private Namespaces namespaces; - private ManagedEnvironmentPrivateEndpointConnections managedEnvironmentPrivateEndpointConnections; - - private ManagedEnvironmentPrivateLinkResources managedEnvironmentPrivateLinkResources; - - private DaprComponentResiliencyPolicies daprComponentResiliencyPolicies; - private DaprComponents daprComponents; - private DaprSubscriptions daprSubscriptions; - private ManagedEnvironmentsStorages managedEnvironmentsStorages; private ContainerAppsSessionPools containerAppsSessionPools; @@ -263,6 +202,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-appcontainers.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -370,12 +312,14 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.1.0-beta.1"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -408,7 +352,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -421,18 +365,6 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro } } - /** - * Gets the resource collection API of AppResiliencies. It manages AppResiliency. - * - * @return Resource collection API of AppResiliencies. - */ - public AppResiliencies appResiliencies() { - if (this.appResiliencies == null) { - this.appResiliencies = new AppResilienciesImpl(clientObject.getAppResiliencies(), this); - } - return appResiliencies; - } - /** * Gets the resource collection API of ContainerAppsAuthConfigs. It manages AuthConfig. * @@ -471,55 +403,6 @@ public BillingMeters billingMeters() { return billingMeters; } - /** - * Gets the resource collection API of Builders. It manages BuilderResource. - * - * @return Resource collection API of Builders. - */ - public Builders builders() { - if (this.builders == null) { - this.builders = new BuildersImpl(clientObject.getBuilders(), this); - } - return builders; - } - - /** - * Gets the resource collection API of BuildsByBuilderResources. - * - * @return Resource collection API of BuildsByBuilderResources. - */ - public BuildsByBuilderResources buildsByBuilderResources() { - if (this.buildsByBuilderResources == null) { - this.buildsByBuilderResources - = new BuildsByBuilderResourcesImpl(clientObject.getBuildsByBuilderResources(), this); - } - return buildsByBuilderResources; - } - - /** - * Gets the resource collection API of Builds. It manages BuildResource. - * - * @return Resource collection API of Builds. - */ - public Builds builds() { - if (this.builds == null) { - this.builds = new BuildsImpl(clientObject.getBuilds(), this); - } - return builds; - } - - /** - * Gets the resource collection API of BuildAuthTokens. - * - * @return Resource collection API of BuildAuthTokens. - */ - public BuildAuthTokens buildAuthTokens() { - if (this.buildAuthTokens == null) { - this.buildAuthTokens = new BuildAuthTokensImpl(clientObject.getBuildAuthTokens(), this); - } - return buildAuthTokens; - } - /** * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. * @@ -583,43 +466,6 @@ public ContainerApps containerApps() { return containerApps; } - /** - * Gets the resource collection API of ContainerAppsBuildsByContainerApps. - * - * @return Resource collection API of ContainerAppsBuildsByContainerApps. - */ - public ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps() { - if (this.containerAppsBuildsByContainerApps == null) { - this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsImpl( - clientObject.getContainerAppsBuildsByContainerApps(), this); - } - return containerAppsBuildsByContainerApps; - } - - /** - * Gets the resource collection API of ContainerAppsBuilds. - * - * @return Resource collection API of ContainerAppsBuilds. - */ - public ContainerAppsBuilds containerAppsBuilds() { - if (this.containerAppsBuilds == null) { - this.containerAppsBuilds = new ContainerAppsBuildsImpl(clientObject.getContainerAppsBuilds(), this); - } - return containerAppsBuilds; - } - - /** - * Gets the resource collection API of ContainerAppsPatches. - * - * @return Resource collection API of ContainerAppsPatches. - */ - public ContainerAppsPatches containerAppsPatches() { - if (this.containerAppsPatches == null) { - this.containerAppsPatches = new ContainerAppsPatchesImpl(clientObject.getContainerAppsPatches(), this); - } - return containerAppsPatches; - } - /** * Gets the resource collection API of ContainerAppsRevisions. * @@ -697,30 +543,6 @@ public Jobs jobs() { return jobs; } - /** - * Gets the resource collection API of DotNetComponents. It manages DotNetComponent. - * - * @return Resource collection API of DotNetComponents. - */ - public DotNetComponents dotNetComponents() { - if (this.dotNetComponents == null) { - this.dotNetComponents = new DotNetComponentsImpl(clientObject.getDotNetComponents(), this); - } - return dotNetComponents; - } - - /** - * Gets the resource collection API of FunctionsExtensions. - * - * @return Resource collection API of FunctionsExtensions. - */ - public FunctionsExtensions functionsExtensions() { - if (this.functionsExtensions == null) { - this.functionsExtensions = new FunctionsExtensionsImpl(clientObject.getFunctionsExtensions(), this); - } - return functionsExtensions; - } - /** * Gets the resource collection API of Operations. * @@ -769,18 +591,6 @@ public ResourceProviders resourceProviders() { return resourceProviders; } - /** - * Gets the resource collection API of LogicApps. It manages LogicApp. - * - * @return Resource collection API of LogicApps. - */ - public LogicApps logicApps() { - if (this.logicApps == null) { - this.logicApps = new LogicAppsImpl(clientObject.getLogicApps(), this); - } - return logicApps; - } - /** * Gets the resource collection API of ManagedEnvironments. It manages ManagedEnvironment. * @@ -829,46 +639,6 @@ public Namespaces namespaces() { return namespaces; } - /** - * Gets the resource collection API of ManagedEnvironmentPrivateEndpointConnections. It manages - * PrivateEndpointConnection. - * - * @return Resource collection API of ManagedEnvironmentPrivateEndpointConnections. - */ - public ManagedEnvironmentPrivateEndpointConnections managedEnvironmentPrivateEndpointConnections() { - if (this.managedEnvironmentPrivateEndpointConnections == null) { - this.managedEnvironmentPrivateEndpointConnections = new ManagedEnvironmentPrivateEndpointConnectionsImpl( - clientObject.getManagedEnvironmentPrivateEndpointConnections(), this); - } - return managedEnvironmentPrivateEndpointConnections; - } - - /** - * Gets the resource collection API of ManagedEnvironmentPrivateLinkResources. - * - * @return Resource collection API of ManagedEnvironmentPrivateLinkResources. - */ - public ManagedEnvironmentPrivateLinkResources managedEnvironmentPrivateLinkResources() { - if (this.managedEnvironmentPrivateLinkResources == null) { - this.managedEnvironmentPrivateLinkResources = new ManagedEnvironmentPrivateLinkResourcesImpl( - clientObject.getManagedEnvironmentPrivateLinkResources(), this); - } - return managedEnvironmentPrivateLinkResources; - } - - /** - * Gets the resource collection API of DaprComponentResiliencyPolicies. It manages DaprComponentResiliencyPolicy. - * - * @return Resource collection API of DaprComponentResiliencyPolicies. - */ - public DaprComponentResiliencyPolicies daprComponentResiliencyPolicies() { - if (this.daprComponentResiliencyPolicies == null) { - this.daprComponentResiliencyPolicies - = new DaprComponentResiliencyPoliciesImpl(clientObject.getDaprComponentResiliencyPolicies(), this); - } - return daprComponentResiliencyPolicies; - } - /** * Gets the resource collection API of DaprComponents. * @@ -881,18 +651,6 @@ public DaprComponents daprComponents() { return daprComponents; } - /** - * Gets the resource collection API of DaprSubscriptions. It manages DaprSubscription. - * - * @return Resource collection API of DaprSubscriptions. - */ - public DaprSubscriptions daprSubscriptions() { - if (this.daprSubscriptions == null) { - this.daprSubscriptions = new DaprSubscriptionsImpl(clientObject.getDaprSubscriptions(), this); - } - return daprSubscriptions; - } - /** * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java deleted file mode 100644 index 1a40d6420997..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java +++ /dev/null @@ -1,198 +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.appcontainers.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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; - -/** - * An instance of this class provides access to all the operations defined in AppResilienciesClient. - */ -public interface AppResilienciesClient { - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope, Context context); - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AppResiliencyInner createOrUpdate(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope); - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope, Context context); - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AppResiliencyInner update(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 appName, String name); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String appName, String name, - Context context); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AppResiliencyInner get(String resourceGroupName, String appName, String name); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String appName); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String appName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java deleted file mode 100644 index c794c5f7277a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java +++ /dev/null @@ -1,47 +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.appcontainers.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.appcontainers.fluent.models.BuildTokenInner; - -/** - * An instance of this class provides access to all the operations defined in BuildAuthTokensClient. - */ -public interface BuildAuthTokensClient { - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildTokenInner list(String resourceGroupName, String builderName, String buildName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java deleted file mode 100644 index 65cd73fe23a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java +++ /dev/null @@ -1,270 +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.appcontainers.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.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in BuildersClient. - */ -public interface BuildersClient { - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List BuilderResource resources by subscription 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List BuilderResource resources by 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List BuilderResource resources by 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 a BuilderResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 a BuilderResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope, Context context); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope, Context context); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope, Context context); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, - Context context); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, Context context); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java deleted file mode 100644 index a957f2df2405..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java +++ /dev/null @@ -1,43 +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.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; - -/** - * An instance of this class provides access to all the operations defined in BuildsByBuilderResourcesClient. - */ -public interface BuildsByBuilderResourcesClient { - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String builderName); - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String builderName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java deleted file mode 100644 index 5cce1f950e18..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java +++ /dev/null @@ -1,171 +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.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.appcontainers.fluent.models.BuildResourceInner; - -/** - * An instance of this class provides access to all the operations defined in BuildsClient. - */ -public interface BuildsClient { - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 a BuildResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 a BuildResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildResourceInner get(String resourceGroupName, String builderName, String buildName); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope, Context context); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope, Context context); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName, - Context context); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java index dafb90840eb0..9a29313e03cb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java @@ -12,7 +12,7 @@ */ public interface ContainerAppsApiClient { /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -46,13 +46,6 @@ public interface ContainerAppsApiClient { */ Duration getDefaultPollInterval(); - /** - * Gets the AppResilienciesClient object to access its operations. - * - * @return the AppResilienciesClient object. - */ - AppResilienciesClient getAppResiliencies(); - /** * Gets the ContainerAppsAuthConfigsClient object to access its operations. * @@ -74,34 +67,6 @@ public interface ContainerAppsApiClient { */ BillingMetersClient getBillingMeters(); - /** - * Gets the BuildersClient object to access its operations. - * - * @return the BuildersClient object. - */ - BuildersClient getBuilders(); - - /** - * Gets the BuildsByBuilderResourcesClient object to access its operations. - * - * @return the BuildsByBuilderResourcesClient object. - */ - BuildsByBuilderResourcesClient getBuildsByBuilderResources(); - - /** - * Gets the BuildsClient object to access its operations. - * - * @return the BuildsClient object. - */ - BuildsClient getBuilds(); - - /** - * Gets the BuildAuthTokensClient object to access its operations. - * - * @return the BuildAuthTokensClient object. - */ - BuildAuthTokensClient getBuildAuthTokens(); - /** * Gets the ConnectedEnvironmentsClient object to access its operations. * @@ -137,27 +102,6 @@ public interface ContainerAppsApiClient { */ ContainerAppsClient getContainerApps(); - /** - * Gets the ContainerAppsBuildsByContainerAppsClient object to access its operations. - * - * @return the ContainerAppsBuildsByContainerAppsClient object. - */ - ContainerAppsBuildsByContainerAppsClient getContainerAppsBuildsByContainerApps(); - - /** - * Gets the ContainerAppsBuildsClient object to access its operations. - * - * @return the ContainerAppsBuildsClient object. - */ - ContainerAppsBuildsClient getContainerAppsBuilds(); - - /** - * Gets the ContainerAppsPatchesClient object to access its operations. - * - * @return the ContainerAppsPatchesClient object. - */ - ContainerAppsPatchesClient getContainerAppsPatches(); - /** * Gets the ContainerAppsRevisionsClient object to access its operations. * @@ -200,20 +144,6 @@ public interface ContainerAppsApiClient { */ JobsClient getJobs(); - /** - * Gets the DotNetComponentsClient object to access its operations. - * - * @return the DotNetComponentsClient object. - */ - DotNetComponentsClient getDotNetComponents(); - - /** - * Gets the FunctionsExtensionsClient object to access its operations. - * - * @return the FunctionsExtensionsClient object. - */ - FunctionsExtensionsClient getFunctionsExtensions(); - /** * Gets the OperationsClient object to access its operations. * @@ -242,13 +172,6 @@ public interface ContainerAppsApiClient { */ ResourceProvidersClient getResourceProviders(); - /** - * Gets the LogicAppsClient object to access its operations. - * - * @return the LogicAppsClient object. - */ - LogicAppsClient getLogicApps(); - /** * Gets the ManagedEnvironmentsClient object to access its operations. * @@ -277,27 +200,6 @@ public interface ContainerAppsApiClient { */ NamespacesClient getNamespaces(); - /** - * Gets the ManagedEnvironmentPrivateEndpointConnectionsClient object to access its operations. - * - * @return the ManagedEnvironmentPrivateEndpointConnectionsClient object. - */ - ManagedEnvironmentPrivateEndpointConnectionsClient getManagedEnvironmentPrivateEndpointConnections(); - - /** - * Gets the ManagedEnvironmentPrivateLinkResourcesClient object to access its operations. - * - * @return the ManagedEnvironmentPrivateLinkResourcesClient object. - */ - ManagedEnvironmentPrivateLinkResourcesClient getManagedEnvironmentPrivateLinkResources(); - - /** - * Gets the DaprComponentResiliencyPoliciesClient object to access its operations. - * - * @return the DaprComponentResiliencyPoliciesClient object. - */ - DaprComponentResiliencyPoliciesClient getDaprComponentResiliencyPolicies(); - /** * Gets the DaprComponentsClient object to access its operations. * @@ -305,13 +207,6 @@ public interface ContainerAppsApiClient { */ DaprComponentsClient getDaprComponents(); - /** - * Gets the DaprSubscriptionsClient object to access its operations. - * - * @return the DaprSubscriptionsClient object. - */ - DaprSubscriptionsClient getDaprSubscriptions(); - /** * Gets the ManagedEnvironmentsStoragesClient object to access its operations. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java deleted file mode 100644 index 258e621ecb99..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java +++ /dev/null @@ -1,46 +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.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsBuildsByContainerAppsClient. - */ -public interface ContainerAppsBuildsByContainerAppsClient { - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String containerAppName); - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String containerAppName, - Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java deleted file mode 100644 index 7d3c288df126..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java +++ /dev/null @@ -1,105 +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.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.appcontainers.fluent.models.ContainerAppsBuildResourceInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsBuildsClient. - */ -public interface ContainerAppsBuildsClient { - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 a Container Apps Build resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String containerAppName, - String buildName, Context context); - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 a Container Apps Build resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppsBuildResourceInner get(String resourceGroupName, String containerAppName, String buildName); - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName); - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName, - Context context); - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName); - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java deleted file mode 100644 index 12ce9706f0b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java +++ /dev/null @@ -1,263 +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.appcontainers.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.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsPatchesClient. - */ -public interface ContainerAppsPatchesClient { - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @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 container App patch collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, - String containerAppName); - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - String filter, Context context); - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String containerAppName, - String patchName, Context context); - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppsPatchResourceInner get(String resourceGroupName, String containerAppName, String patchName); - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName); - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName, - Context context); - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName); - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName, Context context); - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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> beginSkipConfigure(String resourceGroupName, String containerAppName, - String patchName, PatchSkipConfig patchSkipConfig); - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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> beginSkipConfigure(String resourceGroupName, String containerAppName, - String patchName, PatchSkipConfig patchSkipConfig, Context context); - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig); - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig, Context context); - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppsPatchResourceInner> - beginApply(String resourceGroupName, String containerAppName, String patchName); - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppsPatchResourceInner> - beginApply(String resourceGroupName, String containerAppName, String patchName, Context context); - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName); - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName, - Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java index a0cd2b836d37..1d972a062004 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java @@ -105,7 +105,6 @@ SyncPoller, SourceControlInner> beginCreateOrUpda * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -115,8 +114,7 @@ SyncPoller, SourceControlInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary, Context context); + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context); /** * Create or update the SourceControl for a Container App. @@ -142,7 +140,6 @@ SourceControlInner createOrUpdate(String resourceGroupName, String containerAppN * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -152,7 +149,7 @@ SourceControlInner createOrUpdate(String resourceGroupName, String containerAppN */ @ServiceMethod(returns = ReturnType.SINGLE) SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, Context context); + SourceControlInner sourceControlEnvelope, Context context); /** * Delete a Container App SourceControl. @@ -176,9 +173,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -188,8 +182,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context); + String sourceControlName, Context context); /** * Delete a Container App SourceControl. @@ -211,9 +204,6 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -221,6 +211,5 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String containerAppName, String sourceControlName, String xMsGithubAuxiliary, - Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context); + void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java deleted file mode 100644 index c057e69e3e88..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java +++ /dev/null @@ -1,164 +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.appcontainers.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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; - -/** - * An instance of this class provides access to all the operations defined in DaprComponentResiliencyPoliciesClient. - */ -public interface DaprComponentResiliencyPoliciesClient { - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, - String componentName); - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, String name, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentResiliencyPolicyInner get(String resourceGroupName, String environmentName, String componentName, - String name); - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context); - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentResiliencyPolicyInner createOrUpdate(String resourceGroupName, String environmentName, - String componentName, String name, DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String componentName, String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java deleted file mode 100644 index 363e068ef7e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java +++ /dev/null @@ -1,151 +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.appcontainers.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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; - -/** - * An instance of this class provides access to all the operations defined in DaprSubscriptionsClient. - */ -public interface DaprSubscriptionsClient { - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSubscriptionInner get(String resourceGroupName, String environmentName, String name); - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context); - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSubscriptionInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DaprSubscriptionInner daprSubscriptionEnvelope); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String name, Context context); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java deleted file mode 100644 index f321e882b169..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java +++ /dev/null @@ -1,281 +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.appcontainers.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.appcontainers.fluent.models.DotNetComponentInner; - -/** - * An instance of this class provides access to all the operations defined in DotNetComponentsClient. - */ -public interface DotNetComponentsClient { - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 a .NET Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 a .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner get(String resourceGroupName, String environmentName, String name); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name, - Context context); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java deleted file mode 100644 index 45732c3aac77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java +++ /dev/null @@ -1,50 +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.appcontainers.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; - -/** - * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. - */ -public interface FunctionsExtensionsClient { - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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) - Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String functionAppName, Context context); - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, - String functionAppName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java index 160ff1772826..5b033c37f9e8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java @@ -223,6 +223,8 @@ JavaComponentInner update(String resourceGroupName, String environmentName, Stri JavaComponentInner javaComponentEnvelope, Context context); /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -237,6 +239,8 @@ JavaComponentInner update(String resourceGroupName, String environmentName, Stri SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name); /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -253,6 +257,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String Context context); /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -266,6 +272,8 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String environmentName, String name); /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java index 929ace5c0ef5..e7a0a11a7835 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java @@ -93,8 +93,6 @@ Response getDetectorWithResponse(String resourceGroupName, Str DiagnosticsInner getDetector(String resourceGroupName, String jobName, String detectorName); /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -111,8 +109,6 @@ Response getDetectorWithResponse(String resourceGroupName, Str Response proxyGetWithResponse(String resourceGroupName, String jobName, String apiName, Context context); /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -613,112 +609,4 @@ Response listSecretsWithResponse(String resourceGroup */ @ServiceMethod(returns = ReturnType.SINGLE) JobSecretsCollectionInner listSecrets(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName, Context context); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner resume(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner resume(String resourceGroupName, String jobName, Context context); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName, Context context); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner suspend(String resourceGroupName, String jobName); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner suspend(String resourceGroupName, String jobName, Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java deleted file mode 100644 index 1ee60bcd1b3c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java +++ /dev/null @@ -1,288 +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.appcontainers.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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; - -/** - * An instance of this class provides access to all the operations defined in LogicAppsClient. - */ -public interface LogicAppsClient { - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicAppInner get(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, LogicAppInner resource, Context context); - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicAppInner createOrUpdate(String resourceGroupName, String containerAppName, String logicAppName, - LogicAppInner resource); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkflowEnvelopeInner getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWorkflowsConnectionsWithResponse(String resourceGroupName, - String containerAppName, String logicAppName, Context context); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkflowEnvelopeInner listWorkflowsConnections(String resourceGroupName, String containerAppName, - String logicAppName); - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context); - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Object invoke(String resourceGroupName, String containerAppName, String logicAppName, String xMsLogicAppsProxyPath, - LogicAppsProxyMethod xMsLogicAppsProxyMethod); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java deleted file mode 100644 index 37a4ed33fe03..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,219 +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.appcontainers.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.appcontainers.fluent.models.PrivateEndpointConnectionInner; - -/** - * An instance of this class provides access to all the operations defined in - * ManagedEnvironmentPrivateEndpointConnectionsClient. - */ -public interface ManagedEnvironmentPrivateEndpointConnectionsClient { - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, - Context context); - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 a private endpoint connection for a given managed environment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, Context context); - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 a private endpoint connection for a given managed environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String environmentName, - String privateEndpointConnectionName); - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope); - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, Context context); - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope); - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, - Context context); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, - String privateEndpointConnectionName); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, - String privateEndpointConnectionName, Context context); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, String privateEndpointConnectionName); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, String privateEndpointConnectionName, - Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java deleted file mode 100644 index 7235c21740e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java +++ /dev/null @@ -1,44 +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.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; - -/** - * An instance of this class provides access to all the operations defined in - * ManagedEnvironmentPrivateLinkResourcesClient. - */ -public interface ManagedEnvironmentPrivateLinkResourcesClient { - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 a list of private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 a list of private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java deleted file mode 100644 index b214f81d1c97..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java +++ /dev/null @@ -1,298 +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.appcontainers.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.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import java.io.IOException; - -/** - * Configuration to setup App Resiliency. - */ -@Fluent -public final class AppResiliencyInner extends ProxyResource { - /* - * App Resiliency resource specific properties - */ - private AppResiliencyProperties innerProperties; - - /* - * 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 AppResiliencyInner class. - */ - public AppResiliencyInner() { - } - - /** - * Get the innerProperties property: App Resiliency resource specific properties. - * - * @return the innerProperties value. - */ - private AppResiliencyProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the timeoutPolicy property: Policy to set request timeouts. - * - * @return the timeoutPolicy value. - */ - public TimeoutPolicy timeoutPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().timeoutPolicy(); - } - - /** - * Set the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy the timeoutPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withTimeoutPolicy(timeoutPolicy); - return this; - } - - /** - * Get the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @return the httpRetryPolicy value. - */ - public HttpRetryPolicy httpRetryPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().httpRetryPolicy(); - } - - /** - * Set the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy the httpRetryPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withHttpRetryPolicy(httpRetryPolicy); - return this; - } - - /** - * Get the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @return the tcpRetryPolicy value. - */ - public TcpRetryPolicy tcpRetryPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().tcpRetryPolicy(); - } - - /** - * Set the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy the tcpRetryPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withTcpRetryPolicy(tcpRetryPolicy); - return this; - } - - /** - * Get the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @return the circuitBreakerPolicy value. - */ - public CircuitBreakerPolicy circuitBreakerPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().circuitBreakerPolicy(); - } - - /** - * Set the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withCircuitBreakerPolicy(circuitBreakerPolicy); - return this; - } - - /** - * Get the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @return the httpConnectionPool value. - */ - public HttpConnectionPool httpConnectionPool() { - return this.innerProperties() == null ? null : this.innerProperties().httpConnectionPool(); - } - - /** - * Set the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool the httpConnectionPool value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withHttpConnectionPool(httpConnectionPool); - return this; - } - - /** - * Get the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @return the tcpConnectionPool value. - */ - public TcpConnectionPool tcpConnectionPool() { - return this.innerProperties() == null ? null : this.innerProperties().tcpConnectionPool(); - } - - /** - * Set the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool the tcpConnectionPool value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withTcpConnectionPool(tcpConnectionPool); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppResiliencyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppResiliencyInner 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 AppResiliencyInner. - */ - public static AppResiliencyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppResiliencyInner deserializedAppResiliencyInner = new AppResiliencyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAppResiliencyInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAppResiliencyInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAppResiliencyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAppResiliencyInner.innerProperties = AppResiliencyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedAppResiliencyInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAppResiliencyInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java deleted file mode 100644 index 83da18920e65..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java +++ /dev/null @@ -1,257 +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.appcontainers.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.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import java.io.IOException; - -/** - * App Resiliency resource specific properties. - */ -@Fluent -public final class AppResiliencyProperties implements JsonSerializable { - /* - * Policy to set request timeouts - */ - private TimeoutPolicy timeoutPolicy; - - /* - * Policy that defines http request retry conditions - */ - private HttpRetryPolicy httpRetryPolicy; - - /* - * Policy that defines tcp request retry conditions - */ - private TcpRetryPolicy tcpRetryPolicy; - - /* - * Policy that defines circuit breaker conditions - */ - private CircuitBreakerPolicy circuitBreakerPolicy; - - /* - * Defines parameters for http connection pooling - */ - private HttpConnectionPool httpConnectionPool; - - /* - * Defines parameters for tcp connection pooling - */ - private TcpConnectionPool tcpConnectionPool; - - /** - * Creates an instance of AppResiliencyProperties class. - */ - public AppResiliencyProperties() { - } - - /** - * Get the timeoutPolicy property: Policy to set request timeouts. - * - * @return the timeoutPolicy value. - */ - public TimeoutPolicy timeoutPolicy() { - return this.timeoutPolicy; - } - - /** - * Set the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy the timeoutPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { - this.timeoutPolicy = timeoutPolicy; - return this; - } - - /** - * Get the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @return the httpRetryPolicy value. - */ - public HttpRetryPolicy httpRetryPolicy() { - return this.httpRetryPolicy; - } - - /** - * Set the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy the httpRetryPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { - this.httpRetryPolicy = httpRetryPolicy; - return this; - } - - /** - * Get the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @return the tcpRetryPolicy value. - */ - public TcpRetryPolicy tcpRetryPolicy() { - return this.tcpRetryPolicy; - } - - /** - * Set the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy the tcpRetryPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { - this.tcpRetryPolicy = tcpRetryPolicy; - return this; - } - - /** - * Get the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @return the circuitBreakerPolicy value. - */ - public CircuitBreakerPolicy circuitBreakerPolicy() { - return this.circuitBreakerPolicy; - } - - /** - * Set the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { - this.circuitBreakerPolicy = circuitBreakerPolicy; - return this; - } - - /** - * Get the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @return the httpConnectionPool value. - */ - public HttpConnectionPool httpConnectionPool() { - return this.httpConnectionPool; - } - - /** - * Set the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool the httpConnectionPool value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { - this.httpConnectionPool = httpConnectionPool; - return this; - } - - /** - * Get the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @return the tcpConnectionPool value. - */ - public TcpConnectionPool tcpConnectionPool() { - return this.tcpConnectionPool; - } - - /** - * Set the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool the tcpConnectionPool value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { - this.tcpConnectionPool = tcpConnectionPool; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeoutPolicy() != null) { - timeoutPolicy().validate(); - } - if (httpRetryPolicy() != null) { - httpRetryPolicy().validate(); - } - if (tcpRetryPolicy() != null) { - tcpRetryPolicy().validate(); - } - if (circuitBreakerPolicy() != null) { - circuitBreakerPolicy().validate(); - } - if (httpConnectionPool() != null) { - httpConnectionPool().validate(); - } - if (tcpConnectionPool() != null) { - tcpConnectionPool().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("timeoutPolicy", this.timeoutPolicy); - jsonWriter.writeJsonField("httpRetryPolicy", this.httpRetryPolicy); - jsonWriter.writeJsonField("tcpRetryPolicy", this.tcpRetryPolicy); - jsonWriter.writeJsonField("circuitBreakerPolicy", this.circuitBreakerPolicy); - jsonWriter.writeJsonField("httpConnectionPool", this.httpConnectionPool); - jsonWriter.writeJsonField("tcpConnectionPool", this.tcpConnectionPool); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppResiliencyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppResiliencyProperties 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 AppResiliencyProperties. - */ - public static AppResiliencyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppResiliencyProperties deserializedAppResiliencyProperties = new AppResiliencyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeoutPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.timeoutPolicy = TimeoutPolicy.fromJson(reader); - } else if ("httpRetryPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.httpRetryPolicy = HttpRetryPolicy.fromJson(reader); - } else if ("tcpRetryPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.tcpRetryPolicy = TcpRetryPolicy.fromJson(reader); - } else if ("circuitBreakerPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.circuitBreakerPolicy = CircuitBreakerPolicy.fromJson(reader); - } else if ("httpConnectionPool".equals(fieldName)) { - deserializedAppResiliencyProperties.httpConnectionPool = HttpConnectionPool.fromJson(reader); - } else if ("tcpConnectionPool".equals(fieldName)) { - deserializedAppResiliencyProperties.tcpConnectionPool = TcpConnectionPool.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAppResiliencyProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java deleted file mode 100644 index 64c39b9e155d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java +++ /dev/null @@ -1,215 +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.appcontainers.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.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import java.io.IOException; - -/** - * The build properties. - */ -@Fluent -public final class BuildProperties implements JsonSerializable { - /* - * Build provisioning state. - */ - private BuildProvisioningState provisioningState; - - /* - * Status of the build once it has been provisioned. - */ - private BuildStatus buildStatus; - - /* - * Container registry that the final image will be uploaded to. - */ - private ContainerRegistryWithCustomImage destinationContainerRegistry; - - /* - * Configuration of the build. - */ - private BuildConfiguration configuration; - - /* - * Endpoint to which the source code should be uploaded. - */ - private String uploadEndpoint; - - /* - * Endpoint from which the build logs can be streamed. - */ - private String logStreamEndpoint; - - /* - * Endpoint to use to retrieve an authentication token for log streaming and uploading source code. - */ - private String tokenEndpoint; - - /** - * Creates an instance of BuildProperties class. - */ - public BuildProperties() { - } - - /** - * Get the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - public BuildProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - public BuildStatus buildStatus() { - return this.buildStatus; - } - - /** - * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.destinationContainerRegistry; - } - - /** - * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @param destinationContainerRegistry the destinationContainerRegistry value to set. - * @return the BuildProperties object itself. - */ - public BuildProperties - withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { - this.destinationContainerRegistry = destinationContainerRegistry; - return this; - } - - /** - * Get the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - public BuildConfiguration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: Configuration of the build. - * - * @param configuration the configuration value to set. - * @return the BuildProperties object itself. - */ - public BuildProperties withConfiguration(BuildConfiguration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. - * - * @return the uploadEndpoint value. - */ - public String uploadEndpoint() { - return this.uploadEndpoint; - } - - /** - * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.logStreamEndpoint; - } - - /** - * Get the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and - * uploading source code. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destinationContainerRegistry() != null) { - destinationContainerRegistry().validate(); - } - if (configuration() != null) { - configuration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("destinationContainerRegistry", this.destinationContainerRegistry); - jsonWriter.writeJsonField("configuration", this.configuration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildProperties 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 BuildProperties. - */ - public static BuildProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildProperties deserializedBuildProperties = new BuildProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedBuildProperties.provisioningState - = BuildProvisioningState.fromString(reader.getString()); - } else if ("buildStatus".equals(fieldName)) { - deserializedBuildProperties.buildStatus = BuildStatus.fromString(reader.getString()); - } else if ("destinationContainerRegistry".equals(fieldName)) { - deserializedBuildProperties.destinationContainerRegistry - = ContainerRegistryWithCustomImage.fromJson(reader); - } else if ("configuration".equals(fieldName)) { - deserializedBuildProperties.configuration = BuildConfiguration.fromJson(reader); - } else if ("uploadEndpoint".equals(fieldName)) { - deserializedBuildProperties.uploadEndpoint = reader.getString(); - } else if ("logStreamEndpoint".equals(fieldName)) { - deserializedBuildProperties.logStreamEndpoint = reader.getString(); - } else if ("tokenEndpoint".equals(fieldName)) { - deserializedBuildProperties.tokenEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java deleted file mode 100644 index 6bbc11f9856b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java +++ /dev/null @@ -1,251 +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.appcontainers.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.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import java.io.IOException; - -/** - * Information pertaining to an individual build. - */ -@Fluent -public final class BuildResourceInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private BuildProperties innerProperties; - - /* - * 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 BuildResourceInner class. - */ - public BuildResourceInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private BuildProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - public BuildProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - public BuildStatus buildStatus() { - return this.innerProperties() == null ? null : this.innerProperties().buildStatus(); - } - - /** - * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().destinationContainerRegistry(); - } - - /** - * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @param destinationContainerRegistry the destinationContainerRegistry value to set. - * @return the BuildResourceInner object itself. - */ - public BuildResourceInner - withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { - if (this.innerProperties() == null) { - this.innerProperties = new BuildProperties(); - } - this.innerProperties().withDestinationContainerRegistry(destinationContainerRegistry); - return this; - } - - /** - * Get the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - public BuildConfiguration configuration() { - return this.innerProperties() == null ? null : this.innerProperties().configuration(); - } - - /** - * Set the configuration property: Configuration of the build. - * - * @param configuration the configuration value to set. - * @return the BuildResourceInner object itself. - */ - public BuildResourceInner withConfiguration(BuildConfiguration configuration) { - if (this.innerProperties() == null) { - this.innerProperties = new BuildProperties(); - } - this.innerProperties().withConfiguration(configuration); - return this; - } - - /** - * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. - * - * @return the uploadEndpoint value. - */ - public String uploadEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().uploadEndpoint(); - } - - /** - * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().logStreamEndpoint(); - } - - /** - * Get the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and - * uploading source code. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().tokenEndpoint(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildResourceInner 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 BuildResourceInner. - */ - public static BuildResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildResourceInner deserializedBuildResourceInner = new BuildResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBuildResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBuildResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBuildResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedBuildResourceInner.innerProperties = BuildProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBuildResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java deleted file mode 100644 index d3488fefeb98..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java +++ /dev/null @@ -1,100 +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.appcontainers.fluent.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; -import java.time.OffsetDateTime; - -/** - * Build Auth Token. - */ -@Immutable -public final class BuildTokenInner implements JsonSerializable { - /* - * Authentication token. - */ - private String token; - - /* - * Token expiration date. - */ - private OffsetDateTime expires; - - /** - * Creates an instance of BuildTokenInner class. - */ - public BuildTokenInner() { - } - - /** - * Get the token property: Authentication token. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildTokenInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildTokenInner 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 BuildTokenInner. - */ - public static BuildTokenInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildTokenInner deserializedBuildTokenInner = new BuildTokenInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("token".equals(fieldName)) { - deserializedBuildTokenInner.token = reader.getString(); - } else if ("expires".equals(fieldName)) { - deserializedBuildTokenInner.expires = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildTokenInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java deleted file mode 100644 index b1e954cd7a76..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java +++ /dev/null @@ -1,160 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import java.io.IOException; -import java.util.List; - -/** - * The builder properties. - */ -@Fluent -public final class BuilderProperties implements JsonSerializable { - /* - * Provisioning state of a builder resource. - */ - private BuilderProvisioningState provisioningState; - - /* - * Resource ID of the container apps environment that the builder is associated with. - */ - private String environmentId; - - /* - * List of mappings of container registries and the managed identity used to connect to it. - */ - private List containerRegistries; - - /** - * Creates an instance of BuilderProperties class. - */ - public BuilderProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of a builder resource. - * - * @return the provisioningState value. - */ - public BuilderProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderProperties object itself. - */ - public BuilderProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @return the containerRegistries value. - */ - public List containerRegistries() { - return this.containerRegistries; - } - - /** - * Set the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @param containerRegistries the containerRegistries value to set. - * @return the BuilderProperties object itself. - */ - public BuilderProperties withContainerRegistries(List containerRegistries) { - this.containerRegistries = containerRegistries; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environmentId() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property environmentId in model BuilderProperties")); - } - if (containerRegistries() != null) { - containerRegistries().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuilderProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeArrayField("containerRegistries", this.containerRegistries, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderProperties 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 BuilderProperties. - */ - public static BuilderProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderProperties deserializedBuilderProperties = new BuilderProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("environmentId".equals(fieldName)) { - deserializedBuilderProperties.environmentId = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedBuilderProperties.provisioningState - = BuilderProvisioningState.fromString(reader.getString()); - } else if ("containerRegistries".equals(fieldName)) { - List containerRegistries - = reader.readArray(reader1 -> ContainerRegistry.fromJson(reader1)); - deserializedBuilderProperties.containerRegistries = containerRegistries; - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java deleted file mode 100644 index 0ec2b3c5853e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java +++ /dev/null @@ -1,274 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -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.appcontainers.models.BuilderProvisioningState; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Information about the SourceToCloud builder resource. - */ -@Fluent -public final class BuilderResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private BuilderProperties innerProperties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * 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 BuilderResourceInner class. - */ - public BuilderResourceInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private BuilderProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the BuilderResourceInner object itself. - */ - public BuilderResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - 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 BuilderResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BuilderResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of a builder resource. - * - * @return the provisioningState value. - */ - public BuilderProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderResourceInner object itself. - */ - public BuilderResourceInner withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new BuilderProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Get the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @return the containerRegistries value. - */ - public List containerRegistries() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); - } - - /** - * Set the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @param containerRegistries the containerRegistries value to set. - * @return the BuilderResourceInner object itself. - */ - public BuilderResourceInner withContainerRegistries(List containerRegistries) { - if (this.innerProperties() == null) { - this.innerProperties = new BuilderProperties(); - } - this.innerProperties().withContainerRegistries(containerRegistries); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderResourceInner 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 BuilderResourceInner. - */ - public static BuilderResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderResourceInner deserializedBuilderResourceInner = new BuilderResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBuilderResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBuilderResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBuilderResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBuilderResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBuilderResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBuilderResourceInner.innerProperties = BuilderProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedBuilderResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBuilderResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java deleted file mode 100644 index 6e9a2c27bee2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java +++ /dev/null @@ -1,96 +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.appcontainers.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 java.io.IOException; - -/** - * The updatable properties of the BuilderResource. - */ -@Fluent -public final class BuilderResourceUpdateProperties implements JsonSerializable { - /* - * Resource ID of the container apps environment that the builder is associated with. - */ - private String environmentId; - - /** - * Creates an instance of BuilderResourceUpdateProperties class. - */ - public BuilderResourceUpdateProperties() { - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderResourceUpdateProperties object itself. - */ - public BuilderResourceUpdateProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - 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("environmentId", this.environmentId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderResourceUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderResourceUpdateProperties 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 BuilderResourceUpdateProperties. - */ - public static BuilderResourceUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderResourceUpdateProperties deserializedBuilderResourceUpdateProperties - = new BuilderResourceUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("environmentId".equals(fieldName)) { - deserializedBuilderResourceUpdateProperties.environmentId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderResourceUpdateProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java index 7f2042e11bdf..51273813e371 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java @@ -11,10 +11,9 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerAppRunningStatus; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.Kind; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.Template; import java.io.IOException; @@ -44,12 +43,6 @@ public final class ContainerAppInner extends Resource { */ private String managedBy; - /* - * Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of - * Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. - */ - private Kind kind; - /* * ContainerApp resource specific properties */ @@ -147,30 +140,6 @@ public ContainerAppInner withManagedBy(String managedBy) { return this; } - /** - * Get the kind property: Metadata used to render different experiences for resources of the same type; e.g. - * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and - * persist this value. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used to render different experiences for resources of the same type; e.g. - * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and - * persist this value. - * - * @param kind the kind value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withKind(Kind kind) { - this.kind = kind; - return this; - } - /** * Get the innerProperties property: ContainerApp resource specific properties. * @@ -247,12 +216,12 @@ public ContainerAppProvisioningState provisioningState() { } /** - * Get the deploymentErrors property: Any errors that occurred during deployment. + * Get the runningStatus property: Running status of the Container App. * - * @return the deploymentErrors value. + * @return the runningStatus value. */ - public String deploymentErrors() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); + public ContainerAppRunningStatus runningStatus() { + return this.innerProperties() == null ? null : this.innerProperties().runningStatus(); } /** @@ -324,30 +293,6 @@ public ContainerAppInner withWorkloadProfileName(String workloadProfileName) { return this; } - /** - * Get the patchingConfiguration property: Container App auto patch configuration. - * - * @return the patchingConfiguration value. - */ - public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().patchingConfiguration(); - } - - /** - * Set the patchingConfiguration property: Container App auto patch configuration. - * - * @param patchingConfiguration the patchingConfiguration value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner - withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withPatchingConfiguration(patchingConfiguration); - return this; - } - /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -476,7 +421,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeStringField("managedBy", this.managedBy); - jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -514,8 +458,6 @@ public static ContainerAppInner fromJson(JsonReader jsonReader) throws IOExcepti deserializedContainerAppInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("managedBy".equals(fieldName)) { deserializedContainerAppInner.managedBy = reader.getString(); - } else if ("kind".equals(fieldName)) { - deserializedContainerAppInner.kind = Kind.fromString(reader.getString()); } else if ("properties".equals(fieldName)) { deserializedContainerAppInner.innerProperties = ContainerAppProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java index 1cf2f5032fc6..1bcbf1fba3b6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java @@ -10,8 +10,8 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerAppRunningStatus; import com.azure.resourcemanager.appcontainers.models.Template; import java.io.IOException; import java.util.List; @@ -27,9 +27,9 @@ public final class ContainerAppProperties implements JsonSerializable { - /* - * Build provisioning state. - */ - private BuildProvisioningState provisioningState; - - /* - * Status of the build once it has been provisioned. - */ - private BuildStatus buildStatus; - - /* - * Container registry that the final image will be uploaded to. - */ - private ContainerRegistryWithCustomImage destinationContainerRegistry; - - /* - * Configuration of the build. - */ - private ContainerAppsBuildConfiguration configuration; - - /* - * Endpoint from which the build logs can be streamed. - */ - private String logStreamEndpoint; - - /** - * Creates an instance of ContainerAppsBuildProperties class. - */ - public ContainerAppsBuildProperties() { - } - - /** - * Get the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - public BuildProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - public BuildStatus buildStatus() { - return this.buildStatus; - } - - /** - * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.destinationContainerRegistry; - } - - /** - * Get the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - public ContainerAppsBuildConfiguration configuration() { - return this.configuration; - } - - /** - * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.logStreamEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destinationContainerRegistry() != null) { - destinationContainerRegistry().validate(); - } - if (configuration() != null) { - configuration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildProperties 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 ContainerAppsBuildProperties. - */ - public static ContainerAppsBuildProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildProperties deserializedContainerAppsBuildProperties = new ContainerAppsBuildProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedContainerAppsBuildProperties.provisioningState - = BuildProvisioningState.fromString(reader.getString()); - } else if ("buildStatus".equals(fieldName)) { - deserializedContainerAppsBuildProperties.buildStatus = BuildStatus.fromString(reader.getString()); - } else if ("destinationContainerRegistry".equals(fieldName)) { - deserializedContainerAppsBuildProperties.destinationContainerRegistry - = ContainerRegistryWithCustomImage.fromJson(reader); - } else if ("configuration".equals(fieldName)) { - deserializedContainerAppsBuildProperties.configuration - = ContainerAppsBuildConfiguration.fromJson(reader); - } else if ("logStreamEndpoint".equals(fieldName)) { - deserializedContainerAppsBuildProperties.logStreamEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java deleted file mode 100644 index bebda57ec0da..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java +++ /dev/null @@ -1,205 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -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.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import java.io.IOException; - -/** - * Information pertaining to an individual build. - */ -@Immutable -public final class ContainerAppsBuildResourceInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ContainerAppsBuildProperties innerProperties; - - /* - * 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 ContainerAppsBuildResourceInner class. - */ - public ContainerAppsBuildResourceInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private ContainerAppsBuildProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - public BuildProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - public BuildStatus buildStatus() { - return this.innerProperties() == null ? null : this.innerProperties().buildStatus(); - } - - /** - * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().destinationContainerRegistry(); - } - - /** - * Get the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - public ContainerAppsBuildConfiguration configuration() { - return this.innerProperties() == null ? null : this.innerProperties().configuration(); - } - - /** - * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().logStreamEndpoint(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildResourceInner 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 ContainerAppsBuildResourceInner. - */ - public static ContainerAppsBuildResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildResourceInner deserializedContainerAppsBuildResourceInner - = new ContainerAppsBuildResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.innerProperties - = ContainerAppsBuildProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java deleted file mode 100644 index eb0ce921ef43..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java +++ /dev/null @@ -1,155 +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.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -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.appcontainers.models.PatchProperties; -import java.io.IOException; - -/** - * Container App Patch. - */ -@Immutable -public final class ContainerAppsPatchResourceInner extends ProxyResource { - /* - * Properties that describes current states of the patch resource. - */ - private PatchProperties 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 ContainerAppsPatchResourceInner class. - */ - public ContainerAppsPatchResourceInner() { - } - - /** - * Get the properties property: Properties that describes current states of the patch resource. - * - * @return the properties value. - */ - public PatchProperties properties() { - return this.properties; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsPatchResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsPatchResourceInner 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 ContainerAppsPatchResourceInner. - */ - public static ContainerAppsPatchResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsPatchResourceInner deserializedContainerAppsPatchResourceInner - = new ContainerAppsPatchResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.properties = PatchProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsPatchResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java index efd72c8da287..9978ca1f3594 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java @@ -10,7 +10,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.io.IOException; @@ -284,29 +283,6 @@ public DaprComponentInner withScopes(List scopes) { return this; } - /** - * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @return the serviceComponentBind value. - */ - public List serviceComponentBind() { - return this.innerProperties() == null ? null : this.innerProperties().serviceComponentBind(); - } - - /** - * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @param serviceComponentBind the serviceComponentBind value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withServiceComponentBind(List serviceComponentBind) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withServiceComponentBind(serviceComponentBind); - return this; - } - /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java index 2ea651f923a4..889c6b7bd48b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.io.IOException; @@ -60,11 +59,6 @@ public final class DaprComponentProperties implements JsonSerializable scopes; - /* - * List of container app services that are bound to the Dapr component - */ - private List serviceComponentBind; - /** * Creates an instance of DaprComponentProperties class. */ @@ -231,26 +225,6 @@ public DaprComponentProperties withScopes(List scopes) { return this; } - /** - * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @return the serviceComponentBind value. - */ - public List serviceComponentBind() { - return this.serviceComponentBind; - } - - /** - * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @param serviceComponentBind the serviceComponentBind value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withServiceComponentBind(List serviceComponentBind) { - this.serviceComponentBind = serviceComponentBind; - return this; - } - /** * Validates the instance. * @@ -263,9 +237,6 @@ public void validate() { if (metadata() != null) { metadata().forEach(e -> e.validate()); } - if (serviceComponentBind() != null) { - serviceComponentBind().forEach(e -> e.validate()); - } } /** @@ -282,8 +253,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("secretStoreComponent", this.secretStoreComponent); jsonWriter.writeArrayField("metadata", this.metadata, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("serviceComponentBind", this.serviceComponentBind, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -321,10 +290,6 @@ public static DaprComponentProperties fromJson(JsonReader jsonReader) throws IOE } else if ("scopes".equals(fieldName)) { List scopes = reader.readArray(reader1 -> reader1.getString()); deserializedDaprComponentProperties.scopes = scopes; - } else if ("serviceComponentBind".equals(fieldName)) { - List serviceComponentBind - = reader.readArray(reader1 -> DaprComponentServiceBinding.fromJson(reader1)); - deserializedDaprComponentProperties.serviceComponentBind = serviceComponentBind; } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java deleted file mode 100644 index 6d4303b56664..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java +++ /dev/null @@ -1,205 +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.appcontainers.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.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy. - */ -@Fluent -public final class DaprComponentResiliencyPolicyInner extends ProxyResource { - /* - * Dapr Component Resiliency Policy resource specific properties - */ - private DaprComponentResiliencyPolicyProperties innerProperties; - - /* - * 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 DaprComponentResiliencyPolicyInner class. - */ - public DaprComponentResiliencyPolicyInner() { - } - - /** - * Get the innerProperties property: Dapr Component Resiliency Policy resource specific properties. - * - * @return the innerProperties value. - */ - private DaprComponentResiliencyPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @return the inboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().inboundPolicy(); - } - - /** - * Set the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy the inboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyInner object itself. - */ - public DaprComponentResiliencyPolicyInner - withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentResiliencyPolicyProperties(); - } - this.innerProperties().withInboundPolicy(inboundPolicy); - return this; - } - - /** - * Get the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @return the outboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().outboundPolicy(); - } - - /** - * Set the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy the outboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyInner object itself. - */ - public DaprComponentResiliencyPolicyInner - withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentResiliencyPolicyProperties(); - } - this.innerProperties().withOutboundPolicy(outboundPolicy); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyInner 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 DaprComponentResiliencyPolicyInner. - */ - public static DaprComponentResiliencyPolicyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyInner deserializedDaprComponentResiliencyPolicyInner - = new DaprComponentResiliencyPolicyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.innerProperties - = DaprComponentResiliencyPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java deleted file mode 100644 index 2167772c38d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java +++ /dev/null @@ -1,134 +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.appcontainers.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.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy resource specific properties. - */ -@Fluent -public final class DaprComponentResiliencyPolicyProperties - implements JsonSerializable { - /* - * The optional inbound component resiliency policy configuration - */ - private DaprComponentResiliencyPolicyConfiguration inboundPolicy; - - /* - * The optional outbound component resiliency policy configuration - */ - private DaprComponentResiliencyPolicyConfiguration outboundPolicy; - - /** - * Creates an instance of DaprComponentResiliencyPolicyProperties class. - */ - public DaprComponentResiliencyPolicyProperties() { - } - - /** - * Get the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @return the inboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { - return this.inboundPolicy; - } - - /** - * Set the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy the inboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyProperties object itself. - */ - public DaprComponentResiliencyPolicyProperties - withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { - this.inboundPolicy = inboundPolicy; - return this; - } - - /** - * Get the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @return the outboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { - return this.outboundPolicy; - } - - /** - * Set the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy the outboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyProperties object itself. - */ - public DaprComponentResiliencyPolicyProperties - withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { - this.outboundPolicy = outboundPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inboundPolicy() != null) { - inboundPolicy().validate(); - } - if (outboundPolicy() != null) { - outboundPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("inboundPolicy", this.inboundPolicy); - jsonWriter.writeJsonField("outboundPolicy", this.outboundPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyProperties 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 DaprComponentResiliencyPolicyProperties. - */ - public static DaprComponentResiliencyPolicyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyProperties deserializedDaprComponentResiliencyPolicyProperties - = new DaprComponentResiliencyPolicyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("inboundPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyProperties.inboundPolicy - = DaprComponentResiliencyPolicyConfiguration.fromJson(reader); - } else if ("outboundPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyProperties.outboundPolicy - = DaprComponentResiliencyPolicyConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java deleted file mode 100644 index 623eba27acae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java +++ /dev/null @@ -1,319 +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.appcontainers.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.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Dapr PubSub Event Subscription. - */ -@Fluent -public final class DaprSubscriptionInner extends ProxyResource { - /* - * Dapr PubSub Event Subscription resource specific properties - */ - private DaprSubscriptionProperties innerProperties; - - /* - * 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 DaprSubscriptionInner class. - */ - public DaprSubscriptionInner() { - } - - /** - * Get the innerProperties property: Dapr PubSub Event Subscription resource specific properties. - * - * @return the innerProperties value. - */ - private DaprSubscriptionProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the pubsubName property: Dapr PubSub component name. - * - * @return the pubsubName value. - */ - public String pubsubName() { - return this.innerProperties() == null ? null : this.innerProperties().pubsubName(); - } - - /** - * Set the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName the pubsubName value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withPubsubName(String pubsubName) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withPubsubName(pubsubName); - return this; - } - - /** - * Get the topic property: Topic name. - * - * @return the topic value. - */ - public String topic() { - return this.innerProperties() == null ? null : this.innerProperties().topic(); - } - - /** - * Set the topic property: Topic name. - * - * @param topic the topic value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withTopic(String topic) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withTopic(topic); - return this; - } - - /** - * Get the deadLetterTopic property: Deadletter topic name. - * - * @return the deadLetterTopic value. - */ - public String deadLetterTopic() { - return this.innerProperties() == null ? null : this.innerProperties().deadLetterTopic(); - } - - /** - * Set the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic the deadLetterTopic value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withDeadLetterTopic(String deadLetterTopic) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withDeadLetterTopic(deadLetterTopic); - return this; - } - - /** - * Get the routes property: Subscription routes. - * - * @return the routes value. - */ - public DaprSubscriptionRoutes routes() { - return this.innerProperties() == null ? null : this.innerProperties().routes(); - } - - /** - * Set the routes property: Subscription routes. - * - * @param routes the routes value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withRoutes(DaprSubscriptionRoutes routes) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withRoutes(routes); - return this; - } - - /** - * Get the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @return the scopes value. - */ - public List scopes() { - return this.innerProperties() == null ? null : this.innerProperties().scopes(); - } - - /** - * Set the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @param scopes the scopes value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withScopes(List scopes) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withScopes(scopes); - return this; - } - - /** - * Get the metadata property: Subscription metadata. - * - * @return the metadata value. - */ - public Map metadata() { - return this.innerProperties() == null ? null : this.innerProperties().metadata(); - } - - /** - * Set the metadata property: Subscription metadata. - * - * @param metadata the metadata value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withMetadata(Map metadata) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withMetadata(metadata); - return this; - } - - /** - * Get the bulkSubscribe property: Bulk subscription options. - * - * @return the bulkSubscribe value. - */ - public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { - return this.innerProperties() == null ? null : this.innerProperties().bulkSubscribe(); - } - - /** - * Set the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe the bulkSubscribe value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withBulkSubscribe(bulkSubscribe); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionInner 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 DaprSubscriptionInner. - */ - public static DaprSubscriptionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionInner deserializedDaprSubscriptionInner = new DaprSubscriptionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDaprSubscriptionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDaprSubscriptionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDaprSubscriptionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDaprSubscriptionInner.innerProperties = DaprSubscriptionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDaprSubscriptionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java deleted file mode 100644 index 94f636305390..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java +++ /dev/null @@ -1,274 +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.appcontainers.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.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Dapr PubSub Event Subscription resource specific properties. - */ -@Fluent -public final class DaprSubscriptionProperties implements JsonSerializable { - /* - * Dapr PubSub component name - */ - private String pubsubName; - - /* - * Topic name - */ - private String topic; - - /* - * Deadletter topic name - */ - private String deadLetterTopic; - - /* - * Subscription routes - */ - private DaprSubscriptionRoutes routes; - - /* - * Application scopes to restrict the subscription to specific apps. - */ - private List scopes; - - /* - * Subscription metadata - */ - private Map metadata; - - /* - * Bulk subscription options - */ - private DaprSubscriptionBulkSubscribeOptions bulkSubscribe; - - /** - * Creates an instance of DaprSubscriptionProperties class. - */ - public DaprSubscriptionProperties() { - } - - /** - * Get the pubsubName property: Dapr PubSub component name. - * - * @return the pubsubName value. - */ - public String pubsubName() { - return this.pubsubName; - } - - /** - * Set the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName the pubsubName value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withPubsubName(String pubsubName) { - this.pubsubName = pubsubName; - return this; - } - - /** - * Get the topic property: Topic name. - * - * @return the topic value. - */ - public String topic() { - return this.topic; - } - - /** - * Set the topic property: Topic name. - * - * @param topic the topic value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withTopic(String topic) { - this.topic = topic; - return this; - } - - /** - * Get the deadLetterTopic property: Deadletter topic name. - * - * @return the deadLetterTopic value. - */ - public String deadLetterTopic() { - return this.deadLetterTopic; - } - - /** - * Set the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic the deadLetterTopic value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withDeadLetterTopic(String deadLetterTopic) { - this.deadLetterTopic = deadLetterTopic; - return this; - } - - /** - * Get the routes property: Subscription routes. - * - * @return the routes value. - */ - public DaprSubscriptionRoutes routes() { - return this.routes; - } - - /** - * Set the routes property: Subscription routes. - * - * @param routes the routes value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withRoutes(DaprSubscriptionRoutes routes) { - this.routes = routes; - return this; - } - - /** - * Get the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @param scopes the scopes value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Get the metadata property: Subscription metadata. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Subscription metadata. - * - * @param metadata the metadata value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the bulkSubscribe property: Bulk subscription options. - * - * @return the bulkSubscribe value. - */ - public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { - return this.bulkSubscribe; - } - - /** - * Set the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe the bulkSubscribe value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { - this.bulkSubscribe = bulkSubscribe; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routes() != null) { - routes().validate(); - } - if (bulkSubscribe() != null) { - bulkSubscribe().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("pubsubName", this.pubsubName); - jsonWriter.writeStringField("topic", this.topic); - jsonWriter.writeStringField("deadLetterTopic", this.deadLetterTopic); - jsonWriter.writeJsonField("routes", this.routes); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("bulkSubscribe", this.bulkSubscribe); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionProperties 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 DaprSubscriptionProperties. - */ - public static DaprSubscriptionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionProperties deserializedDaprSubscriptionProperties = new DaprSubscriptionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pubsubName".equals(fieldName)) { - deserializedDaprSubscriptionProperties.pubsubName = reader.getString(); - } else if ("topic".equals(fieldName)) { - deserializedDaprSubscriptionProperties.topic = reader.getString(); - } else if ("deadLetterTopic".equals(fieldName)) { - deserializedDaprSubscriptionProperties.deadLetterTopic = reader.getString(); - } else if ("routes".equals(fieldName)) { - deserializedDaprSubscriptionProperties.routes = DaprSubscriptionRoutes.fromJson(reader); - } else if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedDaprSubscriptionProperties.scopes = scopes; - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedDaprSubscriptionProperties.metadata = metadata; - } else if ("bulkSubscribe".equals(fieldName)) { - deserializedDaprSubscriptionProperties.bulkSubscribe - = DaprSubscriptionBulkSubscribeOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java deleted file mode 100644 index 8ff895f7f39d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java +++ /dev/null @@ -1,237 +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.appcontainers.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.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.io.IOException; -import java.util.List; - -/** - * .NET Component. - */ -@Fluent -public final class DotNetComponentInner extends ProxyResource { - /* - * .NET Component resource specific properties - */ - private DotNetComponentProperties innerProperties; - - /* - * 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 DotNetComponentInner class. - */ - public DotNetComponentInner() { - } - - /** - * Get the innerProperties property: .NET Component resource specific properties. - * - * @return the innerProperties value. - */ - private DotNetComponentProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the componentType property: Type of the .NET Component. - * - * @return the componentType value. - */ - public DotNetComponentType componentType() { - return this.innerProperties() == null ? null : this.innerProperties().componentType(); - } - - /** - * Set the componentType property: Type of the .NET Component. - * - * @param componentType the componentType value to set. - * @return the DotNetComponentInner object itself. - */ - public DotNetComponentInner withComponentType(DotNetComponentType componentType) { - if (this.innerProperties() == null) { - this.innerProperties = new DotNetComponentProperties(); - } - this.innerProperties().withComponentType(componentType); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the .NET Component. - * - * @return the provisioningState value. - */ - public DotNetComponentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the configurations property: List of .NET Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.innerProperties() == null ? null : this.innerProperties().configurations(); - } - - /** - * Set the configurations property: List of .NET Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the DotNetComponentInner object itself. - */ - public DotNetComponentInner withConfigurations(List configurations) { - if (this.innerProperties() == null) { - this.innerProperties = new DotNetComponentProperties(); - } - this.innerProperties().withConfigurations(configurations); - return this; - } - - /** - * Get the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @return the serviceBinds value. - */ - public List serviceBinds() { - return this.innerProperties() == null ? null : this.innerProperties().serviceBinds(); - } - - /** - * Set the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds the serviceBinds value to set. - * @return the DotNetComponentInner object itself. - */ - public DotNetComponentInner withServiceBinds(List serviceBinds) { - if (this.innerProperties() == null) { - this.innerProperties = new DotNetComponentProperties(); - } - this.innerProperties().withServiceBinds(serviceBinds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentInner 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 DotNetComponentInner. - */ - public static DotNetComponentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentInner deserializedDotNetComponentInner = new DotNetComponentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDotNetComponentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDotNetComponentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDotNetComponentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDotNetComponentInner.innerProperties = DotNetComponentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDotNetComponentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java deleted file mode 100644 index 182ec5ce5887..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java +++ /dev/null @@ -1,183 +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.appcontainers.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.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.io.IOException; -import java.util.List; - -/** - * .NET Component resource specific properties. - */ -@Fluent -public final class DotNetComponentProperties implements JsonSerializable { - /* - * Type of the .NET Component. - */ - private DotNetComponentType componentType; - - /* - * Provisioning state of the .NET Component. - */ - private DotNetComponentProvisioningState provisioningState; - - /* - * List of .NET Components configuration properties - */ - private List configurations; - - /* - * List of .NET Components that are bound to the .NET component - */ - private List serviceBinds; - - /** - * Creates an instance of DotNetComponentProperties class. - */ - public DotNetComponentProperties() { - } - - /** - * Get the componentType property: Type of the .NET Component. - * - * @return the componentType value. - */ - public DotNetComponentType componentType() { - return this.componentType; - } - - /** - * Set the componentType property: Type of the .NET Component. - * - * @param componentType the componentType value to set. - * @return the DotNetComponentProperties object itself. - */ - public DotNetComponentProperties withComponentType(DotNetComponentType componentType) { - this.componentType = componentType; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the .NET Component. - * - * @return the provisioningState value. - */ - public DotNetComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the configurations property: List of .NET Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.configurations; - } - - /** - * Set the configurations property: List of .NET Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the DotNetComponentProperties object itself. - */ - public DotNetComponentProperties withConfigurations(List configurations) { - this.configurations = configurations; - return this; - } - - /** - * Get the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @return the serviceBinds value. - */ - public List serviceBinds() { - return this.serviceBinds; - } - - /** - * Set the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds the serviceBinds value to set. - * @return the DotNetComponentProperties object itself. - */ - public DotNetComponentProperties withServiceBinds(List serviceBinds) { - this.serviceBinds = serviceBinds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeArrayField("configurations", this.configurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("serviceBinds", this.serviceBinds, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentProperties 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 DotNetComponentProperties. - */ - public static DotNetComponentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentProperties deserializedDotNetComponentProperties = new DotNetComponentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("componentType".equals(fieldName)) { - deserializedDotNetComponentProperties.componentType - = DotNetComponentType.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedDotNetComponentProperties.provisioningState - = DotNetComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> DotNetComponentConfigurationProperty.fromJson(reader1)); - deserializedDotNetComponentProperties.configurations = configurations; - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> DotNetComponentServiceBind.fromJson(reader1)); - deserializedDotNetComponentProperties.serviceBinds = serviceBinds; - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java deleted file mode 100644 index 3f50c599fc2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java +++ /dev/null @@ -1,177 +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.appcontainers.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 java.io.IOException; - -/** - * Type of match to perform. - */ -@Fluent -public final class HeaderMatchMatch implements JsonSerializable { - /* - * Exact value of the header - */ - private String exactMatch; - - /* - * Prefix value of the header - */ - private String prefixMatch; - - /* - * Suffix value of the header - */ - private String suffixMatch; - - /* - * Regex value of the header - */ - private String regexMatch; - - /** - * Creates an instance of HeaderMatchMatch class. - */ - public HeaderMatchMatch() { - } - - /** - * Get the exactMatch property: Exact value of the header. - * - * @return the exactMatch value. - */ - public String exactMatch() { - return this.exactMatch; - } - - /** - * Set the exactMatch property: Exact value of the header. - * - * @param exactMatch the exactMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withExactMatch(String exactMatch) { - this.exactMatch = exactMatch; - return this; - } - - /** - * Get the prefixMatch property: Prefix value of the header. - * - * @return the prefixMatch value. - */ - public String prefixMatch() { - return this.prefixMatch; - } - - /** - * Set the prefixMatch property: Prefix value of the header. - * - * @param prefixMatch the prefixMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withPrefixMatch(String prefixMatch) { - this.prefixMatch = prefixMatch; - return this; - } - - /** - * Get the suffixMatch property: Suffix value of the header. - * - * @return the suffixMatch value. - */ - public String suffixMatch() { - return this.suffixMatch; - } - - /** - * Set the suffixMatch property: Suffix value of the header. - * - * @param suffixMatch the suffixMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withSuffixMatch(String suffixMatch) { - this.suffixMatch = suffixMatch; - return this; - } - - /** - * Get the regexMatch property: Regex value of the header. - * - * @return the regexMatch value. - */ - public String regexMatch() { - return this.regexMatch; - } - - /** - * Set the regexMatch property: Regex value of the header. - * - * @param regexMatch the regexMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withRegexMatch(String regexMatch) { - this.regexMatch = regexMatch; - 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("exactMatch", this.exactMatch); - jsonWriter.writeStringField("prefixMatch", this.prefixMatch); - jsonWriter.writeStringField("suffixMatch", this.suffixMatch); - jsonWriter.writeStringField("regexMatch", this.regexMatch); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HeaderMatchMatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HeaderMatchMatch 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 HeaderMatchMatch. - */ - public static HeaderMatchMatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HeaderMatchMatch deserializedHeaderMatchMatch = new HeaderMatchMatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("exactMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.exactMatch = reader.getString(); - } else if ("prefixMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.prefixMatch = reader.getString(); - } else if ("suffixMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.suffixMatch = reader.getString(); - } else if ("regexMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.regexMatch = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHeaderMatchMatch; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java deleted file mode 100644 index 6d94fe02bc2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java +++ /dev/null @@ -1,158 +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.appcontainers.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.appcontainers.models.HeaderMatch; -import java.io.IOException; -import java.util.List; - -/** - * Conditions that must be met for a request to be retried. - */ -@Fluent -public final class HttpRetryPolicyMatches implements JsonSerializable { - /* - * Headers that must be present for a request to be retried - */ - private List headers; - - /* - * Additional http status codes that can trigger a retry - */ - private List httpStatusCodes; - - /* - * Errors that can trigger a retry - */ - private List errors; - - /** - * Creates an instance of HttpRetryPolicyMatches class. - */ - public HttpRetryPolicyMatches() { - } - - /** - * Get the headers property: Headers that must be present for a request to be retried. - * - * @return the headers value. - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers property: Headers that must be present for a request to be retried. - * - * @param headers the headers value to set. - * @return the HttpRetryPolicyMatches object itself. - */ - public HttpRetryPolicyMatches withHeaders(List headers) { - this.headers = headers; - return this; - } - - /** - * Get the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @return the httpStatusCodes value. - */ - public List httpStatusCodes() { - return this.httpStatusCodes; - } - - /** - * Set the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @param httpStatusCodes the httpStatusCodes value to set. - * @return the HttpRetryPolicyMatches object itself. - */ - public HttpRetryPolicyMatches withHttpStatusCodes(List httpStatusCodes) { - this.httpStatusCodes = httpStatusCodes; - return this; - } - - /** - * Get the errors property: Errors that can trigger a retry. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: Errors that can trigger a retry. - * - * @param errors the errors value to set. - * @return the HttpRetryPolicyMatches object itself. - */ - public HttpRetryPolicyMatches withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (headers() != null) { - headers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("httpStatusCodes", this.httpStatusCodes, - (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpRetryPolicyMatches from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpRetryPolicyMatches 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 HttpRetryPolicyMatches. - */ - public static HttpRetryPolicyMatches fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpRetryPolicyMatches deserializedHttpRetryPolicyMatches = new HttpRetryPolicyMatches(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("headers".equals(fieldName)) { - List headers = reader.readArray(reader1 -> HeaderMatch.fromJson(reader1)); - deserializedHttpRetryPolicyMatches.headers = headers; - } else if ("httpStatusCodes".equals(fieldName)) { - List httpStatusCodes = reader.readArray(reader1 -> reader1.getInt()); - deserializedHttpRetryPolicyMatches.httpStatusCodes = httpStatusCodes; - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> reader1.getString()); - deserializedHttpRetryPolicyMatches.errors = errors; - } else { - reader.skipChildren(); - } - } - - return deserializedHttpRetryPolicyMatches; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java deleted file mode 100644 index b84e2a65d710..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java +++ /dev/null @@ -1,123 +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.appcontainers.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 java.io.IOException; - -/** - * Settings for retry backoff characteristics. - */ -@Fluent -public final class HttpRetryPolicyRetryBackOff implements JsonSerializable { - /* - * Initial delay, in milliseconds, before retrying a request - */ - private Long initialDelayInMilliseconds; - - /* - * Maximum interval, in milliseconds, between retries - */ - private Long maxIntervalInMilliseconds; - - /** - * Creates an instance of HttpRetryPolicyRetryBackOff class. - */ - public HttpRetryPolicyRetryBackOff() { - } - - /** - * Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @return the initialDelayInMilliseconds value. - */ - public Long initialDelayInMilliseconds() { - return this.initialDelayInMilliseconds; - } - - /** - * Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. - * @return the HttpRetryPolicyRetryBackOff object itself. - */ - public HttpRetryPolicyRetryBackOff withInitialDelayInMilliseconds(Long initialDelayInMilliseconds) { - this.initialDelayInMilliseconds = initialDelayInMilliseconds; - return this; - } - - /** - * Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @return the maxIntervalInMilliseconds value. - */ - public Long maxIntervalInMilliseconds() { - return this.maxIntervalInMilliseconds; - } - - /** - * Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. - * @return the HttpRetryPolicyRetryBackOff object itself. - */ - public HttpRetryPolicyRetryBackOff withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds) { - this.maxIntervalInMilliseconds = maxIntervalInMilliseconds; - 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.writeNumberField("initialDelayInMilliseconds", this.initialDelayInMilliseconds); - jsonWriter.writeNumberField("maxIntervalInMilliseconds", this.maxIntervalInMilliseconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpRetryPolicyRetryBackOff from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpRetryPolicyRetryBackOff 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 HttpRetryPolicyRetryBackOff. - */ - public static HttpRetryPolicyRetryBackOff fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpRetryPolicyRetryBackOff deserializedHttpRetryPolicyRetryBackOff = new HttpRetryPolicyRetryBackOff(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initialDelayInMilliseconds".equals(fieldName)) { - deserializedHttpRetryPolicyRetryBackOff.initialDelayInMilliseconds - = reader.getNullable(JsonReader::getLong); - } else if ("maxIntervalInMilliseconds".equals(fieldName)) { - deserializedHttpRetryPolicyRetryBackOff.maxIntervalInMilliseconds - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpRetryPolicyRetryBackOff; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java index e2a76d5a4b6e..8eaa5a9b57f3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import java.io.IOException; @@ -193,29 +192,6 @@ public JobExecutionInner withTemplate(JobExecutionTemplate template) { return this; } - /** - * Get the detailedStatus property: Detailed status of the job execution. - * - * @return the detailedStatus value. - */ - public ExecutionStatus detailedStatus() { - return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); - } - - /** - * Set the detailedStatus property: Detailed status of the job execution. - * - * @param detailedStatus the detailedStatus value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withDetailedStatus(ExecutionStatus detailedStatus) { - if (this.innerProperties() == null) { - this.innerProperties = new JobExecutionProperties(); - } - this.innerProperties().withDetailedStatus(detailedStatus); - return this; - } - /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java index f4c57c06efca..e1ed19641b89 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java @@ -10,7 +10,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import java.io.IOException; @@ -42,11 +41,6 @@ public final class JobExecutionProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("template".equals(fieldName)) { deserializedJobExecutionProperties.template = JobExecutionTemplate.fromJson(reader); - } else if ("detailedStatus".equals(fieldName)) { - deserializedJobExecutionProperties.detailedStatus = ExecutionStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java index e1f409fb7cd1..33a02ae9daf4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java @@ -10,10 +10,8 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JobRunningState; import com.azure.resourcemanager.appcontainers.models.JobTemplate; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import java.io.IOException; @@ -25,11 +23,6 @@ */ @Fluent public final class JobInner extends Resource { - /* - * The complex type of the extended location. - */ - private ExtendedLocation extendedLocation; - /* * Managed identities needed by a container app job to interact with other Azure services to not maintain any * secrets or credentials in code. @@ -67,26 +60,6 @@ public final class JobInner extends Resource { public JobInner() { } - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the JobInner object itself. - */ - public JobInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - /** * Get the identity property: Managed identities needed by a container app job to interact with other Azure services * to not maintain any secrets or credentials in code. @@ -184,15 +157,6 @@ public JobProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Get the runningState property: Current running state of the job. - * - * @return the runningState value. - */ - public JobRunningState runningState() { - return this.innerProperties() == null ? null : this.innerProperties().runningState(); - } - /** * Get the environmentId property: Resource ID of environment. * @@ -309,9 +273,6 @@ public String eventStreamEndpoint() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } if (identity() != null) { identity().validate(); } @@ -328,7 +289,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); @@ -361,8 +321,6 @@ public static JobInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedJobInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedJobInner.extendedLocation = ExtendedLocation.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedJobInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java index 07770179672f..f5b84eefb271 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java @@ -11,7 +11,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JobRunningState; import com.azure.resourcemanager.appcontainers.models.JobTemplate; import java.io.IOException; import java.util.List; @@ -26,11 +25,6 @@ public final class JobProperties implements JsonSerializable { */ private JobProvisioningState provisioningState; - /* - * Current running state of the job - */ - private JobRunningState runningState; - /* * Resource ID of environment. */ @@ -76,15 +70,6 @@ public JobProvisioningState provisioningState() { return this.provisioningState; } - /** - * Get the runningState property: Current running state of the job. - * - * @return the runningState value. - */ - public JobRunningState runningState() { - return this.runningState; - } - /** * Get the environmentId property: Resource ID of environment. * @@ -227,8 +212,6 @@ public static JobProperties fromJson(JsonReader jsonReader) throws IOException { if ("provisioningState".equals(fieldName)) { deserializedJobProperties.provisioningState = JobProvisioningState.fromString(reader.getString()); - } else if ("runningState".equals(fieldName)) { - deserializedJobProperties.runningState = JobRunningState.fromString(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedJobProperties.environmentId = reader.getString(); } else if ("workloadProfileName".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java deleted file mode 100644 index eb646b6c0096..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java +++ /dev/null @@ -1,162 +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.appcontainers.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 java.io.IOException; - -/** - * A logic app extension resource. - */ -@Fluent -public final class LogicAppInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private Object 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 LogicAppInner class. - */ - public LogicAppInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the LogicAppInner object itself. - */ - public LogicAppInner withProperties(Object 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; - } - - /** - * 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.writeUntypedField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogicAppInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogicAppInner 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 LogicAppInner. - */ - public static LogicAppInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogicAppInner deserializedLogicAppInner = new LogicAppInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedLogicAppInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedLogicAppInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedLogicAppInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedLogicAppInner.properties = reader.readUntyped(); - } else if ("systemData".equals(fieldName)) { - deserializedLogicAppInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLogicAppInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java index 3bee1a560a9a..b48487f4e78e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java @@ -10,7 +10,6 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; @@ -19,8 +18,6 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.PublicNetworkAccess; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.io.IOException; @@ -292,9 +289,8 @@ public String staticIp() { } /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to + * configured destination. * * @return the appLogsConfiguration value. */ @@ -303,9 +299,8 @@ public AppLogsConfiguration appLogsConfiguration() { } /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to + * configured destination. * * @param appLogsConfiguration the appLogsConfiguration value to set. * @return the ManagedEnvironmentInner object itself. @@ -318,53 +313,6 @@ public ManagedEnvironmentInner withAppLogsConfiguration(AppLogsConfiguration app return this; } - /** - * Get the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @return the appInsightsConfiguration value. - */ - public AppInsightsConfiguration appInsightsConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().appInsightsConfiguration(); - } - - /** - * Set the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration the appInsightsConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withAppInsightsConfiguration(appInsightsConfiguration); - return this; - } - - /** - * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @return the openTelemetryConfiguration value. - */ - public OpenTelemetryConfiguration openTelemetryConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().openTelemetryConfiguration(); - } - - /** - * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner - withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withOpenTelemetryConfiguration(openTelemetryConfiguration); - return this; - } - /** * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. * @@ -564,40 +512,6 @@ public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfigura return this; } - /** - * Get the privateEndpointConnections property: Private endpoint connections to the resource. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); - } - - /** - * Get the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java index a2f8451b0f7f..fcbd3c6f0d9f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java @@ -9,7 +9,6 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; @@ -17,8 +16,6 @@ import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.PublicNetworkAccess; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.io.IOException; @@ -65,22 +62,10 @@ public final class ManagedEnvironmentProperties implements JsonSerializable privateEndpointConnections; - - /* - * Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. - */ - private PublicNetworkAccess publicNetworkAccess; - /** * Creates an instance of ManagedEnvironmentProperties class. */ @@ -244,9 +219,8 @@ public String staticIp() { } /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to + * configured destination. * * @return the appLogsConfiguration value. */ @@ -255,9 +229,8 @@ public AppLogsConfiguration appLogsConfiguration() { } /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to + * configured destination. * * @param appLogsConfiguration the appLogsConfiguration value to set. * @return the ManagedEnvironmentProperties object itself. @@ -267,48 +240,6 @@ public ManagedEnvironmentProperties withAppLogsConfiguration(AppLogsConfiguratio return this; } - /** - * Get the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @return the appInsightsConfiguration value. - */ - public AppInsightsConfiguration appInsightsConfiguration() { - return this.appInsightsConfiguration; - } - - /** - * Set the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration the appInsightsConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties - withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { - this.appInsightsConfiguration = appInsightsConfiguration; - return this; - } - - /** - * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @return the openTelemetryConfiguration value. - */ - public OpenTelemetryConfiguration openTelemetryConfiguration() { - return this.openTelemetryConfiguration; - } - - /** - * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties - withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { - this.openTelemetryConfiguration = openTelemetryConfiguration; - return this; - } - /** * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. * @@ -485,37 +416,6 @@ public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfigura return this; } - /** - * Get the privateEndpointConnections property: Private endpoint connections to the resource. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - /** * Validates the instance. * @@ -528,12 +428,6 @@ public void validate() { if (appLogsConfiguration() != null) { appLogsConfiguration().validate(); } - if (appInsightsConfiguration() != null) { - appInsightsConfiguration().validate(); - } - if (openTelemetryConfiguration() != null) { - openTelemetryConfiguration().validate(); - } if (customDomainConfiguration() != null) { customDomainConfiguration().validate(); } @@ -552,9 +446,6 @@ public void validate() { if (peerTrafficConfiguration() != null) { peerTrafficConfiguration().validate(); } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } } /** @@ -567,8 +458,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("daprAIConnectionString", this.daprAIConnectionString); jsonWriter.writeJsonField("vnetConfiguration", this.vnetConfiguration); jsonWriter.writeJsonField("appLogsConfiguration", this.appLogsConfiguration); - jsonWriter.writeJsonField("appInsightsConfiguration", this.appInsightsConfiguration); - jsonWriter.writeJsonField("openTelemetryConfiguration", this.openTelemetryConfiguration); jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); jsonWriter.writeJsonField("customDomainConfiguration", this.customDomainConfiguration); jsonWriter.writeArrayField("workloadProfiles", this.workloadProfiles, @@ -578,8 +467,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("infrastructureResourceGroup", this.infrastructureResourceGroup); jsonWriter.writeJsonField("peerAuthentication", this.peerAuthentication); jsonWriter.writeJsonField("peerTrafficConfiguration", this.peerTrafficConfiguration); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); return jsonWriter.writeEndObject(); } @@ -616,12 +503,6 @@ public static ManagedEnvironmentProperties fromJson(JsonReader jsonReader) throw } else if ("appLogsConfiguration".equals(fieldName)) { deserializedManagedEnvironmentProperties.appLogsConfiguration = AppLogsConfiguration.fromJson(reader); - } else if ("appInsightsConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.appInsightsConfiguration - = AppInsightsConfiguration.fromJson(reader); - } else if ("openTelemetryConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.openTelemetryConfiguration - = OpenTelemetryConfiguration.fromJson(reader); } else if ("zoneRedundant".equals(fieldName)) { deserializedManagedEnvironmentProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); } else if ("customDomainConfiguration".equals(fieldName)) { @@ -645,13 +526,6 @@ public static ManagedEnvironmentProperties fromJson(JsonReader jsonReader) throw } else if ("peerTrafficConfiguration".equals(fieldName)) { deserializedManagedEnvironmentProperties.peerTrafficConfiguration = ManagedEnvironmentPropertiesPeerTrafficConfiguration.fromJson(reader); - } else if ("privateEndpointConnections".equals(fieldName)) { - List privateEndpointConnections - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedManagedEnvironmentProperties.privateEndpointConnections = privateEndpointConnections; - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedManagedEnvironmentProperties.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java deleted file mode 100644 index 31fb3366ed03..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,227 +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.appcontainers.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.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.io.IOException; -import java.util.List; - -/** - * The Private Endpoint Connection resource. - */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Resource properties. - */ - private PrivateEndpointConnectionProperties innerProperties; - - /* - * 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 PrivateEndpointConnectionInner class. - */ - public PrivateEndpointConnectionInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the groupIds property: The group ids for the private endpoint resource. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.innerProperties() == null ? null : this.innerProperties().groupIds(); - } - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionInner 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 PrivateEndpointConnectionInner. - */ - public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner - = new PrivateEndpointConnectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.innerProperties - = PrivateEndpointConnectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java deleted file mode 100644 index 6ccaf7bee389..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,179 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the private endpoint connection. - */ -@Fluent -public final class PrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The group ids for the private endpoint resource. - */ - private List groupIds; - - /* - * The resource of private end point. - */ - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between service consumer and provider. - */ - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - private PrivateEndpointConnectionProvisioningState provisioningState; - - /** - * Creates an instance of PrivateEndpointConnectionProperties class. - */ - public PrivateEndpointConnectionProperties() { - } - - /** - * Get the groupIds property: The group ids for the private endpoint resource. - * - * @return the groupIds value. - */ - public List groupIds() { - return this.groupIds; - } - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties. - */ - public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties - = new PrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkServiceConnectionState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState - = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("groupIds".equals(fieldName)) { - List groupIds = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.provisioningState - = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java deleted file mode 100644 index 279169e080d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java +++ /dev/null @@ -1,197 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * A private link resource. - */ -@Fluent -public final class PrivateLinkResourceInner extends ProxyResource { - /* - * Resource properties. - */ - private PrivateLinkResourceProperties innerProperties; - - /* - * 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 PrivateLinkResourceInner class. - */ - public PrivateLinkResourceInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); - } - - /** - * Get the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); - } - - /** - * Set the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceInner object itself. - */ - public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceInner 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 PrivateLinkResourceInner. - */ - public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResourceInner.innerProperties - = PrivateLinkResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java deleted file mode 100644 index f47ea4ff34d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,130 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Properties of a private link resource. - */ -@Fluent -public final class PrivateLinkResourceProperties implements JsonSerializable { - /* - * The private link resource group id. - */ - private String groupId; - - /* - * The private link resource required member names. - */ - private List requiredMembers; - - /* - * The private link resource private link DNS zone name. - */ - private List requiredZoneNames; - - /** - * Creates an instance of PrivateLinkResourceProperties class. - */ - public PrivateLinkResourceProperties() { - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Set the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - 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.writeArrayField("requiredZoneNames", this.requiredZoneNames, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceProperties 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 PrivateLinkResourceProperties. - */ - public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties - = new PrivateLinkResourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupId".equals(fieldName)) { - deserializedPrivateLinkResourceProperties.groupId = reader.getString(); - } else if ("requiredMembers".equals(fieldName)) { - List requiredMembers = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; - } else if ("requiredZoneNames".equals(fieldName)) { - List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java index a75e266bb165..b78023bf7bca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java @@ -13,6 +13,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; @@ -27,6 +29,12 @@ */ @Fluent public final class SessionPoolInner extends Resource { + /* + * Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or + * credentials in code. + */ + private ManagedServiceIdentity identity; + /* * Container App session pool resource specific properties */ @@ -58,6 +66,28 @@ public final class SessionPoolInner extends Resource { public SessionPoolInner() { } + /** + * Get the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @param identity the identity value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the innerProperties property: Container App session pool resource specific properties. * @@ -337,12 +367,40 @@ public SessionPoolProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @return the managedIdentitySettings value. + */ + public List managedIdentitySettings() { + return this.innerProperties() == null ? null : this.innerProperties().managedIdentitySettings(); + } + + /** + * Set the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @param managedIdentitySettings the managedIdentitySettings value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withManagedIdentitySettings(List managedIdentitySettings) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withManagedIdentitySettings(managedIdentitySettings); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } @@ -356,6 +414,7 @@ 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.innerProperties); return jsonWriter.writeEndObject(); } @@ -387,6 +446,8 @@ public static SessionPoolInner fromJson(JsonReader jsonReader) throws IOExceptio } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedSessionPoolInner.withTags(tags); + } else if ("identity".equals(fieldName)) { + deserializedSessionPoolInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedSessionPoolInner.innerProperties = SessionPoolProperties.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java index 02214a703a37..b32bd41995dc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; @@ -80,6 +81,11 @@ public final class SessionPoolProperties implements JsonSerializable managedIdentitySettings; + /** * Creates an instance of SessionPoolProperties class. */ @@ -276,6 +282,28 @@ public SessionPoolProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @return the managedIdentitySettings value. + */ + public List managedIdentitySettings() { + return this.managedIdentitySettings; + } + + /** + * Set the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @param managedIdentitySettings the managedIdentitySettings value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withManagedIdentitySettings(List managedIdentitySettings) { + this.managedIdentitySettings = managedIdentitySettings; + return this; + } + /** * Validates the instance. * @@ -297,6 +325,9 @@ public void validate() { if (sessionNetworkConfiguration() != null) { sessionNetworkConfiguration().validate(); } + if (managedIdentitySettings() != null) { + managedIdentitySettings().forEach(e -> e.validate()); + } } /** @@ -314,6 +345,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("dynamicPoolConfiguration", this.dynamicPoolConfiguration); jsonWriter.writeJsonField("customContainerTemplate", this.customContainerTemplate); jsonWriter.writeJsonField("sessionNetworkConfiguration", this.sessionNetworkConfiguration); + jsonWriter.writeArrayField("managedIdentitySettings", this.managedIdentitySettings, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -360,6 +393,10 @@ public static SessionPoolProperties fromJson(JsonReader jsonReader) throws IOExc } else if ("provisioningState".equals(fieldName)) { deserializedSessionPoolProperties.provisioningState = SessionPoolProvisioningState.fromString(reader.getString()); + } else if ("managedIdentitySettings".equals(fieldName)) { + List managedIdentitySettings + = reader.readArray(reader1 -> ManagedIdentitySetting.fromJson(reader1)); + deserializedSessionPoolProperties.managedIdentitySettings = managedIdentitySettings; } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java index 652f2a4fc567..2f42763df5db 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java @@ -21,7 +21,7 @@ public final class UsageInner implements JsonSerializable { /* * An enum describing the unit of usage measurement. */ - private String unit = "Count"; + private final String unit = "Count"; /* * The current usage of the resource. @@ -53,17 +53,6 @@ public String unit() { return this.unit; } - /** - * Set the unit property: An enum describing the unit of usage measurement. - * - * @param unit the unit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withUnit(String unit) { - this.unit = unit; - return this; - } - /** * Get the currentValue property: The current usage of the resource. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java deleted file mode 100644 index ed3a7ea4427c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java +++ /dev/null @@ -1,201 +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.appcontainers.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.appcontainers.models.WorkflowEnvelopeProperties; -import java.io.IOException; - -/** - * Workflow properties definition. - */ -@Fluent -public final class WorkflowEnvelopeInner implements JsonSerializable { - /* - * The resource id. - */ - private String id; - - /* - * Gets the resource name. - */ - private String name; - - /* - * Gets the resource type. - */ - private String type; - - /* - * The resource kind. - */ - private String kind; - - /* - * The resource location. - */ - private String location; - - /* - * Additional workflow properties. - */ - private WorkflowEnvelopeProperties properties; - - /** - * Creates an instance of WorkflowEnvelopeInner class. - */ - public WorkflowEnvelopeInner() { - } - - /** - * Get the id property: The resource id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Gets the resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Gets the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the kind property: The resource kind. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: The resource kind. - * - * @param kind the kind value to set. - * @return the WorkflowEnvelopeInner object itself. - */ - public WorkflowEnvelopeInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The resource location. - * - * @param location the location value to set. - * @return the WorkflowEnvelopeInner object itself. - */ - public WorkflowEnvelopeInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional workflow properties. - * - * @return the properties value. - */ - public WorkflowEnvelopeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Additional workflow properties. - * - * @param properties the properties value to set. - * @return the WorkflowEnvelopeInner object itself. - */ - public WorkflowEnvelopeInner withProperties(WorkflowEnvelopeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkflowEnvelopeInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkflowEnvelopeInner 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 WorkflowEnvelopeInner. - */ - public static WorkflowEnvelopeInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkflowEnvelopeInner deserializedWorkflowEnvelopeInner = new WorkflowEnvelopeInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.type = reader.getString(); - } else if ("kind".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.kind = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.location = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.properties = WorkflowEnvelopeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkflowEnvelopeInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java index f87287ab52d0..9ea383c7aad7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java @@ -4,8 +4,6 @@ /** * Package containing the inner data models for ContainerAppsApiClient. - * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the - * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions - * extension resource. + * null. */ package com.azure.resourcemanager.appcontainers.fluent.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java index 0eba2fe983f2..131b0b619aad 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java @@ -4,8 +4,6 @@ /** * Package containing the service clients for ContainerAppsApiClient. - * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the - * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions - * extension resource. + * null. */ package com.azure.resourcemanager.appcontainers.fluent; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java deleted file mode 100644 index e117050a35fb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java +++ /dev/null @@ -1,926 +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.appcontainers.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.Patch; -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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import com.azure.resourcemanager.appcontainers.models.AppResiliencyCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AppResilienciesClient. - */ -public final class AppResilienciesClientImpl implements AppResilienciesClient { - /** - * The proxy service used to perform REST calls. - */ - private final AppResilienciesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of AppResilienciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AppResilienciesClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(AppResilienciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientAppResiliencies to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface AppResilienciesService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppResiliencyInner resiliencyEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppResiliencyInner resiliencyEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope, context).block(); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppResiliencyInner createOrUpdate(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, appName, name, resiliencyEnvelope, Context.NONE) - .getValue(); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, appName, - name, this.client.getApiVersion(), resiliencyEnvelope, accept, context); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return updateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope, Context context) { - return updateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope, context).block(); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppResiliencyInner update(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return updateWithResponse(resourceGroupName, appName, name, resiliencyEnvelope, Context.NONE).getValue(); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 appName, String name) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 appName, String name, - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, appName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 appName, String name) { - return deleteWithResponseAsync(resourceGroupName, appName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, appName, name, context).block(); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 appName, String name) { - deleteWithResponse(resourceGroupName, appName, name, Context.NONE); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String appName, - String name) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String appName, - String name, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, appName, name, - this.client.getApiVersion(), accept, context); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String appName, String name) { - return getWithResponseAsync(resourceGroupName, appName, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String appName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, appName, name, context).block(); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppResiliencyInner get(String resourceGroupName, String appName, String name) { - return getWithResponse(resourceGroupName, appName, name, Context.NONE).getValue(); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String appName) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, 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 an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String appName, - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName 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, appName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String appName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, appName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String appName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, appName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String appName) { - return new PagedIterable<>(listAsync(resourceGroupName, appName)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String appName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, appName, context)); - } - - /** - * 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies 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(), - 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java deleted file mode 100644 index d1884526629d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java +++ /dev/null @@ -1,156 +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.appcontainers.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.appcontainers.fluent.AppResilienciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import com.azure.resourcemanager.appcontainers.models.AppResiliencies; -import com.azure.resourcemanager.appcontainers.models.AppResiliency; - -public final class AppResilienciesImpl implements AppResiliencies { - private static final ClientLogger LOGGER = new ClientLogger(AppResilienciesImpl.class); - - private final AppResilienciesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public AppResilienciesImpl(AppResilienciesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, appName, name, context); - } - - public void delete(String resourceGroupName, String appName, String name) { - this.serviceClient().delete(resourceGroupName, appName, name); - } - - public Response getWithResponse(String resourceGroupName, String appName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, appName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AppResiliencyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AppResiliency get(String resourceGroupName, String appName, String name) { - AppResiliencyInner inner = this.serviceClient().get(resourceGroupName, appName, name); - if (inner != null) { - return new AppResiliencyImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String appName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, appName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppResiliencyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String appName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, appName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppResiliencyImpl(inner1, this.manager())); - } - - public AppResiliency 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, appName, name, 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, appName, name, 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - this.deleteWithResponse(resourceGroupName, appName, name, Context.NONE); - } - - public Response 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.deleteWithResponse(resourceGroupName, appName, name, context); - } - - private AppResilienciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public AppResiliencyImpl define(String name) { - return new AppResiliencyImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java deleted file mode 100644 index ac7c0ecd7a10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java +++ /dev/null @@ -1,183 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import com.azure.resourcemanager.appcontainers.models.AppResiliency; -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; - -public final class AppResiliencyImpl implements AppResiliency, AppResiliency.Definition, AppResiliency.Update { - private AppResiliencyInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public TimeoutPolicy timeoutPolicy() { - return this.innerModel().timeoutPolicy(); - } - - public HttpRetryPolicy httpRetryPolicy() { - return this.innerModel().httpRetryPolicy(); - } - - public TcpRetryPolicy tcpRetryPolicy() { - return this.innerModel().tcpRetryPolicy(); - } - - public CircuitBreakerPolicy circuitBreakerPolicy() { - return this.innerModel().circuitBreakerPolicy(); - } - - public HttpConnectionPool httpConnectionPool() { - return this.innerModel().httpConnectionPool(); - } - - public TcpConnectionPool tcpConnectionPool() { - return this.innerModel().tcpConnectionPool(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AppResiliencyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String appName; - - private String name; - - public AppResiliencyImpl withExistingContainerApp(String resourceGroupName, String appName) { - this.resourceGroupName = resourceGroupName; - this.appName = appName; - return this; - } - - public AppResiliency create() { - this.innerObject = serviceManager.serviceClient() - .getAppResiliencies() - .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AppResiliency create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAppResiliencies() - .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), context) - .getValue(); - return this; - } - - AppResiliencyImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new AppResiliencyInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public AppResiliencyImpl update() { - return this; - } - - public AppResiliency apply() { - this.innerObject = serviceManager.serviceClient() - .getAppResiliencies() - .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public AppResiliency apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAppResiliencies() - .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), context) - .getValue(); - return this; - } - - AppResiliencyImpl(AppResiliencyInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.appName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resiliencyPolicies"); - } - - public AppResiliency refresh() { - this.innerObject = serviceManager.serviceClient() - .getAppResiliencies() - .getWithResponse(resourceGroupName, appName, name, Context.NONE) - .getValue(); - return this; - } - - public AppResiliency refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getAppResiliencies() - .getWithResponse(resourceGroupName, appName, name, context) - .getValue(); - return this; - } - - public AppResiliencyImpl withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { - this.innerModel().withTimeoutPolicy(timeoutPolicy); - return this; - } - - public AppResiliencyImpl withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { - this.innerModel().withHttpRetryPolicy(httpRetryPolicy); - return this; - } - - public AppResiliencyImpl withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { - this.innerModel().withTcpRetryPolicy(tcpRetryPolicy); - return this; - } - - public AppResiliencyImpl withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { - this.innerModel().withCircuitBreakerPolicy(circuitBreakerPolicy); - return this; - } - - public AppResiliencyImpl withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { - this.innerModel().withHttpConnectionPool(httpConnectionPool); - return this; - } - - public AppResiliencyImpl withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { - this.innerModel().withTcpConnectionPool(tcpConnectionPool); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java deleted file mode 100644 index c41f96fc70bf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java +++ /dev/null @@ -1,202 +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.appcontainers.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.appcontainers.fluent.BuildAuthTokensClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BuildAuthTokensClient. - */ -public final class BuildAuthTokensClientImpl implements BuildAuthTokensClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildAuthTokensService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildAuthTokensClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildAuthTokensClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(BuildAuthTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuildAuthTokens to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildAuthTokensService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, String builderName, - String buildName) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, String builderName, - String buildName, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName 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(), this.client.getSubscriptionId(), - resourceGroupName, builderName, buildName, accept, context); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String builderName, String buildName) { - return listWithResponseAsync(resourceGroupName, builderName, buildName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - return listWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildTokenInner list(String resourceGroupName, String builderName, String buildName) { - return listWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java deleted file mode 100644 index be90dbf62492..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java +++ /dev/null @@ -1,57 +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.appcontainers.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.appcontainers.fluent.BuildAuthTokensClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import com.azure.resourcemanager.appcontainers.models.BuildAuthTokens; -import com.azure.resourcemanager.appcontainers.models.BuildToken; - -public final class BuildAuthTokensImpl implements BuildAuthTokens { - private static final ClientLogger LOGGER = new ClientLogger(BuildAuthTokensImpl.class); - - private final BuildAuthTokensClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildAuthTokensImpl(BuildAuthTokensClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, builderName, buildName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BuildTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BuildToken list(String resourceGroupName, String builderName, String buildName) { - BuildTokenInner inner = this.serviceClient().list(resourceGroupName, builderName, buildName); - if (inner != null) { - return new BuildTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - private BuildAuthTokensClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java deleted file mode 100644 index f254e9354fc1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java +++ /dev/null @@ -1,162 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildResource; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; - -public final class BuildResourceImpl implements BuildResource, BuildResource.Definition, BuildResource.Update { - private BuildResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public BuildProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public BuildStatus buildStatus() { - return this.innerModel().buildStatus(); - } - - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.innerModel().destinationContainerRegistry(); - } - - public BuildConfiguration configuration() { - return this.innerModel().configuration(); - } - - public String uploadEndpoint() { - return this.innerModel().uploadEndpoint(); - } - - public String logStreamEndpoint() { - return this.innerModel().logStreamEndpoint(); - } - - public String tokenEndpoint() { - return this.innerModel().tokenEndpoint(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BuildResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String builderName; - - private String buildName; - - public BuildResourceImpl withExistingBuilder(String resourceGroupName, String builderName) { - this.resourceGroupName = resourceGroupName; - this.builderName = builderName; - return this; - } - - public BuildResource create() { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), Context.NONE); - return this; - } - - public BuildResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); - return this; - } - - BuildResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new BuildResourceInner(); - this.serviceManager = serviceManager; - this.buildName = name; - } - - public BuildResourceImpl update() { - return this; - } - - public BuildResource apply() { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), Context.NONE); - return this; - } - - public BuildResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); - return this; - } - - BuildResourceImpl(BuildResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.builderName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builders"); - this.buildName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builds"); - } - - public BuildResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .getWithResponse(resourceGroupName, builderName, buildName, Context.NONE) - .getValue(); - return this; - } - - public BuildResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .getWithResponse(resourceGroupName, builderName, buildName, context) - .getValue(); - return this; - } - - public BuildResourceImpl - withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { - this.innerModel().withDestinationContainerRegistry(destinationContainerRegistry); - return this; - } - - public BuildResourceImpl withConfiguration(BuildConfiguration configuration) { - this.innerModel().withConfiguration(configuration); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java deleted file mode 100644 index cd7d3b491370..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java +++ /dev/null @@ -1,37 +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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import com.azure.resourcemanager.appcontainers.models.BuildToken; -import java.time.OffsetDateTime; - -public final class BuildTokenImpl implements BuildToken { - private BuildTokenInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - BuildTokenImpl(BuildTokenInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String token() { - return this.innerModel().token(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public BuildTokenInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java deleted file mode 100644 index 14d509009b5e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java +++ /dev/null @@ -1,217 +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.appcontainers.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class BuilderResourceImpl implements BuilderResource, BuilderResource.Definition, BuilderResource.Update { - private BuilderResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public BuilderProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String environmentId() { - return this.innerModel().environmentId(); - } - - public List containerRegistries() { - List inner = this.innerModel().containerRegistries(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BuilderResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String builderName; - - private BuilderResourceUpdate updateBuilderEnvelope; - - public BuilderResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public BuilderResource create() { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .createOrUpdate(resourceGroupName, builderName, this.innerModel(), Context.NONE); - return this; - } - - public BuilderResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .createOrUpdate(resourceGroupName, builderName, this.innerModel(), context); - return this; - } - - BuilderResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new BuilderResourceInner(); - this.serviceManager = serviceManager; - this.builderName = name; - } - - public BuilderResourceImpl update() { - this.updateBuilderEnvelope = new BuilderResourceUpdate(); - return this; - } - - public BuilderResource apply() { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .update(resourceGroupName, builderName, updateBuilderEnvelope, Context.NONE); - return this; - } - - public BuilderResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .update(resourceGroupName, builderName, updateBuilderEnvelope, context); - return this; - } - - BuilderResourceImpl(BuilderResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.builderName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builders"); - } - - public BuilderResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE) - .getValue(); - return this; - } - - public BuilderResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .getByResourceGroupWithResponse(resourceGroupName, builderName, context) - .getValue(); - return this; - } - - public BuilderResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BuilderResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BuilderResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBuilderEnvelope.withTags(tags); - return this; - } - } - - public BuilderResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateBuilderEnvelope.withIdentity(identity); - return this; - } - } - - public BuilderResourceImpl withEnvironmentId(String environmentId) { - if (isInCreateMode()) { - this.innerModel().withEnvironmentId(environmentId); - return this; - } else { - this.updateBuilderEnvelope.withEnvironmentId(environmentId); - return this; - } - } - - public BuilderResourceImpl withContainerRegistries(List containerRegistries) { - this.innerModel().withContainerRegistries(containerRegistries); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java deleted file mode 100644 index 573cee8d22d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java +++ /dev/null @@ -1,1282 +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.appcontainers.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.Patch; -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.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.appcontainers.fluent.BuildersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderCollection; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -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 BuildersClient. - */ -public final class BuildersClientImpl implements BuildersClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildersService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildersClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(BuildersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuilders to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/builders") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") 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/Microsoft.App/builders") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") 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/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @BodyParam("application/json") BuilderResourceInner builderEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @BodyParam("application/json") BuilderResourceUpdate builderEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") 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, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation 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.")); - } - final String accept = "application/json"; - return FluxUtil - .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 BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @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.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * List BuilderResource resources by 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 of a BuilderResource list operation 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.")); - } - final String accept = "application/json"; - return FluxUtil - .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 BuilderResource resources by 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 response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @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.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List BuilderResource resources by 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 of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List BuilderResource resources by 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 response of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * List BuilderResource resources by 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 of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List BuilderResource resources by 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 BuilderResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String builderName) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 BuilderResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String builderName, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 BuilderResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String builderName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, builderName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 BuilderResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, builderName, context).block(); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 BuilderResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName) { - return getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, this.client.getContext()); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 PollerFlux} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, context); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> - beginCreateOrUpdate(String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> beginCreateOrUpdate( - String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope) { - return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).block(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create 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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, builderEnvelope, accept, context); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> - beginUpdateAsync(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, this.client.getContext()); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> beginUpdateAsync( - String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, context); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope) { - return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope) { - return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner update(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope) { - return updateAsync(resourceGroupName, builderName, builderEnvelope).block(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @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 information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner update(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope, Context context) { - return updateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, accept, context); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName) { - return this.beginDeleteAsync(resourceGroupName, builderName).getSyncPoller(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, builderName, context).getSyncPoller(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName) { - return beginDeleteAsync(resourceGroupName, builderName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, Context context) { - return beginDeleteAsync(resourceGroupName, builderName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName) { - deleteAsync(resourceGroupName, builderName).block(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, Context context) { - deleteAsync(resourceGroupName, builderName, context).block(); - } - - /** - * 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 the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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. - * @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 of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> 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. - * @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 of a BuilderResource list operation 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.")); - } - final String accept = "application/json"; - 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. - * @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 of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java deleted file mode 100644 index afb724f88caf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java +++ /dev/null @@ -1,147 +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.appcontainers.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.appcontainers.fluent.BuildersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.Builders; - -public final class BuildersImpl implements Builders { - private static final ClientLogger LOGGER = new ClientLogger(BuildersImpl.class); - - private final BuildersClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildersImpl(BuildersClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, builderName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BuilderResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BuilderResource getByResourceGroup(String resourceGroupName, String builderName) { - BuilderResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, builderName); - if (inner != null) { - return new BuilderResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String builderName) { - this.serviceClient().delete(resourceGroupName, builderName); - } - - public void delete(String resourceGroupName, String builderName, Context context) { - this.serviceClient().delete(resourceGroupName, builderName, context); - } - - public BuilderResource 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, builderName, 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, builderName, 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - this.delete(resourceGroupName, builderName, 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - this.delete(resourceGroupName, builderName, context); - } - - private BuildersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public BuilderResourceImpl define(String name) { - return new BuilderResourceImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java deleted file mode 100644 index e5110840118b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java +++ /dev/null @@ -1,274 +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.appcontainers.implementation; - -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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BuildsByBuilderResourcesClient. - */ -public final class BuildsByBuilderResourcesClientImpl implements BuildsByBuilderResourcesClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildsByBuilderResourcesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildsByBuilderResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildsByBuilderResourcesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(BuildsByBuilderResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuildsByBuilderResources to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildsByBuilderResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @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, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String builderName) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, 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 BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String builderName, - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName 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(), this.client.getSubscriptionId(), - resourceGroupName, builderName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String builderName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, builderName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String builderName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, builderName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String builderName) { - return new PagedIterable<>(listAsync(resourceGroupName, builderName)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String builderName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, builderName, context)); - } - - /** - * 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 the response of a BuildResource list operation 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(), - 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. - * @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 of a BuildResource list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java deleted file mode 100644 index d1222c2dc55d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java +++ /dev/null @@ -1,45 +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.appcontainers.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildResource; -import com.azure.resourcemanager.appcontainers.models.BuildsByBuilderResources; - -public final class BuildsByBuilderResourcesImpl implements BuildsByBuilderResources { - private static final ClientLogger LOGGER = new ClientLogger(BuildsByBuilderResourcesImpl.class); - - private final BuildsByBuilderResourcesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildsByBuilderResourcesImpl(BuildsByBuilderResourcesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String builderName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, builderName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String builderName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, builderName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); - } - - private BuildsByBuilderResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java deleted file mode 100644 index c297118316ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java +++ /dev/null @@ -1,696 +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.appcontainers.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.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.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.appcontainers.fluent.BuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -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 BuildsClient. - */ -public final class BuildsClientImpl implements BuildsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(BuildsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuilds to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @PathParam("buildName") String buildName, @BodyParam("application/json") BuildResourceInner buildEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 BuildResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String builderName, - String buildName) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 BuildResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String builderName, - String buildName, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, buildName, accept, context); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 BuildResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String builderName, String buildName) { - return getWithResponseAsync(resourceGroupName, builderName, buildName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 BuildResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - return getWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 BuildResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildResourceInner get(String resourceGroupName, String builderName, String buildName) { - return getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - if (buildEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); - } else { - buildEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, buildEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - if (buildEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); - } else { - buildEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, buildEnvelope, accept, context); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuildResourceInner.class, BuildResourceInner.class, this.client.getContext()); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 PollerFlux} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuildResourceInner.class, BuildResourceInner.class, context); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 SyncPoller} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).getSyncPoller(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context) - .getSyncPoller(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope) { - return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).block(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or 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 information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).block(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, - String buildName) { - 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, - String buildName, 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 (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, buildName, accept, context); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, - String buildName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, buildName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, - String buildName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, builderName, buildName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, - String buildName) { - return this.beginDeleteAsync(resourceGroupName, builderName, buildName).getSyncPoller(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, - String buildName, Context context) { - return this.beginDeleteAsync(resourceGroupName, builderName, buildName, context).getSyncPoller(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName) { - return beginDeleteAsync(resourceGroupName, builderName, buildName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName, Context context) { - return beginDeleteAsync(resourceGroupName, builderName, buildName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName) { - deleteAsync(resourceGroupName, builderName, buildName).block(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName, Context context) { - deleteAsync(resourceGroupName, builderName, buildName, context).block(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java deleted file mode 100644 index 7f29012d629e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java +++ /dev/null @@ -1,145 +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.appcontainers.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.appcontainers.fluent.BuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildResource; -import com.azure.resourcemanager.appcontainers.models.Builds; - -public final class BuildsImpl implements Builds { - private static final ClientLogger LOGGER = new ClientLogger(BuildsImpl.class); - - private final BuildsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildsImpl(BuildsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, builderName, buildName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BuildResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BuildResource get(String resourceGroupName, String builderName, String buildName) { - BuildResourceInner inner = this.serviceClient().get(resourceGroupName, builderName, buildName); - if (inner != null) { - return new BuildResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String builderName, String buildName) { - this.serviceClient().delete(resourceGroupName, builderName, buildName); - } - - public void delete(String resourceGroupName, String builderName, String buildName, Context context) { - this.serviceClient().delete(resourceGroupName, builderName, buildName, context); - } - - public BuildResource 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - return this.getWithResponse(resourceGroupName, builderName, buildName, 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - return this.getWithResponse(resourceGroupName, builderName, buildName, 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - this.delete(resourceGroupName, builderName, buildName, 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - this.delete(resourceGroupName, builderName, buildName, context); - } - - private BuildsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public BuildResourceImpl define(String name) { - return new BuildResourceImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java index 9e35fe01415c..4964861891ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -90,7 +90,7 @@ Mono> get(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java index 72cf1b79d747..58cfbb8fb4c2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -90,7 +90,7 @@ Mono> get(@HostParam("$host") String endpoint, @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java index 313d8933511a..a838a1f86301 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -84,7 +84,7 @@ Mono> get(@HostParam("$host") String @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({ 200 }) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java index ef5e6d5f3bcd..6f3132e73dc4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java @@ -12,11 +12,10 @@ import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; -import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerAppRunningStatus; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.Kind; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.SecretsCollection; import com.azure.resourcemanager.appcontainers.models.Template; @@ -66,10 +65,6 @@ public String managedBy() { return this.innerModel().managedBy(); } - public Kind kind() { - return this.innerModel().kind(); - } - public SystemData systemData() { return this.innerModel().systemData(); } @@ -78,8 +73,8 @@ public ContainerAppProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public String deploymentErrors() { - return this.innerModel().deploymentErrors(); + public ContainerAppRunningStatus runningStatus() { + return this.innerModel().runningStatus(); } public String managedEnvironmentId() { @@ -94,10 +89,6 @@ public String workloadProfileName() { return this.innerModel().workloadProfileName(); } - public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { - return this.innerModel().patchingConfiguration(); - } - public String latestRevisionName() { return this.innerModel().latestRevisionName(); } @@ -298,11 +289,6 @@ public ContainerAppImpl withManagedBy(String managedBy) { return this; } - public ContainerAppImpl withKind(Kind kind) { - this.innerModel().withKind(kind); - return this; - } - public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { this.innerModel().withManagedEnvironmentId(managedEnvironmentId); return this; @@ -318,12 +304,6 @@ public ContainerAppImpl withWorkloadProfileName(String workloadProfileName) { return this; } - public ContainerAppImpl - withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { - this.innerModel().withPatchingConfiguration(patchingConfiguration); - return this; - } - public ContainerAppImpl withConfiguration(Configuration configuration) { this.innerModel().withConfiguration(configuration); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java index d2fa8d7fd0f7..29f39590b634 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java @@ -20,12 +20,12 @@ @ServiceClientBuilder(serviceClients = { ContainerAppsApiClientImpl.class }) public final class ContainerAppsApiClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * The ID of the target subscription. */ private String subscriptionId; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the ContainerAppsApiClientBuilder. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java index 761f220fb821..9657b953622e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java @@ -23,13 +23,8 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient; import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildAuthTokensClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; @@ -37,28 +32,18 @@ import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSessionPoolsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; -import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; -import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient; -import com.azure.resourcemanager.appcontainers.fluent.LogicAppsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateLinkResourcesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; @@ -82,12 +67,12 @@ @ServiceClient(builder = ContainerAppsApiClientBuilder.class) public final class ContainerAppsApiClientImpl implements ContainerAppsApiClient { /** - * The ID of the target subscription. The value must be an UUID. + * The ID of the target subscription. */ private final String subscriptionId; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -165,20 +150,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The AppResilienciesClient object to access its operations. - */ - private final AppResilienciesClient appResiliencies; - - /** - * Gets the AppResilienciesClient object to access its operations. - * - * @return the AppResilienciesClient object. - */ - public AppResilienciesClient getAppResiliencies() { - return this.appResiliencies; - } - /** * The ContainerAppsAuthConfigsClient object to access its operations. */ @@ -221,62 +192,6 @@ public BillingMetersClient getBillingMeters() { return this.billingMeters; } - /** - * The BuildersClient object to access its operations. - */ - private final BuildersClient builders; - - /** - * Gets the BuildersClient object to access its operations. - * - * @return the BuildersClient object. - */ - public BuildersClient getBuilders() { - return this.builders; - } - - /** - * The BuildsByBuilderResourcesClient object to access its operations. - */ - private final BuildsByBuilderResourcesClient buildsByBuilderResources; - - /** - * Gets the BuildsByBuilderResourcesClient object to access its operations. - * - * @return the BuildsByBuilderResourcesClient object. - */ - public BuildsByBuilderResourcesClient getBuildsByBuilderResources() { - return this.buildsByBuilderResources; - } - - /** - * The BuildsClient object to access its operations. - */ - private final BuildsClient builds; - - /** - * Gets the BuildsClient object to access its operations. - * - * @return the BuildsClient object. - */ - public BuildsClient getBuilds() { - return this.builds; - } - - /** - * The BuildAuthTokensClient object to access its operations. - */ - private final BuildAuthTokensClient buildAuthTokens; - - /** - * Gets the BuildAuthTokensClient object to access its operations. - * - * @return the BuildAuthTokensClient object. - */ - public BuildAuthTokensClient getBuildAuthTokens() { - return this.buildAuthTokens; - } - /** * The ConnectedEnvironmentsClient object to access its operations. */ @@ -347,48 +262,6 @@ public ContainerAppsClient getContainerApps() { return this.containerApps; } - /** - * The ContainerAppsBuildsByContainerAppsClient object to access its operations. - */ - private final ContainerAppsBuildsByContainerAppsClient containerAppsBuildsByContainerApps; - - /** - * Gets the ContainerAppsBuildsByContainerAppsClient object to access its operations. - * - * @return the ContainerAppsBuildsByContainerAppsClient object. - */ - public ContainerAppsBuildsByContainerAppsClient getContainerAppsBuildsByContainerApps() { - return this.containerAppsBuildsByContainerApps; - } - - /** - * The ContainerAppsBuildsClient object to access its operations. - */ - private final ContainerAppsBuildsClient containerAppsBuilds; - - /** - * Gets the ContainerAppsBuildsClient object to access its operations. - * - * @return the ContainerAppsBuildsClient object. - */ - public ContainerAppsBuildsClient getContainerAppsBuilds() { - return this.containerAppsBuilds; - } - - /** - * The ContainerAppsPatchesClient object to access its operations. - */ - private final ContainerAppsPatchesClient containerAppsPatches; - - /** - * Gets the ContainerAppsPatchesClient object to access its operations. - * - * @return the ContainerAppsPatchesClient object. - */ - public ContainerAppsPatchesClient getContainerAppsPatches() { - return this.containerAppsPatches; - } - /** * The ContainerAppsRevisionsClient object to access its operations. */ @@ -473,34 +346,6 @@ public JobsClient getJobs() { return this.jobs; } - /** - * The DotNetComponentsClient object to access its operations. - */ - private final DotNetComponentsClient dotNetComponents; - - /** - * Gets the DotNetComponentsClient object to access its operations. - * - * @return the DotNetComponentsClient object. - */ - public DotNetComponentsClient getDotNetComponents() { - return this.dotNetComponents; - } - - /** - * The FunctionsExtensionsClient object to access its operations. - */ - private final FunctionsExtensionsClient functionsExtensions; - - /** - * Gets the FunctionsExtensionsClient object to access its operations. - * - * @return the FunctionsExtensionsClient object. - */ - public FunctionsExtensionsClient getFunctionsExtensions() { - return this.functionsExtensions; - } - /** * The OperationsClient object to access its operations. */ @@ -557,20 +402,6 @@ public ResourceProvidersClient getResourceProviders() { return this.resourceProviders; } - /** - * The LogicAppsClient object to access its operations. - */ - private final LogicAppsClient logicApps; - - /** - * Gets the LogicAppsClient object to access its operations. - * - * @return the LogicAppsClient object. - */ - public LogicAppsClient getLogicApps() { - return this.logicApps; - } - /** * The ManagedEnvironmentsClient object to access its operations. */ @@ -627,48 +458,6 @@ public NamespacesClient getNamespaces() { return this.namespaces; } - /** - * The ManagedEnvironmentPrivateEndpointConnectionsClient object to access its operations. - */ - private final ManagedEnvironmentPrivateEndpointConnectionsClient managedEnvironmentPrivateEndpointConnections; - - /** - * Gets the ManagedEnvironmentPrivateEndpointConnectionsClient object to access its operations. - * - * @return the ManagedEnvironmentPrivateEndpointConnectionsClient object. - */ - public ManagedEnvironmentPrivateEndpointConnectionsClient getManagedEnvironmentPrivateEndpointConnections() { - return this.managedEnvironmentPrivateEndpointConnections; - } - - /** - * The ManagedEnvironmentPrivateLinkResourcesClient object to access its operations. - */ - private final ManagedEnvironmentPrivateLinkResourcesClient managedEnvironmentPrivateLinkResources; - - /** - * Gets the ManagedEnvironmentPrivateLinkResourcesClient object to access its operations. - * - * @return the ManagedEnvironmentPrivateLinkResourcesClient object. - */ - public ManagedEnvironmentPrivateLinkResourcesClient getManagedEnvironmentPrivateLinkResources() { - return this.managedEnvironmentPrivateLinkResources; - } - - /** - * The DaprComponentResiliencyPoliciesClient object to access its operations. - */ - private final DaprComponentResiliencyPoliciesClient daprComponentResiliencyPolicies; - - /** - * Gets the DaprComponentResiliencyPoliciesClient object to access its operations. - * - * @return the DaprComponentResiliencyPoliciesClient object. - */ - public DaprComponentResiliencyPoliciesClient getDaprComponentResiliencyPolicies() { - return this.daprComponentResiliencyPolicies; - } - /** * The DaprComponentsClient object to access its operations. */ @@ -683,20 +472,6 @@ public DaprComponentsClient getDaprComponents() { return this.daprComponents; } - /** - * The DaprSubscriptionsClient object to access its operations. - */ - private final DaprSubscriptionsClient daprSubscriptions; - - /** - * Gets the DaprSubscriptionsClient object to access its operations. - * - * @return the DaprSubscriptionsClient object. - */ - public DaprSubscriptionsClient getDaprSubscriptions() { - return this.daprSubscriptions; - } - /** * The ManagedEnvironmentsStoragesClient object to access its operations. */ @@ -774,7 +549,7 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { * @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 subscriptionId The ID of the target subscription. The value must be an UUID. + * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ ContainerAppsApiClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, @@ -784,46 +559,30 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-08-02-preview"; - this.appResiliencies = new AppResilienciesClientImpl(this); + this.apiVersion = "2025-01-01"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); this.billingMeters = new BillingMetersClientImpl(this); - this.builders = new BuildersClientImpl(this); - this.buildsByBuilderResources = new BuildsByBuilderResourcesClientImpl(this); - this.builds = new BuildsClientImpl(this); - this.buildAuthTokens = new BuildAuthTokensClientImpl(this); this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); this.containerApps = new ContainerAppsClientImpl(this); - this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsClientImpl(this); - this.containerAppsBuilds = new ContainerAppsBuildsClientImpl(this); - this.containerAppsPatches = new ContainerAppsPatchesClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); this.jobs = new JobsClientImpl(this); - this.dotNetComponents = new DotNetComponentsClientImpl(this); - this.functionsExtensions = new FunctionsExtensionsClientImpl(this); this.operations = new OperationsClientImpl(this); this.javaComponents = new JavaComponentsClientImpl(this); this.jobsExecutions = new JobsExecutionsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); - this.logicApps = new LogicAppsClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.managedCertificates = new ManagedCertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); - this.managedEnvironmentPrivateEndpointConnections - = new ManagedEnvironmentPrivateEndpointConnectionsClientImpl(this); - this.managedEnvironmentPrivateLinkResources = new ManagedEnvironmentPrivateLinkResourcesClientImpl(this); - this.daprComponentResiliencyPolicies = new DaprComponentResiliencyPoliciesClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); - this.daprSubscriptions = new DaprSubscriptionsClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); this.containerAppsSessionPools = new ContainerAppsSessionPoolsClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java deleted file mode 100644 index 0140fcd8e536..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java +++ /dev/null @@ -1,69 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; - -public final class ContainerAppsBuildResourceImpl implements ContainerAppsBuildResource { - private ContainerAppsBuildResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ContainerAppsBuildResourceImpl(ContainerAppsBuildResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 SystemData systemData() { - return this.innerModel().systemData(); - } - - public BuildProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public BuildStatus buildStatus() { - return this.innerModel().buildStatus(); - } - - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.innerModel().destinationContainerRegistry(); - } - - public ContainerAppsBuildConfiguration configuration() { - return this.innerModel().configuration(); - } - - public String logStreamEndpoint() { - return this.innerModel().logStreamEndpoint(); - } - - public ContainerAppsBuildResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java deleted file mode 100644 index cbdc525440ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java +++ /dev/null @@ -1,286 +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.appcontainers.implementation; - -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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsBuildsByContainerAppsClient. - */ -public final class ContainerAppsBuildsByContainerAppsClientImpl implements ContainerAppsBuildsByContainerAppsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsBuildsByContainerAppsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsBuildsByContainerAppsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsBuildsByContainerAppsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsBuildsByContainerAppsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsBuildsByContainerApps to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsBuildsByContainerAppsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @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, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String containerAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, 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 Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String containerAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName 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(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String containerAppName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listAsync(resourceGroupName, containerAppName)); - } - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String containerAppName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, containerAppName, context)); - } - - /** - * 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 the response of a Container Apps Build Resource list operation 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(), - 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. - * @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 of a Container Apps Build Resource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java deleted file mode 100644 index f5ff5268f874..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java +++ /dev/null @@ -1,50 +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.appcontainers.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; - -public final class ContainerAppsBuildsByContainerAppsImpl implements ContainerAppsBuildsByContainerApps { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildsByContainerAppsImpl.class); - - private final ContainerAppsBuildsByContainerAppsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsBuildsByContainerAppsImpl(ContainerAppsBuildsByContainerAppsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String containerAppName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, containerAppName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ContainerAppsBuildResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String containerAppName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, containerAppName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ContainerAppsBuildResourceImpl(inner1, this.manager())); - } - - private ContainerAppsBuildsByContainerAppsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java deleted file mode 100644 index 0a9b6a1c7932..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java +++ /dev/null @@ -1,441 +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.appcontainers.implementation; - -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.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.management.polling.PollResult; -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.appcontainers.fluent.ContainerAppsBuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -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 ContainerAppsBuildsClient. - */ -public final class ContainerAppsBuildsClientImpl implements ContainerAppsBuildsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsBuildsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsBuildsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsBuildsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsBuildsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsBuilds to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsBuildsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("buildName") String buildName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("buildName") String buildName, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 Container Apps Build resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String containerAppName, String buildName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 Container Apps Build resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String containerAppName, String buildName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, buildName, accept, context); - } - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 Container Apps Build resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, - String buildName) { - return getWithResponseAsync(resourceGroupName, containerAppName, buildName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 Container Apps Build resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String containerAppName, - String buildName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, buildName, context).block(); - } - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 Container Apps Build resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppsBuildResourceInner get(String resourceGroupName, String containerAppName, String buildName) { - return getWithResponse(resourceGroupName, containerAppName, buildName, Context.NONE).getValue(); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, - String buildName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, - String buildName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, buildName, accept, context); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, - String buildName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, buildName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, - String buildName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, containerAppName, buildName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, - String buildName) { - return this.beginDeleteAsync(resourceGroupName, containerAppName, buildName).getSyncPoller(); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, - String buildName, Context context) { - return this.beginDeleteAsync(resourceGroupName, containerAppName, buildName, context).getSyncPoller(); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName) { - return beginDeleteAsync(resourceGroupName, containerAppName, buildName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName, - Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, buildName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName) { - deleteAsync(resourceGroupName, containerAppName, buildName).block(); - } - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName, Context context) { - deleteAsync(resourceGroupName, containerAppName, buildName, context).block(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java deleted file mode 100644 index 2e9fdac76510..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java +++ /dev/null @@ -1,66 +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.appcontainers.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.appcontainers.fluent.ContainerAppsBuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; - -public final class ContainerAppsBuildsImpl implements ContainerAppsBuilds { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildsImpl.class); - - private final ContainerAppsBuildsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsBuildsImpl(ContainerAppsBuildsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String containerAppName, - String buildName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, buildName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContainerAppsBuildResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerAppsBuildResource get(String resourceGroupName, String containerAppName, String buildName) { - ContainerAppsBuildResourceInner inner - = this.serviceClient().get(resourceGroupName, containerAppName, buildName); - if (inner != null) { - return new ContainerAppsBuildResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String containerAppName, String buildName) { - this.serviceClient().delete(resourceGroupName, containerAppName, buildName); - } - - public void delete(String resourceGroupName, String containerAppName, String buildName, Context context) { - this.serviceClient().delete(resourceGroupName, containerAppName, buildName, context); - } - - private ContainerAppsBuildsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java deleted file mode 100644 index da5d66fd22e1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java +++ /dev/null @@ -1,50 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import com.azure.resourcemanager.appcontainers.models.PatchProperties; - -public final class ContainerAppsPatchResourceImpl implements ContainerAppsPatchResource { - private ContainerAppsPatchResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ContainerAppsPatchResourceImpl(ContainerAppsPatchResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 PatchProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ContainerAppsPatchResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java deleted file mode 100644 index 3116fd1df17a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java +++ /dev/null @@ -1,1202 +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.appcontainers.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.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.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.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.appcontainers.fluent.ContainerAppsPatchesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import com.azure.resourcemanager.appcontainers.models.PatchCollection; -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; -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 ContainerAppsPatchesClient. - */ -public final class ContainerAppsPatchesClientImpl implements ContainerAppsPatchesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsPatchesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsPatchesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsPatchesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsPatchesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsPatches to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsPatchesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByContainerApp(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/skipConfig") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> skipConfigure(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, - @BodyParam("application/json") PatchSkipConfig patchSkipConfig, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> apply(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByContainerAppSinglePageAsync(String resourceGroupName, String containerAppName, String filter) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByContainerApp(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, filter, 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 Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName, String filter, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByContainerApp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, - String containerAppName, String filter) { - return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); - } - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @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 container App patch collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, - String containerAppName) { - final String filter = null; - return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); - } - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, - String containerAppName, String filter, Context context) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter, context), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); - } - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @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 container App patch collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, - String containerAppName) { - final String filter = null; - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, filter)); - } - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, - String containerAppName, String filter, Context context) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, filter, context)); - } - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String containerAppName, String patchName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String containerAppName, String patchName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, patchName, accept, context); - } - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, - String patchName) { - return getWithResponseAsync(resourceGroupName, containerAppName, patchName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String containerAppName, - String patchName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, patchName, context).block(); - } - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppsPatchResourceInner get(String resourceGroupName, String containerAppName, String patchName) { - return getWithResponse(resourceGroupName, containerAppName, patchName, Context.NONE).getValue(); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, - String patchName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, - String patchName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, patchName, accept, context); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, - String patchName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, patchName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, - String patchName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, containerAppName, patchName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, - String patchName) { - return this.beginDeleteAsync(resourceGroupName, containerAppName, patchName).getSyncPoller(); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, - String patchName, Context context) { - return this.beginDeleteAsync(resourceGroupName, containerAppName, patchName, context).getSyncPoller(); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName) { - return beginDeleteAsync(resourceGroupName, containerAppName, patchName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName, - Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, patchName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName) { - deleteAsync(resourceGroupName, containerAppName, patchName).block(); - } - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName, Context context) { - deleteAsync(resourceGroupName, containerAppName, patchName, context).block(); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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>> skipConfigureWithResponseAsync(String resourceGroupName, - String containerAppName, String patchName, PatchSkipConfig patchSkipConfig) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - if (patchSkipConfig == null) { - return Mono - .error(new IllegalArgumentException("Parameter patchSkipConfig is required and cannot be null.")); - } else { - patchSkipConfig.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.skipConfigure(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, patchSkipConfig, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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>> skipConfigureWithResponseAsync(String resourceGroupName, - String containerAppName, String patchName, PatchSkipConfig patchSkipConfig, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - if (patchSkipConfig == null) { - return Mono - .error(new IllegalArgumentException("Parameter patchSkipConfig is required and cannot be null.")); - } else { - patchSkipConfig.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.skipConfigure(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, patchSkipConfig, accept, - context); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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> beginSkipConfigureAsync(String resourceGroupName, - String containerAppName, String patchName, PatchSkipConfig patchSkipConfig) { - Mono>> mono - = skipConfigureWithResponseAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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> beginSkipConfigureAsync(String resourceGroupName, - String containerAppName, String patchName, PatchSkipConfig patchSkipConfig, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = skipConfigureWithResponseAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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> beginSkipConfigure(String resourceGroupName, String containerAppName, - String patchName, PatchSkipConfig patchSkipConfig) { - return this.beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig) - .getSyncPoller(); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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> beginSkipConfigure(String resourceGroupName, String containerAppName, - String patchName, PatchSkipConfig patchSkipConfig, Context context) { - return this.beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context) - .getSyncPoller(); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigureAsync(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig) { - return beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigureAsync(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig, Context context) { - return beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig) { - skipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig).block(); - } - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig, Context context) { - skipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context).block(); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> applyWithResponseAsync(String resourceGroupName, String containerAppName, - String patchName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.apply(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> applyWithResponseAsync(String resourceGroupName, String containerAppName, - String patchName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (patchName == null) { - return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.apply(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, patchName, accept, context); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppsPatchResourceInner> - beginApplyAsync(String resourceGroupName, String containerAppName, String patchName) { - Mono>> mono = applyWithResponseAsync(resourceGroupName, containerAppName, patchName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ContainerAppsPatchResourceInner.class, ContainerAppsPatchResourceInner.class, - this.client.getContext()); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppsPatchResourceInner> - beginApplyAsync(String resourceGroupName, String containerAppName, String patchName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = applyWithResponseAsync(resourceGroupName, containerAppName, patchName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ContainerAppsPatchResourceInner.class, ContainerAppsPatchResourceInner.class, - context); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppsPatchResourceInner> - beginApply(String resourceGroupName, String containerAppName, String patchName) { - return this.beginApplyAsync(resourceGroupName, containerAppName, patchName).getSyncPoller(); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppsPatchResourceInner> - beginApply(String resourceGroupName, String containerAppName, String patchName, Context context) { - return this.beginApplyAsync(resourceGroupName, containerAppName, patchName, context).getSyncPoller(); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono applyAsync(String resourceGroupName, String containerAppName, - String patchName) { - return beginApplyAsync(resourceGroupName, containerAppName, patchName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono applyAsync(String resourceGroupName, String containerAppName, - String patchName, Context context) { - return beginApplyAsync(resourceGroupName, containerAppName, patchName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName) { - return applyAsync(resourceGroupName, containerAppName, patchName).block(); - } - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName, - Context context) { - return applyAsync(resourceGroupName, containerAppName, patchName, context).block(); - } - - /** - * 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 container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByContainerAppNextSinglePageAsync(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.listByContainerAppNext(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. - * @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 container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync(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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java deleted file mode 100644 index 42c28f166299..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java +++ /dev/null @@ -1,115 +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.appcontainers.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.appcontainers.fluent.ContainerAppsPatchesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; - -public final class ContainerAppsPatchesImpl implements ContainerAppsPatches { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsPatchesImpl.class); - - private final ContainerAppsPatchesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsPatchesImpl(ContainerAppsPatchesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByContainerApp(String resourceGroupName, - String containerAppName) { - PagedIterable inner - = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ContainerAppsPatchResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByContainerApp(String resourceGroupName, - String containerAppName, String filter, Context context) { - PagedIterable inner - = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, filter, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new ContainerAppsPatchResourceImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String containerAppName, - String patchName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, patchName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContainerAppsPatchResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerAppsPatchResource get(String resourceGroupName, String containerAppName, String patchName) { - ContainerAppsPatchResourceInner inner - = this.serviceClient().get(resourceGroupName, containerAppName, patchName); - if (inner != null) { - return new ContainerAppsPatchResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String containerAppName, String patchName) { - this.serviceClient().delete(resourceGroupName, containerAppName, patchName); - } - - public void delete(String resourceGroupName, String containerAppName, String patchName, Context context) { - this.serviceClient().delete(resourceGroupName, containerAppName, patchName, context); - } - - public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig) { - this.serviceClient().skipConfigure(resourceGroupName, containerAppName, patchName, patchSkipConfig); - } - - public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig, Context context) { - this.serviceClient().skipConfigure(resourceGroupName, containerAppName, patchName, patchSkipConfig, context); - } - - public ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName) { - ContainerAppsPatchResourceInner inner - = this.serviceClient().apply(resourceGroupName, containerAppName, patchName); - if (inner != null) { - return new ContainerAppsPatchResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName, - Context context) { - ContainerAppsPatchResourceInner inner - = this.serviceClient().apply(resourceGroupName, containerAppName, patchName, context); - if (inner != null) { - return new ContainerAppsPatchResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - private ContainerAppsPatchesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java index a893741af21d..d3602c2f77aa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java @@ -99,9 +99,7 @@ Mono>> createOrUpdate(@HostParam("$host") String endpo @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @HeaderParam("x-ms-github-auxiliary") String xMsGithubAuxiliary, - @QueryParam("api-version") String apiVersion, + @PathParam("sourceControlName") String sourceControlName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SourceControlInner sourceControlEnvelope, @HeaderParam("Accept") String accept, Context context); @@ -113,10 +111,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @HeaderParam("x-ms-github-auxiliary") String xMsGithubAuxiliary, - @QueryParam("ignoreWorkflowDeletionFailure") Boolean ignoreWorkflowDeletionFailure, - @QueryParam("deleteWorkflow") Boolean deleteWorkflow, @QueryParam("api-version") String apiVersion, + @PathParam("sourceControlName") String sourceControlName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -417,7 +412,6 @@ public SourceControlInner get(String resourceGroupName, String containerAppName, * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -425,8 +419,7 @@ public SourceControlInner get(String resourceGroupName, String containerAppName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary) { + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -456,7 +449,7 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, this.client.getApiVersion(), + resourceGroupName, containerAppName, sourceControlName, this.client.getApiVersion(), sourceControlEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -468,7 +461,6 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -477,8 +469,7 @@ private Mono>> createOrUpdateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary, Context context) { + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -508,31 +499,7 @@ private Mono>> createOrUpdateWithResponseAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, sourceControlName, xMsGithubAuxiliary, this.client.getApiVersion(), sourceControlEnvelope, - accept, context); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 container App SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, sourceControlEnvelope, xMsGithubAuxiliary); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SourceControlInner.class, SourceControlInner.class, this.client.getContext()); + containerAppName, sourceControlName, this.client.getApiVersion(), sourceControlEnvelope, accept, context); } /** @@ -551,9 +518,8 @@ private PollerFlux, SourceControlInner> beginCrea private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, sourceControlEnvelope, xMsGithubAuxiliary); + sourceControlName, sourceControlEnvelope); return this.client.getLroResult(mono, this.client.getHttpPipeline(), SourceControlInner.class, SourceControlInner.class, this.client.getContext()); } @@ -565,7 +531,6 @@ private PollerFlux, SourceControlInner> beginCrea * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -575,10 +540,10 @@ private PollerFlux, SourceControlInner> beginCrea @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, Context context) { + SourceControlInner sourceControlEnvelope, Context context) { context = this.client.mergeContext(context); Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, sourceControlEnvelope, xMsGithubAuxiliary, context); + sourceControlName, sourceControlEnvelope, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), SourceControlInner.class, SourceControlInner.class, context); } @@ -598,10 +563,8 @@ private PollerFlux, SourceControlInner> beginCrea @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; return this - .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary) + .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) .getSyncPoller(); } @@ -612,7 +575,6 @@ public SyncPoller, SourceControlInner> beginCreat * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -621,34 +583,13 @@ public SyncPoller, SourceControlInner> beginCreat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary, Context context) { + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary, context) + context) .getSyncPoller(); } - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App SourceControl on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary).last().flatMap(this.client::getLroFinalResultOrError); - } - /** * Create or update the SourceControl for a Container App. * @@ -664,9 +605,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary).last().flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -676,7 +617,6 @@ private Mono createOrUpdateAsync(String resourceGroupName, S * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -685,10 +625,9 @@ private Mono createOrUpdateAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, - Context context) { + String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary, context).last().flatMap(this.client::getLroFinalResultOrError); + context).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -706,9 +645,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; - return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary).block(); + return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) + .block(); } /** @@ -718,7 +656,6 @@ public SourceControlInner createOrUpdate(String resourceGroupName, String contai * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -727,10 +664,9 @@ public SourceControlInner createOrUpdate(String resourceGroupName, String contai */ @ServiceMethod(returns = ReturnType.SINGLE) public SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, - Context context) { + String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary, context).block(); + context).block(); } /** @@ -739,9 +675,6 @@ public SourceControlInner createOrUpdate(String resourceGroupName, String contai * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -749,8 +682,7 @@ public SourceControlInner createOrUpdate(String resourceGroupName, String contai */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow) { + String sourceControlName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -774,8 +706,7 @@ private Mono>> deleteWithResponseAsync(String resource final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, this.client.getApiVersion(), accept, context)) + resourceGroupName, containerAppName, sourceControlName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -785,9 +716,6 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -796,8 +724,7 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context) { + String sourceControlName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -821,32 +748,7 @@ private Mono>> deleteWithResponseAsync(String resource final String accept = "application/json"; context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow, - this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + containerAppName, sourceControlName, this.client.getApiVersion(), accept, context); } /** @@ -863,11 +765,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -878,9 +777,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -889,11 +785,10 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context) { + String sourceControlName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -912,13 +807,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - return this - .beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow) - .getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).getSyncPoller(); } /** @@ -927,9 +816,6 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -938,33 +824,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context) { - return this - .beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context) - .getSyncPoller(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow).last().flatMap(this.client::getLroFinalResultOrError); + String sourceControlName, Context context) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).getSyncPoller(); } /** @@ -980,11 +841,8 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String containerAppName, String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow).last().flatMap(this.client::getLroFinalResultOrError); + return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -993,9 +851,6 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1004,10 +859,9 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context).last() - .flatMap(this.client::getLroFinalResultOrError); + Context context) { + return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1022,11 +876,7 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String containerAppName, String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - deleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow).block(); + deleteAsync(resourceGroupName, containerAppName, sourceControlName).block(); } /** @@ -1035,19 +885,14 @@ public void delete(String resourceGroupName, String containerAppName, String sou * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context) { - deleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context).block(); + public void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + deleteAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java index cae13bfce167..4f33cd3ab477 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java @@ -65,11 +65,8 @@ public void delete(String resourceGroupName, String containerAppName, String sou this.serviceClient().delete(resourceGroupName, containerAppName, sourceControlName); } - public void delete(String resourceGroupName, String containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context) { - this.serviceClient() - .delete(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context); + public void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + this.serviceClient().delete(resourceGroupName, containerAppName, sourceControlName, context); } public SourceControl getById(String id) { @@ -126,15 +123,10 @@ public void deleteById(String id) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); } - String localXMsGithubAuxiliary = null; - Boolean localIgnoreWorkflowDeletionFailure = null; - Boolean localDeleteWorkflow = null; - this.delete(resourceGroupName, containerAppName, sourceControlName, localXMsGithubAuxiliary, - localIgnoreWorkflowDeletionFailure, localDeleteWorkflow, Context.NONE); + this.delete(resourceGroupName, containerAppName, sourceControlName, Context.NONE); } - public void deleteByIdWithResponse(String id, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context) { + public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( @@ -150,8 +142,7 @@ public void deleteByIdWithResponse(String id, String xMsGithubAuxiliary, Boolean throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); } - this.delete(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context); + this.delete(resourceGroupName, containerAppName, sourceControlName, context); } private ContainerAppsSourceControlsClient serviceClient() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java index 011522485f37..38c2e00d71ad 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java @@ -9,7 +9,6 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; import com.azure.resourcemanager.appcontainers.models.Secret; @@ -84,15 +83,6 @@ public List scopes() { } } - public List serviceComponentBind() { - List inner = this.innerModel().serviceComponentBind(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - public String resourceGroupName() { return resourceGroupName; } @@ -239,9 +229,4 @@ public DaprComponentImpl withScopes(List scopes) { this.innerModel().withScopes(scopes); return this; } - - public DaprComponentImpl withServiceComponentBind(List serviceComponentBind) { - this.innerModel().withServiceComponentBind(serviceComponentBind); - return this; - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java deleted file mode 100644 index 24a68f487a40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java +++ /dev/null @@ -1,808 +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.appcontainers.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DaprComponentResiliencyPoliciesClient. - */ -public final class DaprComponentResiliencyPoliciesClientImpl implements DaprComponentResiliencyPoliciesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DaprComponentResiliencyPoliciesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DaprComponentResiliencyPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DaprComponentResiliencyPoliciesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(DaprComponentResiliencyPoliciesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDaprComponentResiliencyPolicies to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DaprComponentResiliencyPoliciesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, String componentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, 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())); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, String componentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, environmentName, - componentName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - String componentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, componentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - String componentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, componentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, componentName)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, componentName, context)); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - environmentName, componentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, - String componentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String environmentName, String componentName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, name, context).block(); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentResiliencyPolicyInner get(String resourceGroupName, String environmentName, - String componentName, String name) { - return getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprComponentResiliencyPolicyEnvelope == null) { - return Mono.error(new IllegalArgumentException( - "Parameter daprComponentResiliencyPolicyEnvelope is required and cannot be null.")); - } else { - daprComponentResiliencyPolicyEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), - daprComponentResiliencyPolicyEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprComponentResiliencyPolicyEnvelope == null) { - return Mono.error(new IllegalArgumentException( - "Parameter daprComponentResiliencyPolicyEnvelope is required and cannot be null.")); - } else { - daprComponentResiliencyPolicyEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, componentName, name, this.client.getApiVersion(), daprComponentResiliencyPolicyEnvelope, - accept, context); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, name, - daprComponentResiliencyPolicyEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, name, - daprComponentResiliencyPolicyEnvelope, context).block(); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentResiliencyPolicyInner createOrUpdate(String resourceGroupName, String environmentName, - String componentName, String name, DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, - daprComponentResiliencyPolicyEnvelope, Context.NONE).getValue(); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, - String componentName, String name) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, - String componentName, String name, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - environmentName, componentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName, - String name) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, name) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, name, context).block(); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String componentName, String name) { - deleteWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE); - } - - /** - * 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policies ARM resource 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(), - 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policies ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java deleted file mode 100644 index 112e635dd578..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java +++ /dev/null @@ -1,186 +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.appcontainers.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.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicies; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; - -public final class DaprComponentResiliencyPoliciesImpl implements DaprComponentResiliencyPolicies { - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentResiliencyPoliciesImpl.class); - - private final DaprComponentResiliencyPoliciesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DaprComponentResiliencyPoliciesImpl(DaprComponentResiliencyPoliciesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, componentName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new DaprComponentResiliencyPolicyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, componentName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new DaprComponentResiliencyPolicyImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, String name, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprComponentResiliencyPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponentResiliencyPolicy get(String resourceGroupName, String environmentName, String componentName, - String name) { - DaprComponentResiliencyPolicyInner inner - = this.serviceClient().get(resourceGroupName, environmentName, componentName, name); - if (inner != null) { - return new DaprComponentResiliencyPolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, environmentName, componentName, name, context); - } - - public void delete(String resourceGroupName, String environmentName, String componentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, componentName, name); - } - - public DaprComponentResiliencyPolicy 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE); - } - - public Response 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, componentName, name, context); - } - - private DaprComponentResiliencyPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DaprComponentResiliencyPolicyImpl define(String name) { - return new DaprComponentResiliencyPolicyImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java deleted file mode 100644 index 0e62331b7cff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java +++ /dev/null @@ -1,155 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; - -public final class DaprComponentResiliencyPolicyImpl implements DaprComponentResiliencyPolicy, - DaprComponentResiliencyPolicy.Definition, DaprComponentResiliencyPolicy.Update { - private DaprComponentResiliencyPolicyInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { - return this.innerModel().inboundPolicy(); - } - - public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { - return this.innerModel().outboundPolicy(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DaprComponentResiliencyPolicyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String componentName; - - private String name; - - public DaprComponentResiliencyPolicyImpl withExistingDaprComponent(String resourceGroupName, String environmentName, - String componentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - this.componentName = componentName; - return this; - } - - public DaprComponentResiliencyPolicy create() { - this.innerObject = serviceManager.serviceClient() - .getDaprComponentResiliencyPolicies() - .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public DaprComponentResiliencyPolicy create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDaprComponentResiliencyPolicies() - .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), - context) - .getValue(); - return this; - } - - DaprComponentResiliencyPolicyImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DaprComponentResiliencyPolicyInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DaprComponentResiliencyPolicyImpl update() { - return this; - } - - public DaprComponentResiliencyPolicy apply() { - this.innerObject = serviceManager.serviceClient() - .getDaprComponentResiliencyPolicies() - .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public DaprComponentResiliencyPolicy apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDaprComponentResiliencyPolicies() - .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), - context) - .getValue(); - return this; - } - - DaprComponentResiliencyPolicyImpl(DaprComponentResiliencyPolicyInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resiliencyPolicies"); - } - - public DaprComponentResiliencyPolicy refresh() { - this.innerObject = serviceManager.serviceClient() - .getDaprComponentResiliencyPolicies() - .getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE) - .getValue(); - return this; - } - - public DaprComponentResiliencyPolicy refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDaprComponentResiliencyPolicies() - .getWithResponse(resourceGroupName, environmentName, componentName, name, context) - .getValue(); - return this; - } - - public DaprComponentResiliencyPolicyImpl - withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { - this.innerModel().withInboundPolicy(inboundPolicy); - return this; - } - - public DaprComponentResiliencyPolicyImpl - withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { - this.innerModel().withOutboundPolicy(outboundPolicy); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java deleted file mode 100644 index daee523a614a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java +++ /dev/null @@ -1,202 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class DaprSubscriptionImpl - implements DaprSubscription, DaprSubscription.Definition, DaprSubscription.Update { - private DaprSubscriptionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String pubsubName() { - return this.innerModel().pubsubName(); - } - - public String topic() { - return this.innerModel().topic(); - } - - public String deadLetterTopic() { - return this.innerModel().deadLetterTopic(); - } - - public DaprSubscriptionRoutes routes() { - return this.innerModel().routes(); - } - - public List scopes() { - List inner = this.innerModel().scopes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Map metadata() { - Map inner = this.innerModel().metadata(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { - return this.innerModel().bulkSubscribe(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DaprSubscriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String name; - - public DaprSubscriptionImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public DaprSubscription create() { - this.innerObject = serviceManager.serviceClient() - .getDaprSubscriptions() - .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DaprSubscription create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDaprSubscriptions() - .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DaprSubscriptionImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DaprSubscriptionInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DaprSubscriptionImpl update() { - return this; - } - - public DaprSubscription apply() { - this.innerObject = serviceManager.serviceClient() - .getDaprSubscriptions() - .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DaprSubscription apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDaprSubscriptions() - .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DaprSubscriptionImpl(DaprSubscriptionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprSubscriptions"); - } - - public DaprSubscription refresh() { - this.innerObject = serviceManager.serviceClient() - .getDaprSubscriptions() - .getWithResponse(resourceGroupName, environmentName, name, Context.NONE) - .getValue(); - return this; - } - - public DaprSubscription refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDaprSubscriptions() - .getWithResponse(resourceGroupName, environmentName, name, context) - .getValue(); - return this; - } - - public DaprSubscriptionImpl withPubsubName(String pubsubName) { - this.innerModel().withPubsubName(pubsubName); - return this; - } - - public DaprSubscriptionImpl withTopic(String topic) { - this.innerModel().withTopic(topic); - return this; - } - - public DaprSubscriptionImpl withDeadLetterTopic(String deadLetterTopic) { - this.innerModel().withDeadLetterTopic(deadLetterTopic); - return this; - } - - public DaprSubscriptionImpl withRoutes(DaprSubscriptionRoutes routes) { - this.innerModel().withRoutes(routes); - return this; - } - - public DaprSubscriptionImpl withScopes(List scopes) { - this.innerModel().withScopes(scopes); - return this; - } - - public DaprSubscriptionImpl withMetadata(Map metadata) { - this.innerModel().withMetadata(metadata); - return this; - } - - public DaprSubscriptionImpl withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { - this.innerModel().withBulkSubscribe(bulkSubscribe); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java deleted file mode 100644 index 9971195dff6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java +++ /dev/null @@ -1,749 +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.appcontainers.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in DaprSubscriptionsClient. - */ -public final class DaprSubscriptionsClientImpl implements DaprSubscriptionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DaprSubscriptionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DaprSubscriptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DaprSubscriptionsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(DaprSubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDaprSubscriptions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DaprSubscriptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprSubscriptionInner daprSubscriptionEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, 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())); - } - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - environmentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSubscriptionInner get(String resourceGroupName, String environmentName, String name) { - return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DaprSubscriptionInner daprSubscriptionEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprSubscriptionEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter daprSubscriptionEnvelope is required and cannot be null.")); - } else { - daprSubscriptionEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), daprSubscriptionEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DaprSubscriptionInner daprSubscriptionEnvelope, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprSubscriptionEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter daprSubscriptionEnvelope is required and cannot be null.")); - } else { - daprSubscriptionEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), daprSubscriptionEnvelope, accept, context); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String name, DaprSubscriptionInner daprSubscriptionEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, daprSubscriptionEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, daprSubscriptionEnvelope, - context).block(); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr PubSub Event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSubscriptionInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DaprSubscriptionInner daprSubscriptionEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, environmentName, name, daprSubscriptionEnvelope, - Context.NONE).getValue(); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, - String name) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String name, - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - environmentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String name) { - return deleteWithResponseAsync(resourceGroupName, environmentName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 environmentName, String name) { - deleteWithResponse(resourceGroupName, environmentName, name, Context.NONE); - } - - /** - * 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Subscriptions ARM resource 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(), - 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Subscriptions ARM resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java deleted file mode 100644 index 168ba34fb53d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java +++ /dev/null @@ -1,158 +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.appcontainers.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.appcontainers.fluent.DaprSubscriptionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; - -public final class DaprSubscriptionsImpl implements DaprSubscriptions { - private static final ClientLogger LOGGER = new ClientLogger(DaprSubscriptionsImpl.class); - - private final DaprSubscriptionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DaprSubscriptionsImpl(DaprSubscriptionsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprSubscriptionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprSubscriptionImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprSubscription get(String resourceGroupName, String environmentName, String name) { - DaprSubscriptionInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); - if (inner != null) { - return new DaprSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, name, context); - } - - public void delete(String resourceGroupName, String environmentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, name); - } - - public DaprSubscription 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, name, Context.NONE); - } - - public Response 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, name, context); - } - - private DaprSubscriptionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DaprSubscriptionImpl define(String name) { - return new DaprSubscriptionImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java deleted file mode 100644 index f6049ff1496b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java +++ /dev/null @@ -1,166 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Collections; -import java.util.List; - -public final class DotNetComponentImpl implements DotNetComponent, DotNetComponent.Definition, DotNetComponent.Update { - private DotNetComponentInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public DotNetComponentType componentType() { - return this.innerModel().componentType(); - } - - public DotNetComponentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List configurations() { - List inner = this.innerModel().configurations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List serviceBinds() { - List inner = this.innerModel().serviceBinds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DotNetComponentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String name; - - public DotNetComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public DotNetComponent create() { - this.innerObject = serviceManager.serviceClient() - .getDotNetComponents() - .createOrUpdate(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE); - return this; - } - - public DotNetComponent create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDotNetComponents() - .createOrUpdate(resourceGroupName, environmentName, name, this.innerModel(), context); - return this; - } - - DotNetComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DotNetComponentInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DotNetComponentImpl update() { - return this; - } - - public DotNetComponent apply() { - this.innerObject = serviceManager.serviceClient() - .getDotNetComponents() - .update(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE); - return this; - } - - public DotNetComponent apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDotNetComponents() - .update(resourceGroupName, environmentName, name, this.innerModel(), context); - return this; - } - - DotNetComponentImpl(DotNetComponentInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dotNetComponents"); - } - - public DotNetComponent refresh() { - this.innerObject = serviceManager.serviceClient() - .getDotNetComponents() - .getWithResponse(resourceGroupName, environmentName, name, Context.NONE) - .getValue(); - return this; - } - - public DotNetComponent refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getDotNetComponents() - .getWithResponse(resourceGroupName, environmentName, name, context) - .getValue(); - return this; - } - - public DotNetComponentImpl withComponentType(DotNetComponentType componentType) { - this.innerModel().withComponentType(componentType); - return this; - } - - public DotNetComponentImpl withConfigurations(List configurations) { - this.innerModel().withConfigurations(configurations); - return this; - } - - public DotNetComponentImpl withServiceBinds(List serviceBinds) { - this.innerModel().withServiceBinds(serviceBinds); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java deleted file mode 100644 index 4b764f94ed6c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java +++ /dev/null @@ -1,1235 +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.appcontainers.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.Patch; -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.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.appcontainers.fluent.DotNetComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; -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 DotNetComponentsClient. - */ -public final class DotNetComponentsClientImpl implements DotNetComponentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DotNetComponentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DotNetComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DotNetComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(DotNetComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDotNetComponents to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DotNetComponentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DotNetComponentInner dotNetComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DotNetComponentInner dotNetComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, @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, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, 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())); - } - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - environmentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 .NET Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner get(String resourceGroupName, String environmentName, String name) { - return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, this.client.getContext()); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - name, dotNetComponentEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, context); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope) - .getSyncPoller(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).block(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).block(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, this.client.getContext()); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, context); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - return this.beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).getSyncPoller(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) - .getSyncPoller(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope) { - return updateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).block(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context) { - return updateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).block(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, - String name) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, - String name, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - environmentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, environmentName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, - String name) { - return this.beginDeleteAsync(resourceGroupName, environmentName, name).getSyncPoller(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, environmentName, name, context).getSyncPoller(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name) { - return beginDeleteAsync(resourceGroupName, environmentName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name) { - deleteAsync(resourceGroupName, environmentName, name).block(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name, Context context) { - deleteAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * 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 .NET Components ARM resource 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(), - 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. - * @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 .NET Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java deleted file mode 100644 index 82351e9b232f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java +++ /dev/null @@ -1,157 +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.appcontainers.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.appcontainers.fluent.DotNetComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponents; - -public final class DotNetComponentsImpl implements DotNetComponents { - private static final ClientLogger LOGGER = new ClientLogger(DotNetComponentsImpl.class); - - private final DotNetComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DotNetComponentsImpl(DotNetComponentsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DotNetComponentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DotNetComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DotNetComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DotNetComponent get(String resourceGroupName, String environmentName, String name) { - DotNetComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); - if (inner != null) { - return new DotNetComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String environmentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, name); - } - - public void delete(String resourceGroupName, String environmentName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, environmentName, name, context); - } - - public DotNetComponent 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - this.delete(resourceGroupName, environmentName, name, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - this.delete(resourceGroupName, environmentName, name, context); - } - - private DotNetComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DotNetComponentImpl define(String name) { - return new DotNetComponentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java deleted file mode 100644 index 5843c01b5c77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java +++ /dev/null @@ -1,220 +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.appcontainers.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. - */ -public final class FunctionsExtensionsClientImpl implements FunctionsExtensionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final FunctionsExtensionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of FunctionsExtensionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - FunctionsExtensionsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(FunctionsExtensionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientFunctionsExtensions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface FunctionsExtensionsService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> invokeFunctionsHost(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @PathParam("functionAppName") String functionAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> invokeFunctionsHostWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName, String functionAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - if (functionAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.invokeFunctionsHost(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, revisionName, functionAppName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> invokeFunctionsHostWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName, String functionAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (revisionName == null) { - return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); - } - if (functionAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.invokeFunctionsHost(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, functionAppName, this.client.getApiVersion(), accept, - context); - } - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 invokeFunctionsHostAsync(String resourceGroupName, String containerAppName, - String revisionName, String functionAppName) { - return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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) - public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String functionAppName, Context context) { - return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName, - context).block(); - } - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, - String functionAppName) { - return invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, functionAppName, - Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java deleted file mode 100644 index 8db782ad9313..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java +++ /dev/null @@ -1,46 +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.appcontainers.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; -import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; - -public final class FunctionsExtensionsImpl implements FunctionsExtensions { - private static final ClientLogger LOGGER = new ClientLogger(FunctionsExtensionsImpl.class); - - private final FunctionsExtensionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public FunctionsExtensionsImpl(FunctionsExtensionsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String functionAppName, Context context) { - return this.serviceClient() - .invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, functionAppName, - context); - } - - public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, - String functionAppName) { - return this.serviceClient() - .invokeFunctionsHost(resourceGroupName, containerAppName, revisionName, functionAppName); - } - - private FunctionsExtensionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java index 9c7add9910d6..2fae1b500fb8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java @@ -957,6 +957,8 @@ public JavaComponentInner update(String resourceGroupName, String environmentNam } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -997,6 +999,8 @@ private Mono>> deleteWithResponseAsync(String resource } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1037,6 +1041,8 @@ private Mono>> deleteWithResponseAsync(String resource } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1056,6 +1062,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1078,6 +1086,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1095,6 +1105,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1113,6 +1125,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1130,6 +1144,8 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1148,6 +1164,8 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1163,6 +1181,8 @@ public void delete(String resourceGroupName, String environmentName, String name } /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java index 48488c9bbf21..a763cde3740e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecution; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; @@ -50,10 +49,6 @@ public JobExecutionTemplate template() { return this.innerModel().template(); } - public ExecutionStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - public JobExecutionInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java index 014e8ff7f026..37cbe47a999a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java @@ -10,7 +10,6 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.Job; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; @@ -18,7 +17,6 @@ import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; import com.azure.resourcemanager.appcontainers.models.JobPatchPropertiesProperties; import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JobRunningState; import com.azure.resourcemanager.appcontainers.models.JobSecretsCollection; import com.azure.resourcemanager.appcontainers.models.JobTemplate; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; @@ -56,10 +54,6 @@ public Map tags() { } } - public ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - public ManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -72,10 +66,6 @@ public JobProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public JobRunningState runningState() { - return this.innerModel().runningState(); - } - public String environmentId() { return this.innerModel().environmentId(); } @@ -221,22 +211,6 @@ public JobSecretsCollection listSecrets() { return serviceManager.jobs().listSecrets(resourceGroupName, jobName); } - public Job resume() { - return serviceManager.jobs().resume(resourceGroupName, jobName); - } - - public Job resume(Context context) { - return serviceManager.jobs().resume(resourceGroupName, jobName, context); - } - - public Job suspend() { - return serviceManager.jobs().suspend(resourceGroupName, jobName); - } - - public Job suspend(Context context) { - return serviceManager.jobs().suspend(resourceGroupName, jobName, context); - } - public JobImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -257,16 +231,6 @@ public JobImpl withTags(Map tags) { } } - public JobImpl withExtendedLocation(ExtendedLocation extendedLocation) { - if (isInCreateMode()) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } else { - this.updateJobEnvelope.withExtendedLocation(extendedLocation); - return this; - } - } - public JobImpl withIdentity(ManagedServiceIdentity identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java index e0ecb59651e4..ceca65786bdb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java @@ -27,7 +27,6 @@ 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.Context; import com.azure.core.util.FluxUtil; @@ -201,24 +200,6 @@ Mono> listSecrets(@HostParam("$host") String @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/resume") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/suspend") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> suspend(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -539,8 +520,6 @@ public DiagnosticsInner getDetector(String resourceGroupName, String jobName, St } /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -581,8 +560,6 @@ private Mono> proxyGetWithResponseAsync(String resourceGroupN } /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -623,8 +600,6 @@ private Mono> proxyGetWithResponseAsync(String resourceGroupN } /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -642,8 +617,6 @@ private Mono proxyGetAsync(String resourceGroupName, String jobName, S } /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -662,8 +635,6 @@ public Response proxyGetWithResponse(String resourceGroupName, String } /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -2529,408 +2500,6 @@ public JobSecretsCollectionInner listSecrets(String resourceGroupName, String jo return listSecretsWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); } - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resume(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), jobName, accept, context); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginResumeAsync(String resourceGroupName, String jobName) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginResumeAsync(String resourceGroupName, String jobName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resumeWithResponseAsync(resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName) { - return this.beginResumeAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName, - Context context) { - return this.beginResumeAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String jobName) { - return beginResumeAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String jobName, Context context) { - return beginResumeAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner resume(String resourceGroupName, String jobName) { - return resumeAsync(resourceGroupName, jobName).block(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner resume(String resourceGroupName, String jobName, Context context) { - return resumeAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.suspend(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.suspend(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), jobName, accept, context); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginSuspendAsync(String resourceGroupName, String jobName) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginSuspendAsync(String resourceGroupName, String jobName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = suspendWithResponseAsync(resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName) { - return this.beginSuspendAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName, - Context context) { - return this.beginSuspendAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, String jobName) { - return beginSuspendAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, String jobName, Context context) { - return beginSuspendAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner suspend(String resourceGroupName, String jobName) { - return suspendAsync(resourceGroupName, jobName).block(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner suspend(String resourceGroupName, String jobName, Context context) { - return suspendAsync(resourceGroupName, jobName, context).block(); - } - /** * Get the next page of items. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java index 7a1599cde8f8..65b50c4a1b06 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java @@ -203,42 +203,6 @@ public JobSecretsCollection listSecrets(String resourceGroupName, String jobName } } - public Job resume(String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().resume(resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job resume(String resourceGroupName, String jobName, Context context) { - JobInner inner = this.serviceClient().resume(resourceGroupName, jobName, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job suspend(String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().suspend(resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job suspend(String resourceGroupName, String jobName, Context context) { - JobInner inner = this.serviceClient().suspend(resourceGroupName, jobName, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - public Job getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java deleted file mode 100644 index 101a332d0e4e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java +++ /dev/null @@ -1,156 +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.appcontainers.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelope; - -public final class LogicAppImpl implements LogicApp, LogicApp.Definition, LogicApp.Update { - private LogicAppInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public LogicAppInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - private String logicAppName; - - public LogicAppImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { - this.resourceGroupName = resourceGroupName; - this.containerAppName = containerAppName; - return this; - } - - public LogicApp create() { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public LogicApp create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), context) - .getValue(); - return this; - } - - LogicAppImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new LogicAppInner(); - this.serviceManager = serviceManager; - this.logicAppName = name; - } - - public LogicAppImpl update() { - return this; - } - - public LogicApp apply() { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public LogicApp apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), context) - .getValue(); - return this; - } - - LogicAppImpl(LogicAppInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.logicAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "logicApps"); - } - - public LogicApp refresh() { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .getWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE) - .getValue(); - return this; - } - - public LogicApp refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .getWithResponse(resourceGroupName, containerAppName, logicAppName, context) - .getValue(); - return this; - } - - public Response deployWorkflowArtifactsWithResponse(WorkflowArtifacts workflowArtifacts, Context context) { - return serviceManager.logicApps() - .deployWorkflowArtifactsWithResponse(resourceGroupName, containerAppName, logicAppName, workflowArtifacts, - context); - } - - public void deployWorkflowArtifacts() { - serviceManager.logicApps().deployWorkflowArtifacts(resourceGroupName, containerAppName, logicAppName); - } - - public Response listWorkflowsConnectionsWithResponse(Context context) { - return serviceManager.logicApps() - .listWorkflowsConnectionsWithResponse(resourceGroupName, containerAppName, logicAppName, context); - } - - public WorkflowEnvelope listWorkflowsConnections() { - return serviceManager.logicApps().listWorkflowsConnections(resourceGroupName, containerAppName, logicAppName); - } - - public LogicAppImpl withProperties(Object properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java deleted file mode 100644 index 8c6c8f39a707..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java +++ /dev/null @@ -1,1386 +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.appcontainers.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.Post; -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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.LogicAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelopeCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in LogicAppsClient. - */ -public final class LogicAppsClientImpl implements LogicAppsClient { - /** - * The proxy service used to perform REST calls. - */ - private final LogicAppsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of LogicAppsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LogicAppsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(LogicAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientLogicApps to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface LogicAppsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogicAppInner resource, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/workflows") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkflows(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/workflows/{workflowName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getWorkflow(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @PathParam("workflowName") String workflowName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/deployWorkflowArtifacts") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> deployWorkflowArtifacts(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkflowArtifacts workflowArtifacts, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/listWorkflowsConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkflowsConnections(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/invoke") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> invoke(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @HeaderParam("x-ms-logicApps-proxy-path") String xMsLogicAppsProxyPath, - @HeaderParam("x-ms-logicApps-proxy-method") LogicAppsProxyMethod xMsLogicAppsProxyMethod, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkflowsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName 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, - containerAppName, logicAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, String logicAppName) { - return getWithResponseAsync(resourceGroupName, containerAppName, logicAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, logicAppName, context).block(); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicAppInner get(String resourceGroupName, String containerAppName, String logicAppName) { - return getWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE).getValue(); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, LogicAppInner resource) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), resource, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, LogicAppInner resource, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, this.client.getApiVersion(), resource, accept, context); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String logicAppName, LogicAppInner resource) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, logicAppName, resource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, LogicAppInner resource, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, logicAppName, resource, context) - .block(); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicAppInner createOrUpdate(String resourceGroupName, String containerAppName, String logicAppName, - LogicAppInner resource) { - return createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, resource, Context.NONE) - .getValue(); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, - String logicAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, - String logicAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName 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, - containerAppName, logicAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String logicAppName) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, logicAppName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, logicAppName, context).block(); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 containerAppName, String logicAppName) { - deleteWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsSinglePageAsync(String resourceGroupName, - String containerAppName, String logicAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listWorkflows(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, 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 workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsSinglePageAsync(String resourceGroupName, - String containerAppName, String logicAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listWorkflows(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkflowsAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - return new PagedFlux<>(() -> listWorkflowsSinglePageAsync(resourceGroupName, containerAppName, logicAppName), - nextLink -> listWorkflowsNextSinglePageAsync(nextLink)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkflowsAsync(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - return new PagedFlux<>( - () -> listWorkflowsSinglePageAsync(resourceGroupName, containerAppName, logicAppName, context), - nextLink -> listWorkflowsNextSinglePageAsync(nextLink, context)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName) { - return new PagedIterable<>(listWorkflowsAsync(resourceGroupName, containerAppName, logicAppName)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - return new PagedIterable<>(listWorkflowsAsync(resourceGroupName, containerAppName, logicAppName, context)); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWorkflowWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, String workflowName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowName == null) { - return Mono.error(new IllegalArgumentException("Parameter workflowName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getWorkflow(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, workflowName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWorkflowWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, String workflowName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowName == null) { - return Mono.error(new IllegalArgumentException("Parameter workflowName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getWorkflow(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, workflowName, this.client.getApiVersion(), accept, context); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWorkflowAsync(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName) { - return getWorkflowWithResponseAsync(resourceGroupName, containerAppName, logicAppName, workflowName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context) { - return getWorkflowWithResponseAsync(resourceGroupName, containerAppName, logicAppName, workflowName, context) - .block(); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkflowEnvelopeInner getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName) { - return getWorkflowWithResponse(resourceGroupName, containerAppName, logicAppName, workflowName, Context.NONE) - .getValue(); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> deployWorkflowArtifactsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, WorkflowArtifacts workflowArtifacts) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowArtifacts != null) { - workflowArtifacts.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deployWorkflowArtifacts(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, logicAppName, - this.client.getApiVersion(), workflowArtifacts, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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> deployWorkflowArtifactsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, WorkflowArtifacts workflowArtifacts, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowArtifacts != null) { - workflowArtifacts.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deployWorkflowArtifacts(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), workflowArtifacts, accept, - context); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 deployWorkflowArtifactsAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - final WorkflowArtifacts workflowArtifacts = null; - return deployWorkflowArtifactsWithResponseAsync(resourceGroupName, containerAppName, logicAppName, - workflowArtifacts).flatMap(ignored -> Mono.empty()); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context) { - return deployWorkflowArtifactsWithResponseAsync(resourceGroupName, containerAppName, logicAppName, - workflowArtifacts, context).block(); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException 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 deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName) { - final WorkflowArtifacts workflowArtifacts = null; - deployWorkflowArtifactsWithResponse(resourceGroupName, containerAppName, logicAppName, workflowArtifacts, - Context.NONE); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsConnectionsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listWorkflowsConnections(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsConnectionsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listWorkflowsConnections(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listWorkflowsConnectionsAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - return listWorkflowsConnectionsWithResponseAsync(resourceGroupName, containerAppName, logicAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWorkflowsConnectionsWithResponse(String resourceGroupName, - String containerAppName, String logicAppName, Context context) { - return listWorkflowsConnectionsWithResponseAsync(resourceGroupName, containerAppName, logicAppName, context) - .block(); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkflowEnvelopeInner listWorkflowsConnections(String resourceGroupName, String containerAppName, - String logicAppName) { - return listWorkflowsConnectionsWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE) - .getValue(); - } - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> invokeWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (xMsLogicAppsProxyPath == null) { - return Mono - .error(new IllegalArgumentException("Parameter xMsLogicAppsProxyPath is required and cannot be null.")); - } - if (xMsLogicAppsProxyMethod == null) { - return Mono.error( - new IllegalArgumentException("Parameter xMsLogicAppsProxyMethod is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.invoke(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> invokeWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, - 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 (containerAppName == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); - } - if (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (xMsLogicAppsProxyPath == null) { - return Mono - .error(new IllegalArgumentException("Parameter xMsLogicAppsProxyPath is required and cannot be null.")); - } - if (xMsLogicAppsProxyMethod == null) { - return Mono.error( - new IllegalArgumentException("Parameter xMsLogicAppsProxyMethod is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.invoke(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod, this.client.getApiVersion(), - accept, context); - } - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono invokeAsync(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - return invokeWithResponseAsync(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context) { - return invokeWithResponseAsync(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod, context).block(); - } - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object invoke(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - return invokeWithResponse(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod, Context.NONE).getValue(); - } - - /** - * 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsNextSinglePageAsync(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.listWorkflowsNext(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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsNextSinglePageAsync(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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listWorkflowsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsImpl.java deleted file mode 100644 index 80699ff512c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsImpl.java +++ /dev/null @@ -1,235 +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.appcontainers.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.appcontainers.fluent.LogicAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import com.azure.resourcemanager.appcontainers.models.LogicApps; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelope; - -public final class LogicAppsImpl implements LogicApps { - private static final ClientLogger LOGGER = new ClientLogger(LogicAppsImpl.class); - - private final LogicAppsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public LogicAppsImpl(LogicAppsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, logicAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LogicAppImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LogicApp get(String resourceGroupName, String containerAppName, String logicAppName) { - LogicAppInner inner = this.serviceClient().get(resourceGroupName, containerAppName, logicAppName); - if (inner != null) { - return new LogicAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, containerAppName, logicAppName, context); - } - - public void delete(String resourceGroupName, String containerAppName, String logicAppName) { - this.serviceClient().delete(resourceGroupName, containerAppName, logicAppName); - } - - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName) { - PagedIterable inner - = this.serviceClient().listWorkflows(resourceGroupName, containerAppName, logicAppName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkflowEnvelopeImpl(inner1, this.manager())); - } - - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - PagedIterable inner - = this.serviceClient().listWorkflows(resourceGroupName, containerAppName, logicAppName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkflowEnvelopeImpl(inner1, this.manager())); - } - - public Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context) { - Response inner = this.serviceClient() - .getWorkflowWithResponse(resourceGroupName, containerAppName, logicAppName, workflowName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkflowEnvelopeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkflowEnvelope getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName) { - WorkflowEnvelopeInner inner - = this.serviceClient().getWorkflow(resourceGroupName, containerAppName, logicAppName, workflowName); - if (inner != null) { - return new WorkflowEnvelopeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context) { - return this.serviceClient() - .deployWorkflowArtifactsWithResponse(resourceGroupName, containerAppName, logicAppName, workflowArtifacts, - context); - } - - public void deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName) { - this.serviceClient().deployWorkflowArtifacts(resourceGroupName, containerAppName, logicAppName); - } - - public Response listWorkflowsConnectionsWithResponse(String resourceGroupName, - String containerAppName, String logicAppName, Context context) { - Response inner = this.serviceClient() - .listWorkflowsConnectionsWithResponse(resourceGroupName, containerAppName, logicAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkflowEnvelopeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkflowEnvelope listWorkflowsConnections(String resourceGroupName, String containerAppName, - String logicAppName) { - WorkflowEnvelopeInner inner - = this.serviceClient().listWorkflowsConnections(resourceGroupName, containerAppName, logicAppName); - if (inner != null) { - return new WorkflowEnvelopeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context) { - return this.serviceClient() - .invokeWithResponse(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod, context); - } - - public Object invoke(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - return this.serviceClient() - .invoke(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod); - } - - public LogicApp 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, logicAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, logicAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - this.deleteWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE); - } - - public Response 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - return this.deleteWithResponse(resourceGroupName, containerAppName, logicAppName, context); - } - - private LogicAppsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public LogicAppImpl define(String name) { - return new LogicAppImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java index ac1df30cdd61..aba448f59d83 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java @@ -9,8 +9,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; @@ -21,15 +19,11 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PublicNetworkAccess; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; public final class ManagedEnvironmentImpl implements ManagedEnvironment, ManagedEnvironment.Definition, ManagedEnvironment.Update { @@ -106,14 +100,6 @@ public AppLogsConfiguration appLogsConfiguration() { return this.innerModel().appLogsConfiguration(); } - public AppInsightsConfiguration appInsightsConfiguration() { - return this.innerModel().appInsightsConfiguration(); - } - - public OpenTelemetryConfiguration openTelemetryConfiguration() { - return this.innerModel().openTelemetryConfiguration(); - } - public Boolean zoneRedundant() { return this.innerModel().zoneRedundant(); } @@ -155,21 +141,6 @@ public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfigura return this.innerModel().peerTrafficConfiguration(); } - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -316,17 +287,6 @@ public ManagedEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appL return this; } - public ManagedEnvironmentImpl withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { - this.innerModel().withAppInsightsConfiguration(appInsightsConfiguration); - return this; - } - - public ManagedEnvironmentImpl - withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { - this.innerModel().withOpenTelemetryConfiguration(openTelemetryConfiguration); - return this; - } - public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { this.innerModel().withZoneRedundant(zoneRedundant); return this; @@ -368,9 +328,4 @@ public ManagedEnvironmentImpl withInfrastructureResourceGroup(String infrastruct this.innerModel().withPeerTrafficConfiguration(peerTrafficConfiguration); return this; } - - public ManagedEnvironmentImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); - return this; - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index fda1c378f6b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,1000 +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.appcontainers.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.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.appcontainers.fluent.ManagedEnvironmentPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionListResult; -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 - * ManagedEnvironmentPrivateEndpointConnectionsClient. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsClientImpl - implements ManagedEnvironmentPrivateEndpointConnectionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentPrivateEndpointConnectionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentPrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentPrivateEndpointConnectionsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentPrivateEndpointConnectionsService.class, - client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentPrivateEndpointConnections to - * be used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentPrivateEndpointConnectionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({ 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @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, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, 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 private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 a private endpoint connection for a given managed environment along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String privateEndpointConnectionName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 private endpoint connection for a given managed environment along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String privateEndpointConnectionName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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, - environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 a private endpoint connection for a given managed environment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 private endpoint connection for a given managed environment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context).block(); - } - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 a private endpoint connection for a given managed environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnectionEnvelope == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionEnvelope is required and cannot be null.")); - } else { - privateEndpointConnectionEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, privateEndpointConnectionName, this.client.getApiVersion(), - privateEndpointConnectionEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (privateEndpointConnectionEnvelope == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionEnvelope is required and cannot be null.")); - } else { - privateEndpointConnectionEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, privateEndpointConnectionName, this.client.getApiVersion(), - privateEndpointConnectionEnvelope, accept, context); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - privateEndpointConnectionName, privateEndpointConnectionEnvelope); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - this.client.getContext()); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - privateEndpointConnectionName, privateEndpointConnectionEnvelope, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - context); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, - privateEndpointConnectionEnvelope) - .getSyncPoller(); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, - privateEndpointConnectionEnvelope, context) - .getSyncPoller(); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, - privateEndpointConnectionEnvelope).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, - privateEndpointConnectionEnvelope, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, - privateEndpointConnectionEnvelope).block(); - } - - /** - * Update the state of a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, - Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, - privateEndpointConnectionEnvelope, context).block(); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, - String privateEndpointConnectionName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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, - environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - return this.beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName).getSyncPoller(); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, - String privateEndpointConnectionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context) - .getSyncPoller(); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, - String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName).block(); - } - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, String privateEndpointConnectionName, - Context context) { - deleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context).block(); - } - - /** - * 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 list of private endpoint connection associated with the specified resource 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(), - 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. - * @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 list of private endpoint connection associated with the specified resource along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java deleted file mode 100644 index 225993918b6c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,169 +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.appcontainers.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.appcontainers.fluent.ManagedEnvironmentPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateEndpointConnections; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; - -public final class ManagedEnvironmentPrivateEndpointConnectionsImpl - implements ManagedEnvironmentPrivateEndpointConnections { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentPrivateEndpointConnectionsImpl.class); - - private final ManagedEnvironmentPrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentPrivateEndpointConnectionsImpl( - ManagedEnvironmentPrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, Context context) { - Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateEndpointConnection get(String resourceGroupName, String environmentName, - String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner - = this.serviceClient().get(resourceGroupName, environmentName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, environmentName, privateEndpointConnectionName); - } - - public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName, - Context context) { - this.serviceClient().delete(resourceGroupName, environmentName, privateEndpointConnectionName, context); - } - - public PrivateEndpointConnection 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.delete(resourceGroupName, environmentName, privateEndpointConnectionName, 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 environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException(String - .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); - } - this.delete(resourceGroupName, environmentName, privateEndpointConnectionName, context); - } - - private ManagedEnvironmentPrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public PrivateEndpointConnectionImpl define(String name) { - return new PrivateEndpointConnectionImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java deleted file mode 100644 index 0c3f4e3e83b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,283 +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.appcontainers.implementation; - -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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateLinkResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResourceListResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in - * ManagedEnvironmentPrivateLinkResourcesClient. - */ -public final class ManagedEnvironmentPrivateLinkResourcesClientImpl - implements ManagedEnvironmentPrivateLinkResourcesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentPrivateLinkResourcesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentPrivateLinkResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentPrivateLinkResourcesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentPrivateLinkResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentPrivateLinkResources to be - * used by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentPrivateLinkResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateLinkResources") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @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, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, 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 private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, 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 (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 private link resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private link resources as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private link resources as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * 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 private link resources 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(), - 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. - * @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 list of private link resources along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.java deleted file mode 100644 index 34a753a0e7d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.java +++ /dev/null @@ -1,46 +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.appcontainers.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateLinkResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateLinkResources; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResource; - -public final class ManagedEnvironmentPrivateLinkResourcesImpl implements ManagedEnvironmentPrivateLinkResources { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentPrivateLinkResourcesImpl.class); - - private final ManagedEnvironmentPrivateLinkResourcesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentPrivateLinkResourcesImpl(ManagedEnvironmentPrivateLinkResourcesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - private ManagedEnvironmentPrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index 0f307d007854..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,164 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.util.Collections; -import java.util.List; - -public final class PrivateEndpointConnectionImpl - implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { - private PrivateEndpointConnectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public List groupIds() { - List inner = this.innerModel().groupIds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PrivateEndpoint privateEndpoint() { - return this.innerModel().privateEndpoint(); - } - - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerModel().privateLinkServiceConnectionState(); - } - - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public PrivateEndpointConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String privateEndpointConnectionName; - - public PrivateEndpointConnectionImpl withExistingManagedEnvironment(String resourceGroupName, - String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public PrivateEndpointConnection create() { - this.innerObject = serviceManager.serviceClient() - .getManagedEnvironmentPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), - Context.NONE); - return this; - } - - public PrivateEndpointConnection create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedEnvironmentPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), - context); - return this; - } - - PrivateEndpointConnectionImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new PrivateEndpointConnectionInner(); - this.serviceManager = serviceManager; - this.privateEndpointConnectionName = name; - } - - public PrivateEndpointConnectionImpl update() { - return this; - } - - public PrivateEndpointConnection apply() { - this.innerObject = serviceManager.serviceClient() - .getManagedEnvironmentPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), - Context.NONE); - return this; - } - - public PrivateEndpointConnection apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedEnvironmentPrivateEndpointConnections() - .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), - context); - return this; - } - - PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.privateEndpointConnectionName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); - } - - public PrivateEndpointConnection refresh() { - this.innerObject = serviceManager.serviceClient() - .getManagedEnvironmentPrivateEndpointConnections() - .getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnection refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getManagedEnvironmentPrivateEndpointConnections() - .getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, context) - .getValue(); - return this; - } - - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.innerModel().withPrivateEndpoint(privateEndpoint); - return this; - } - - public PrivateEndpointConnectionImpl - withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java deleted file mode 100644 index 29bb3c4ededb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java +++ /dev/null @@ -1,69 +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.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResource; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceImpl implements PrivateLinkResource { - private PrivateLinkResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 SystemData systemData() { - return this.innerModel().systemData(); - } - - public String groupId() { - return this.innerModel().groupId(); - } - - public List requiredMembers() { - List inner = this.innerModel().requiredMembers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List requiredZoneNames() { - List inner = this.innerModel().requiredZoneNames(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PrivateLinkResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java index a37b9bcc471e..2dd0a8362304 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; @@ -52,6 +54,10 @@ public Map tags() { } } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -105,6 +111,15 @@ public SessionPoolProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public List managedIdentitySettings() { + List inner = this.innerModel().managedIdentitySettings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -210,8 +225,23 @@ public SessionPoolImpl withRegion(String location) { } public SessionPoolImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateSessionPoolEnvelope.withTags(tags); + return this; + } + } + + public SessionPoolImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateSessionPoolEnvelope.withIdentity(identity); + return this; + } } public SessionPoolImpl withEnvironmentId(String environmentId) { @@ -279,6 +309,11 @@ public SessionPoolImpl withSessionNetworkConfiguration(SessionNetworkConfigurati } } + public SessionPoolImpl withManagedIdentitySettings(List managedIdentitySettings) { + this.innerModel().withManagedIdentitySettings(managedIdentitySettings); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java index 8c464a3cb284..49070a189996 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java @@ -66,10 +66,6 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String sourceControlName; - private String createXMsGithubAuxiliary; - - private String updateXMsGithubAuxiliary; - public SourceControlImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { this.resourceGroupName = resourceGroupName; this.containerAppName = containerAppName; @@ -79,16 +75,14 @@ public SourceControlImpl withExistingContainerApp(String resourceGroupName, Stri public SourceControl create() { this.innerObject = serviceManager.serviceClient() .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - createXMsGithubAuxiliary, Context.NONE); + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); return this; } public SourceControl create(Context context) { this.innerObject = serviceManager.serviceClient() .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - createXMsGithubAuxiliary, context); + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); return this; } @@ -96,27 +90,23 @@ public SourceControl create(Context context) { this.innerObject = new SourceControlInner(); this.serviceManager = serviceManager; this.sourceControlName = name; - this.createXMsGithubAuxiliary = null; } public SourceControlImpl update() { - this.updateXMsGithubAuxiliary = null; return this; } public SourceControl apply() { this.innerObject = serviceManager.serviceClient() .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - updateXMsGithubAuxiliary, Context.NONE); + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); return this; } public SourceControl apply(Context context) { this.innerObject = serviceManager.serviceClient() .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - updateXMsGithubAuxiliary, context); + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); return this; } @@ -159,18 +149,4 @@ public SourceControlImpl withGithubActionConfiguration(GithubActionConfiguration this.innerModel().withGithubActionConfiguration(githubActionConfiguration); return this; } - - public SourceControlImpl withXMsGithubAuxiliary(String xMsGithubAuxiliary) { - if (isInCreateMode()) { - this.createXMsGithubAuxiliary = xMsGithubAuxiliary; - return this; - } else { - this.updateXMsGithubAuxiliary = xMsGithubAuxiliary; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.java deleted file mode 100644 index 2da06b74375d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.java +++ /dev/null @@ -1,53 +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.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelope; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelopeProperties; - -public final class WorkflowEnvelopeImpl implements WorkflowEnvelope { - private WorkflowEnvelopeInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - WorkflowEnvelopeImpl(WorkflowEnvelopeInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager 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 String kind() { - return this.innerModel().kind(); - } - - public String location() { - return this.innerModel().location(); - } - - public WorkflowEnvelopeProperties properties() { - return this.innerModel().properties(); - } - - public WorkflowEnvelopeInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java index d5c81f00f20c..4afb39fb5652 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java @@ -4,8 +4,6 @@ /** * Package containing the implementations for ContainerAppsApiClient. - * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the - * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions - * extension resource. + * null. */ package com.azure.resourcemanager.appcontainers.implementation; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java deleted file mode 100644 index a3d7435c59a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java +++ /dev/null @@ -1,93 +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.appcontainers.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 java.io.IOException; - -/** - * Configuration of Application Insights. - */ -@Fluent -public final class AppInsightsConfiguration implements JsonSerializable { - /* - * Application Insights connection string - */ - private String connectionString; - - /** - * Creates an instance of AppInsightsConfiguration class. - */ - public AppInsightsConfiguration() { - } - - /** - * Get the connectionString property: Application Insights connection string. - * - * @return the connectionString value. - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString property: Application Insights connection string. - * - * @param connectionString the connectionString value to set. - * @return the AppInsightsConfiguration object itself. - */ - public AppInsightsConfiguration withConnectionString(String connectionString) { - this.connectionString = connectionString; - 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("connectionString", this.connectionString); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppInsightsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppInsightsConfiguration 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 AppInsightsConfiguration. - */ - public static AppInsightsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppInsightsConfiguration deserializedAppInsightsConfiguration = new AppInsightsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionString".equals(fieldName)) { - deserializedAppInsightsConfiguration.connectionString = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAppInsightsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java deleted file mode 100644 index 06fb0d166368..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java +++ /dev/null @@ -1,175 +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.appcontainers.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 AppResiliencies. - */ -public interface AppResiliencies { - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 appName, String name); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String appName, String name, Context context); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy. - */ - AppResiliency get(String resourceGroupName, String appName, String name); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String appName); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String appName, Context context); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response}. - */ - AppResiliency getById(String id); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container app resiliency policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new AppResiliency resource. - * - * @param name resource name. - * @return the first stage of the new AppResiliency definition. - */ - AppResiliency.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java deleted file mode 100644 index 2ddc37d1845c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java +++ /dev/null @@ -1,358 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; - -/** - * An immutable client-side representation of AppResiliency. - */ -public interface AppResiliency { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the timeoutPolicy property: Policy to set request timeouts. - * - * @return the timeoutPolicy value. - */ - TimeoutPolicy timeoutPolicy(); - - /** - * Gets the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @return the httpRetryPolicy value. - */ - HttpRetryPolicy httpRetryPolicy(); - - /** - * Gets the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @return the tcpRetryPolicy value. - */ - TcpRetryPolicy tcpRetryPolicy(); - - /** - * Gets the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @return the circuitBreakerPolicy value. - */ - CircuitBreakerPolicy circuitBreakerPolicy(); - - /** - * Gets the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @return the httpConnectionPool value. - */ - HttpConnectionPool httpConnectionPool(); - - /** - * Gets the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @return the tcpConnectionPool value. - */ - TcpConnectionPool tcpConnectionPool(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner object. - * - * @return the inner object. - */ - AppResiliencyInner innerModel(); - - /** - * The entirety of the AppResiliency definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The AppResiliency definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the AppResiliency definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the AppResiliency definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, appName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String appName); - } - - /** - * The stage of the AppResiliency 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.WithTimeoutPolicy, DefinitionStages.WithHttpRetryPolicy, - DefinitionStages.WithTcpRetryPolicy, DefinitionStages.WithCircuitBreakerPolicy, - DefinitionStages.WithHttpConnectionPool, DefinitionStages.WithTcpConnectionPool { - /** - * Executes the create request. - * - * @return the created resource. - */ - AppResiliency create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AppResiliency create(Context context); - } - - /** - * The stage of the AppResiliency definition allowing to specify timeoutPolicy. - */ - interface WithTimeoutPolicy { - /** - * Specifies the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy Policy to set request timeouts. - * @return the next definition stage. - */ - WithCreate withTimeoutPolicy(TimeoutPolicy timeoutPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify httpRetryPolicy. - */ - interface WithHttpRetryPolicy { - /** - * Specifies the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy Policy that defines http request retry conditions. - * @return the next definition stage. - */ - WithCreate withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify tcpRetryPolicy. - */ - interface WithTcpRetryPolicy { - /** - * Specifies the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy Policy that defines tcp request retry conditions. - * @return the next definition stage. - */ - WithCreate withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify circuitBreakerPolicy. - */ - interface WithCircuitBreakerPolicy { - /** - * Specifies the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy Policy that defines circuit breaker conditions. - * @return the next definition stage. - */ - WithCreate withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify httpConnectionPool. - */ - interface WithHttpConnectionPool { - /** - * Specifies the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool Defines parameters for http connection pooling. - * @return the next definition stage. - */ - WithCreate withHttpConnectionPool(HttpConnectionPool httpConnectionPool); - } - - /** - * The stage of the AppResiliency definition allowing to specify tcpConnectionPool. - */ - interface WithTcpConnectionPool { - /** - * Specifies the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool Defines parameters for tcp connection pooling. - * @return the next definition stage. - */ - WithCreate withTcpConnectionPool(TcpConnectionPool tcpConnectionPool); - } - } - - /** - * Begins update for the AppResiliency resource. - * - * @return the stage of resource update. - */ - AppResiliency.Update update(); - - /** - * The template for AppResiliency update. - */ - interface Update - extends UpdateStages.WithTimeoutPolicy, UpdateStages.WithHttpRetryPolicy, UpdateStages.WithTcpRetryPolicy, - UpdateStages.WithCircuitBreakerPolicy, UpdateStages.WithHttpConnectionPool, UpdateStages.WithTcpConnectionPool { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AppResiliency apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AppResiliency apply(Context context); - } - - /** - * The AppResiliency update stages. - */ - interface UpdateStages { - /** - * The stage of the AppResiliency update allowing to specify timeoutPolicy. - */ - interface WithTimeoutPolicy { - /** - * Specifies the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy Policy to set request timeouts. - * @return the next definition stage. - */ - Update withTimeoutPolicy(TimeoutPolicy timeoutPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify httpRetryPolicy. - */ - interface WithHttpRetryPolicy { - /** - * Specifies the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy Policy that defines http request retry conditions. - * @return the next definition stage. - */ - Update withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify tcpRetryPolicy. - */ - interface WithTcpRetryPolicy { - /** - * Specifies the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy Policy that defines tcp request retry conditions. - * @return the next definition stage. - */ - Update withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify circuitBreakerPolicy. - */ - interface WithCircuitBreakerPolicy { - /** - * Specifies the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy Policy that defines circuit breaker conditions. - * @return the next definition stage. - */ - Update withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify httpConnectionPool. - */ - interface WithHttpConnectionPool { - /** - * Specifies the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool Defines parameters for http connection pooling. - * @return the next definition stage. - */ - Update withHttpConnectionPool(HttpConnectionPool httpConnectionPool); - } - - /** - * The stage of the AppResiliency update allowing to specify tcpConnectionPool. - */ - interface WithTcpConnectionPool { - /** - * Specifies the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool Defines parameters for tcp connection pooling. - * @return the next definition stage. - */ - Update withTcpConnectionPool(TcpConnectionPool tcpConnectionPool); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AppResiliency refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AppResiliency refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java deleted file mode 100644 index 66078d3846bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java +++ /dev/null @@ -1,122 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of AppResiliency policies. - */ -@Fluent -public final class AppResiliencyCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of AppResiliencyCollection class. - */ - public AppResiliencyCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the AppResiliencyCollection object itself. - */ - public AppResiliencyCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model AppResiliencyCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AppResiliencyCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppResiliencyCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppResiliencyCollection 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 AppResiliencyCollection. - */ - public static AppResiliencyCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppResiliencyCollection deserializedAppResiliencyCollection = new AppResiliencyCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> AppResiliencyInner.fromJson(reader1)); - deserializedAppResiliencyCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAppResiliencyCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAppResiliencyCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java index 01e7df04856b..383b0f176233 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java @@ -22,12 +22,6 @@ public class BaseContainer implements JsonSerializable { */ private String image; - /* - * The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to - * update image through image field. Set to ContainerImage for user provided image. - */ - private ImageType imageType; - /* * Custom container name. */ @@ -84,28 +78,6 @@ public BaseContainer withImage(String image) { return this; } - /** - * Get the imageType property: The type of the image. Set to CloudBuild to let the system manages the image, where - * user will not be able to update image through image field. Set to ContainerImage for user provided image. - * - * @return the imageType value. - */ - public ImageType imageType() { - return this.imageType; - } - - /** - * Set the imageType property: The type of the image. Set to CloudBuild to let the system manages the image, where - * user will not be able to update image through image field. Set to ContainerImage for user provided image. - * - * @param imageType the imageType value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withImageType(ImageType imageType) { - this.imageType = imageType; - return this; - } - /** * Get the name property: Custom container name. * @@ -250,7 +222,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("imageType", this.imageType == null ? null : this.imageType.toString()); jsonWriter.writeStringField("name", this.name); jsonWriter.writeArrayField("command", this.command, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("args", this.args, (writer, element) -> writer.writeString(element)); @@ -277,8 +248,6 @@ public static BaseContainer fromJson(JsonReader jsonReader) throws IOException { if ("image".equals(fieldName)) { deserializedBaseContainer.image = reader.getString(); - } else if ("imageType".equals(fieldName)) { - deserializedBaseContainer.imageType = ImageType.fromString(reader.getString()); } else if ("name".equals(fieldName)) { deserializedBaseContainer.name = reader.getString(); } else if ("command".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java index 6168b12be5d2..5478645f34ec 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java @@ -5,9 +5,9 @@ package com.azure.resourcemanager.appcontainers.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; @@ -16,38 +16,36 @@ * Billing meter. */ @Fluent -public final class BillingMeter implements JsonSerializable { +public final class BillingMeter extends ProxyResource { /* - * Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ - * resourceType}/{resourceName} + * Region for the billing meter. */ - private String id; + private String location; /* - * The name of the resource + * Revision resource specific properties */ - private String name; + private BillingMeterProperties properties; /* - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private String type; + private SystemData systemData; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The type of the resource. */ - private SystemData systemData; + private String type; /* - * Region for the billing meter. + * The name of the resource. */ - private String location; + private String name; /* - * Revision resource specific properties + * Fully qualified resource Id for the resource. */ - private BillingMeterProperties properties; + private String id; /** * Creates an instance of BillingMeter class. @@ -55,44 +53,6 @@ public final class BillingMeter implements JsonSerializable { public BillingMeter() { } - /** - * Get the id property: Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts". - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * 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 location property: Region for the billing meter. * @@ -133,6 +93,45 @@ public BillingMeter withProperties(BillingMeterProperties 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; + } + /** * Validates the instance. * @@ -161,6 +160,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BillingMeter 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 BillingMeter. */ public static BillingMeter fromJson(JsonReader jsonReader) throws IOException { @@ -176,12 +176,12 @@ public static BillingMeter fromJson(JsonReader jsonReader) throws IOException { deserializedBillingMeter.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBillingMeter.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedBillingMeter.systemData = SystemData.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedBillingMeter.location = reader.getString(); } else if ("properties".equals(fieldName)) { deserializedBillingMeter.properties = BillingMeterProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBillingMeter.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java deleted file mode 100644 index ac5dd37d1d4b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of BuildAuthTokens. - */ -public interface BuildAuthTokens { - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 token used to connect to the endpoint where source code can be uploaded for a build. - */ - BuildToken list(String resourceGroupName, String builderName, String buildName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java deleted file mode 100644 index b0267e90fff9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java +++ /dev/null @@ -1,134 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a BuildResource list operation. - */ -@Fluent -public final class BuildCollection implements JsonSerializable { - /* - * The BuildResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of BuildCollection class. - */ - public BuildCollection() { - } - - /** - * Get the value property: The BuildResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The BuildResource items on this page. - * - * @param value the value value to set. - * @return the BuildCollection object itself. - */ - public BuildCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the BuildCollection object itself. - */ - public BuildCollection 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model BuildCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuildCollection.class); - - /** - * {@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 BuildCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildCollection 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 BuildCollection. - */ - public static BuildCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildCollection deserializedBuildCollection = new BuildCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> BuildResourceInner.fromJson(reader1)); - deserializedBuildCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBuildCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java deleted file mode 100644 index bc194ad4c4f9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java +++ /dev/null @@ -1,218 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Configuration of the build. - */ -@Fluent -public final class BuildConfiguration implements JsonSerializable { - /* - * Base OS used to build and run the app. - */ - private String baseOs; - - /* - * Platform to be used to build and run the app. - */ - private String platform; - - /* - * Platform version to be used to build and run the app. - */ - private String platformVersion; - - /* - * List of environment variables to be passed to the build, secrets should not be used in environment variable. - */ - private List environmentVariables; - - /* - * List of steps to perform before the build. - */ - private List preBuildSteps; - - /** - * Creates an instance of BuildConfiguration class. - */ - public BuildConfiguration() { - } - - /** - * Get the baseOs property: Base OS used to build and run the app. - * - * @return the baseOs value. - */ - public String baseOs() { - return this.baseOs; - } - - /** - * Set the baseOs property: Base OS used to build and run the app. - * - * @param baseOs the baseOs value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withBaseOs(String baseOs) { - this.baseOs = baseOs; - return this; - } - - /** - * Get the platform property: Platform to be used to build and run the app. - * - * @return the platform value. - */ - public String platform() { - return this.platform; - } - - /** - * Set the platform property: Platform to be used to build and run the app. - * - * @param platform the platform value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withPlatform(String platform) { - this.platform = platform; - return this; - } - - /** - * Get the platformVersion property: Platform version to be used to build and run the app. - * - * @return the platformVersion value. - */ - public String platformVersion() { - return this.platformVersion; - } - - /** - * Set the platformVersion property: Platform version to be used to build and run the app. - * - * @param platformVersion the platformVersion value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withPlatformVersion(String platformVersion) { - this.platformVersion = platformVersion; - return this; - } - - /** - * Get the environmentVariables property: List of environment variables to be passed to the build, secrets should - * not be used in environment variable. - * - * @return the environmentVariables value. - */ - public List environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: List of environment variables to be passed to the build, secrets should - * not be used in environment variable. - * - * @param environmentVariables the environmentVariables value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withEnvironmentVariables(List environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the preBuildSteps property: List of steps to perform before the build. - * - * @return the preBuildSteps value. - */ - public List preBuildSteps() { - return this.preBuildSteps; - } - - /** - * Set the preBuildSteps property: List of steps to perform before the build. - * - * @param preBuildSteps the preBuildSteps value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withPreBuildSteps(List preBuildSteps) { - this.preBuildSteps = preBuildSteps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environmentVariables() != null) { - environmentVariables().forEach(e -> e.validate()); - } - if (preBuildSteps() != null) { - preBuildSteps().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("baseOs", this.baseOs); - jsonWriter.writeStringField("platform", this.platform); - jsonWriter.writeStringField("platformVersion", this.platformVersion); - jsonWriter.writeArrayField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("preBuildSteps", this.preBuildSteps, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildConfiguration 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 BuildConfiguration. - */ - public static BuildConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildConfiguration deserializedBuildConfiguration = new BuildConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("baseOs".equals(fieldName)) { - deserializedBuildConfiguration.baseOs = reader.getString(); - } else if ("platform".equals(fieldName)) { - deserializedBuildConfiguration.platform = reader.getString(); - } else if ("platformVersion".equals(fieldName)) { - deserializedBuildConfiguration.platformVersion = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - List environmentVariables - = reader.readArray(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedBuildConfiguration.environmentVariables = environmentVariables; - } else if ("preBuildSteps".equals(fieldName)) { - List preBuildSteps = reader.readArray(reader1 -> PreBuildStep.fromJson(reader1)); - deserializedBuildConfiguration.preBuildSteps = preBuildSteps; - } else { - reader.skipChildren(); - } - } - - return deserializedBuildConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java deleted file mode 100644 index 5922fd28a4fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java +++ /dev/null @@ -1,71 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Resource instance provisioning state. - */ -public final class BuildProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for BuildProvisioningState. - */ - public static final BuildProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for BuildProvisioningState. - */ - public static final BuildProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for BuildProvisioningState. - */ - public static final BuildProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for BuildProvisioningState. - */ - public static final BuildProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for BuildProvisioningState. - */ - public static final BuildProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for BuildProvisioningState. - */ - public static final BuildProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of BuildProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BuildProvisioningState() { - } - - /** - * Creates or finds a BuildProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding BuildProvisioningState. - */ - public static BuildProvisioningState fromString(String name) { - return fromString(name, BuildProvisioningState.class); - } - - /** - * Gets known BuildProvisioningState values. - * - * @return known BuildProvisioningState values. - */ - public static Collection values() { - return values(BuildProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java deleted file mode 100644 index 2917c702fa3f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java +++ /dev/null @@ -1,261 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; - -/** - * An immutable client-side representation of BuildResource. - */ -public interface BuildResource { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - BuildProvisioningState provisioningState(); - - /** - * Gets the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - BuildStatus buildStatus(); - - /** - * Gets the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - ContainerRegistryWithCustomImage destinationContainerRegistry(); - - /** - * Gets the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - BuildConfiguration configuration(); - - /** - * Gets the uploadEndpoint property: Endpoint to which the source code should be uploaded. - * - * @return the uploadEndpoint value. - */ - String uploadEndpoint(); - - /** - * Gets the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - String logStreamEndpoint(); - - /** - * Gets the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and - * uploading source code. - * - * @return the tokenEndpoint value. - */ - String tokenEndpoint(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner object. - * - * @return the inner object. - */ - BuildResourceInner innerModel(); - - /** - * The entirety of the BuildResource definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The BuildResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BuildResource definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the BuildResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, builderName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @return the next definition stage. - */ - WithCreate withExistingBuilder(String resourceGroupName, String builderName); - } - - /** - * The stage of the BuildResource 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.WithDestinationContainerRegistry, DefinitionStages.WithConfiguration { - /** - * Executes the create request. - * - * @return the created resource. - */ - BuildResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BuildResource create(Context context); - } - - /** - * The stage of the BuildResource definition allowing to specify destinationContainerRegistry. - */ - interface WithDestinationContainerRegistry { - /** - * Specifies the destinationContainerRegistry property: Container registry that the final image will be - * uploaded to.. - * - * @param destinationContainerRegistry Container registry that the final image will be uploaded to. - * @return the next definition stage. - */ - WithCreate withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); - } - - /** - * The stage of the BuildResource definition allowing to specify configuration. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Configuration of the build.. - * - * @param configuration Configuration of the build. - * @return the next definition stage. - */ - WithCreate withConfiguration(BuildConfiguration configuration); - } - } - - /** - * Begins update for the BuildResource resource. - * - * @return the stage of resource update. - */ - BuildResource.Update update(); - - /** - * The template for BuildResource update. - */ - interface Update extends UpdateStages.WithDestinationContainerRegistry, UpdateStages.WithConfiguration { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BuildResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BuildResource apply(Context context); - } - - /** - * The BuildResource update stages. - */ - interface UpdateStages { - /** - * The stage of the BuildResource update allowing to specify destinationContainerRegistry. - */ - interface WithDestinationContainerRegistry { - /** - * Specifies the destinationContainerRegistry property: Container registry that the final image will be - * uploaded to.. - * - * @param destinationContainerRegistry Container registry that the final image will be uploaded to. - * @return the next definition stage. - */ - Update withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); - } - - /** - * The stage of the BuildResource update allowing to specify configuration. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Configuration of the build.. - * - * @param configuration Configuration of the build. - * @return the next definition stage. - */ - Update withConfiguration(BuildConfiguration configuration); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BuildResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BuildResource refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java deleted file mode 100644 index ddd4dde5e8e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java +++ /dev/null @@ -1,66 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of the build once it has been provisioned. - */ -public final class BuildStatus extends ExpandableStringEnum { - /** - * Static value NotStarted for BuildStatus. - */ - public static final BuildStatus NOT_STARTED = fromString("NotStarted"); - - /** - * Static value InProgress for BuildStatus. - */ - public static final BuildStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Static value Succeeded for BuildStatus. - */ - public static final BuildStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for BuildStatus. - */ - public static final BuildStatus CANCELED = fromString("Canceled"); - - /** - * Static value Failed for BuildStatus. - */ - public static final BuildStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of BuildStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BuildStatus() { - } - - /** - * Creates or finds a BuildStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding BuildStatus. - */ - public static BuildStatus fromString(String name) { - return fromString(name, BuildStatus.class); - } - - /** - * Gets known BuildStatus values. - * - * @return known BuildStatus values. - */ - public static Collection values() { - return values(BuildStatus.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java deleted file mode 100644 index 31786178e9d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java +++ /dev/null @@ -1,34 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of BuildToken. - */ -public interface BuildToken { - /** - * Gets the token property: Authentication token. - * - * @return the token value. - */ - String token(); - - /** - * Gets the expires property: Token expiration date. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner object. - * - * @return the inner object. - */ - BuildTokenInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java deleted file mode 100644 index d48b541cf328..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java +++ /dev/null @@ -1,135 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a BuilderResource list operation. - */ -@Fluent -public final class BuilderCollection implements JsonSerializable { - /* - * The BuilderResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of BuilderCollection class. - */ - public BuilderCollection() { - } - - /** - * Get the value property: The BuilderResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The BuilderResource items on this page. - * - * @param value the value value to set. - * @return the BuilderCollection object itself. - */ - public BuilderCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the BuilderCollection object itself. - */ - public BuilderCollection 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model BuilderCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuilderCollection.class); - - /** - * {@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 BuilderCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderCollection 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 BuilderCollection. - */ - public static BuilderCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderCollection deserializedBuilderCollection = new BuilderCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> BuilderResourceInner.fromJson(reader1)); - deserializedBuilderCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBuilderCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java deleted file mode 100644 index 7f99e5aa4f2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java +++ /dev/null @@ -1,71 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Resource instance provisioning state. - */ -public final class BuilderProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for BuilderProvisioningState. - */ - public static final BuilderProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for BuilderProvisioningState. - */ - public static final BuilderProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for BuilderProvisioningState. - */ - public static final BuilderProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for BuilderProvisioningState. - */ - public static final BuilderProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for BuilderProvisioningState. - */ - public static final BuilderProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for BuilderProvisioningState. - */ - public static final BuilderProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of BuilderProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BuilderProvisioningState() { - } - - /** - * Creates or finds a BuilderProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding BuilderProvisioningState. - */ - public static BuilderProvisioningState fromString(String name) { - return fromString(name, BuilderProvisioningState.class); - } - - /** - * Gets known BuilderProvisioningState values. - * - * @return known BuilderProvisioningState values. - */ - public static Collection values() { - return values(BuilderProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java deleted file mode 100644 index 1d81dcc8f511..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java +++ /dev/null @@ -1,333 +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.appcontainers.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of BuilderResource. - */ -public interface BuilderResource { - /** - * 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 location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of a builder resource. - * - * @return the provisioningState value. - */ - BuilderProvisioningState provisioningState(); - - /** - * Gets the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - String environmentId(); - - /** - * Gets the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @return the containerRegistries value. - */ - List containerRegistries(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner object. - * - * @return the inner object. - */ - BuilderResourceInner innerModel(); - - /** - * The entirety of the BuilderResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The BuilderResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BuilderResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the BuilderResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the BuilderResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the BuilderResource 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.WithEnvironmentId, DefinitionStages.WithContainerRegistries { - /** - * Executes the create request. - * - * @return the created resource. - */ - BuilderResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BuilderResource create(Context context); - } - - /** - * The stage of the BuilderResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the BuilderResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the BuilderResource definition allowing to specify environmentId. - */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of the container apps environment that the builder is - * associated with.. - * - * @param environmentId Resource ID of the container apps environment that the builder is associated with. - * @return the next definition stage. - */ - WithCreate withEnvironmentId(String environmentId); - } - - /** - * The stage of the BuilderResource definition allowing to specify containerRegistries. - */ - interface WithContainerRegistries { - /** - * Specifies the containerRegistries property: List of mappings of container registries and the managed - * identity used to connect to it.. - * - * @param containerRegistries List of mappings of container registries and the managed identity used to - * connect to it. - * @return the next definition stage. - */ - WithCreate withContainerRegistries(List containerRegistries); - } - } - - /** - * Begins update for the BuilderResource resource. - * - * @return the stage of resource update. - */ - BuilderResource.Update update(); - - /** - * The template for BuilderResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithEnvironmentId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BuilderResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BuilderResource apply(Context context); - } - - /** - * The BuilderResource update stages. - */ - interface UpdateStages { - /** - * The stage of the BuilderResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the BuilderResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the BuilderResource update allowing to specify environmentId. - */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of the container apps environment that the builder is - * associated with.. - * - * @param environmentId Resource ID of the container apps environment that the builder is associated with. - * @return the next definition stage. - */ - Update withEnvironmentId(String environmentId); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BuilderResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BuilderResource refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java deleted file mode 100644 index 90256ebdca5e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java +++ /dev/null @@ -1,173 +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.appcontainers.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.appcontainers.fluent.models.BuilderResourceUpdateProperties; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the BuilderResource. - */ -@Fluent -public final class BuilderResourceUpdate implements JsonSerializable { - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The updatable properties of the BuilderResource. - */ - private BuilderResourceUpdateProperties innerProperties; - - /** - * Creates an instance of BuilderResourceUpdate class. - */ - public BuilderResourceUpdate() { - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the BuilderResourceUpdate object itself. - */ - public BuilderResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the BuilderResourceUpdate object itself. - */ - public BuilderResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: The updatable properties of the BuilderResource. - * - * @return the innerProperties value. - */ - private BuilderResourceUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderResourceUpdate object itself. - */ - public BuilderResourceUpdate withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new BuilderResourceUpdateProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderResourceUpdate 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 BuilderResourceUpdate. - */ - public static BuilderResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderResourceUpdate deserializedBuilderResourceUpdate = new BuilderResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedBuilderResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBuilderResourceUpdate.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedBuilderResourceUpdate.innerProperties - = BuilderResourceUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderResourceUpdate; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java deleted file mode 100644 index d91007741556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java +++ /dev/null @@ -1,158 +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.appcontainers.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 Builders. - */ -public interface Builders { - /** - * List BuilderResource resources by subscription ID. - * - * @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 of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List BuilderResource resources by subscription 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * List BuilderResource resources by 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List BuilderResource resources by 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 response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 a BuilderResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 a BuilderResource. - */ - BuilderResource getByResourceGroup(String resourceGroupName, String builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 deleteByResourceGroup(String resourceGroupName, String builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 builderName, Context context); - - /** - * Get a BuilderResource. - * - * @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 a BuilderResource along with {@link Response}. - */ - BuilderResource getById(String id); - - /** - * Get a BuilderResource. - * - * @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 a BuilderResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a BuilderResource. - * - * @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); - - /** - * Delete a BuilderResource. - * - * @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 BuilderResource resource. - * - * @param name resource name. - * @return the first stage of the new BuilderResource definition. - */ - BuilderResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java deleted file mode 100644 index e00e51a76b57..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java +++ /dev/null @@ -1,118 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Builds. - */ -public interface Builds { - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 a BuildResource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 a BuildResource. - */ - BuildResource get(String resourceGroupName, String builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @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 builderName, String buildName, Context context); - - /** - * Get a BuildResource. - * - * @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 a BuildResource along with {@link Response}. - */ - BuildResource getById(String id); - - /** - * Get a BuildResource. - * - * @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 a BuildResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a BuildResource. - * - * @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); - - /** - * Delete a BuildResource. - * - * @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 BuildResource resource. - * - * @param name resource name. - * @return the first stage of the new BuildResource definition. - */ - BuildResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java deleted file mode 100644 index f0ff7e81d704..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of BuildsByBuilderResources. - */ -public interface BuildsByBuilderResources { - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String builderName); - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @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 of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String builderName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java index 41c1f8b60392..5a62d31f5e2b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java @@ -79,11 +79,6 @@ public final class CertificateProperties implements JsonSerializable { - /** - * Static value ServerSSLCertificate for CertificateType. - */ - public static final CertificateType SERVER_SSLCERTIFICATE = fromString("ServerSSLCertificate"); - - /** - * Static value ImagePullTrustedCA for CertificateType. - */ - public static final CertificateType IMAGE_PULL_TRUSTED_CA = fromString("ImagePullTrustedCA"); - - /** - * Creates a new instance of CertificateType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CertificateType() { - } - - /** - * Creates or finds a CertificateType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CertificateType. - */ - public static CertificateType fromString(String name) { - return fromString(name, CertificateType.class); - } - - /** - * Gets known CertificateType values. - * - * @return known CertificateType values. - */ - public static Collection values() { - return values(CertificateType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java deleted file mode 100644 index 973c4c44a1bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java +++ /dev/null @@ -1,156 +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.appcontainers.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 java.io.IOException; - -/** - * Policy that defines circuit breaker conditions. - */ -@Fluent -public final class CircuitBreakerPolicy implements JsonSerializable { - /* - * Number of consecutive errors before the circuit breaker opens - */ - private Integer consecutiveErrors; - - /* - * The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the - * check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. - */ - private Integer intervalInSeconds; - - /* - * Maximum percentage of hosts that will be ejected after failure threshold has been met - */ - private Integer maxEjectionPercent; - - /** - * Creates an instance of CircuitBreakerPolicy class. - */ - public CircuitBreakerPolicy() { - } - - /** - * Get the consecutiveErrors property: Number of consecutive errors before the circuit breaker opens. - * - * @return the consecutiveErrors value. - */ - public Integer consecutiveErrors() { - return this.consecutiveErrors; - } - - /** - * Set the consecutiveErrors property: Number of consecutive errors before the circuit breaker opens. - * - * @param consecutiveErrors the consecutiveErrors value to set. - * @return the CircuitBreakerPolicy object itself. - */ - public CircuitBreakerPolicy withConsecutiveErrors(Integer consecutiveErrors) { - this.consecutiveErrors = consecutiveErrors; - return this; - } - - /** - * Get the intervalInSeconds property: The time interval, in seconds, between endpoint checks. This can result in - * opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. - * Defaults to 10s. - * - * @return the intervalInSeconds value. - */ - public Integer intervalInSeconds() { - return this.intervalInSeconds; - } - - /** - * Set the intervalInSeconds property: The time interval, in seconds, between endpoint checks. This can result in - * opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. - * Defaults to 10s. - * - * @param intervalInSeconds the intervalInSeconds value to set. - * @return the CircuitBreakerPolicy object itself. - */ - public CircuitBreakerPolicy withIntervalInSeconds(Integer intervalInSeconds) { - this.intervalInSeconds = intervalInSeconds; - return this; - } - - /** - * Get the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold has - * been met. - * - * @return the maxEjectionPercent value. - */ - public Integer maxEjectionPercent() { - return this.maxEjectionPercent; - } - - /** - * Set the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold has - * been met. - * - * @param maxEjectionPercent the maxEjectionPercent value to set. - * @return the CircuitBreakerPolicy object itself. - */ - public CircuitBreakerPolicy withMaxEjectionPercent(Integer maxEjectionPercent) { - this.maxEjectionPercent = maxEjectionPercent; - 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.writeNumberField("consecutiveErrors", this.consecutiveErrors); - jsonWriter.writeNumberField("intervalInSeconds", this.intervalInSeconds); - jsonWriter.writeNumberField("maxEjectionPercent", this.maxEjectionPercent); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CircuitBreakerPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CircuitBreakerPolicy 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 CircuitBreakerPolicy. - */ - public static CircuitBreakerPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CircuitBreakerPolicy deserializedCircuitBreakerPolicy = new CircuitBreakerPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("consecutiveErrors".equals(fieldName)) { - deserializedCircuitBreakerPolicy.consecutiveErrors = reader.getNullable(JsonReader::getInt); - } else if ("intervalInSeconds".equals(fieldName)) { - deserializedCircuitBreakerPolicy.intervalInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("maxEjectionPercent".equals(fieldName)) { - deserializedCircuitBreakerPolicy.maxEjectionPercent = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedCircuitBreakerPolicy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java index 06b863bd1e9a..27402201bffc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java @@ -59,12 +59,6 @@ public final class Configuration implements JsonSerializable { */ private Service service; - /* - * Optional settings for Managed Identities that are assigned to the Container App. If a Managed Identity is not - * specified here, default settings will be used. - */ - private List identitySettings; - /** * Creates an instance of Configuration class. */ @@ -241,28 +235,6 @@ public Configuration withService(Service service) { return this; } - /** - * Get the identitySettings property: Optional settings for Managed Identities that are assigned to the Container - * App. If a Managed Identity is not specified here, default settings will be used. - * - * @return the identitySettings value. - */ - public List identitySettings() { - return this.identitySettings; - } - - /** - * Set the identitySettings property: Optional settings for Managed Identities that are assigned to the Container - * App. If a Managed Identity is not specified here, default settings will be used. - * - * @param identitySettings the identitySettings value to set. - * @return the Configuration object itself. - */ - public Configuration withIdentitySettings(List identitySettings) { - this.identitySettings = identitySettings; - return this; - } - /** * Validates the instance. * @@ -287,9 +259,6 @@ public void validate() { if (service() != null) { service().validate(); } - if (identitySettings() != null) { - identitySettings().forEach(e -> e.validate()); - } } /** @@ -307,8 +276,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("runtime", this.runtime); jsonWriter.writeNumberField("maxInactiveRevisions", this.maxInactiveRevisions); jsonWriter.writeJsonField("service", this.service); - jsonWriter.writeArrayField("identitySettings", this.identitySettings, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -346,10 +313,6 @@ public static Configuration fromJson(JsonReader jsonReader) throws IOException { deserializedConfiguration.maxInactiveRevisions = reader.getNullable(JsonReader::getInt); } else if ("service".equals(fieldName)) { deserializedConfiguration.service = Service.fromJson(reader); - } else if ("identitySettings".equals(fieldName)) { - List identitySettings - = reader.readArray(reader1 -> IdentitySettings.fromJson(reader1)); - deserializedConfiguration.identitySettings = identitySettings; } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java index 4ba039d9a39c..cfc287d3a816 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java @@ -22,11 +22,6 @@ public final class ConnectedEnvironmentStorageProperties */ private AzureFileProperties azureFile; - /* - * SMB storage properties - */ - private SmbStorage smb; - /** * Creates an instance of ConnectedEnvironmentStorageProperties class. */ @@ -53,26 +48,6 @@ public ConnectedEnvironmentStorageProperties withAzureFile(AzureFileProperties a return this; } - /** - * Get the smb property: SMB storage properties. - * - * @return the smb value. - */ - public SmbStorage smb() { - return this.smb; - } - - /** - * Set the smb property: SMB storage properties. - * - * @param smb the smb value to set. - * @return the ConnectedEnvironmentStorageProperties object itself. - */ - public ConnectedEnvironmentStorageProperties withSmb(SmbStorage smb) { - this.smb = smb; - return this; - } - /** * Validates the instance. * @@ -82,9 +57,6 @@ public void validate() { if (azureFile() != null) { azureFile().validate(); } - if (smb() != null) { - smb().validate(); - } } /** @@ -94,7 +66,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("azureFile", this.azureFile); - jsonWriter.writeJsonField("smb", this.smb); return jsonWriter.writeEndObject(); } @@ -116,8 +87,6 @@ public static ConnectedEnvironmentStorageProperties fromJson(JsonReader jsonRead if ("azureFile".equals(fieldName)) { deserializedConnectedEnvironmentStorageProperties.azureFile = AzureFileProperties.fromJson(reader); - } else if ("smb".equals(fieldName)) { - deserializedConnectedEnvironmentStorageProperties.smb = SmbStorage.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java index dede37bf0485..cdb204ef9d48 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java @@ -56,15 +56,6 @@ public Container withImage(String image) { return this; } - /** - * {@inheritDoc} - */ - @Override - public Container withImageType(ImageType imageType) { - super.withImageType(imageType); - return this; - } - /** * {@inheritDoc} */ @@ -147,7 +138,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("image", image()); - jsonWriter.writeStringField("imageType", imageType() == null ? null : imageType().toString()); jsonWriter.writeStringField("name", name()); jsonWriter.writeArrayField("command", command(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("args", args(), (writer, element) -> writer.writeString(element)); @@ -175,8 +165,6 @@ public static Container fromJson(JsonReader jsonReader) throws IOException { if ("image".equals(fieldName)) { deserializedContainer.withImage(reader.getString()); - } else if ("imageType".equals(fieldName)) { - deserializedContainer.withImageType(ImageType.fromString(reader.getString())); } else if ("name".equals(fieldName)) { deserializedContainer.withName(reader.getString()); } else if ("command".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java index 3f86e3387c14..79ebc6af7ac8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java @@ -75,15 +75,6 @@ public interface ContainerApp { */ String managedBy(); - /** - * Gets the kind property: Metadata used to render different experiences for resources of the same type; e.g. - * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and - * persist this value. - * - * @return the kind value. - */ - Kind kind(); - /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -99,11 +90,11 @@ public interface ContainerApp { ContainerAppProvisioningState provisioningState(); /** - * Gets the deploymentErrors property: Any errors that occurred during deployment. + * Gets the runningStatus property: Running status of the Container App. * - * @return the deploymentErrors value. + * @return the runningStatus value. */ - String deploymentErrors(); + ContainerAppRunningStatus runningStatus(); /** * Gets the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. @@ -126,13 +117,6 @@ public interface ContainerApp { */ String workloadProfileName(); - /** - * Gets the patchingConfiguration property: Container App auto patch configuration. - * - * @return the patchingConfiguration value. - */ - ContainerAppPropertiesPatchingConfiguration patchingConfiguration(); - /** * Gets the latestRevisionName property: Name of the latest revision of the Container App. * @@ -273,9 +257,8 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, - DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithKind, - DefinitionStages.WithManagedEnvironmentId, DefinitionStages.WithEnvironmentId, - DefinitionStages.WithWorkloadProfileName, DefinitionStages.WithPatchingConfiguration, + DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithManagedEnvironmentId, + DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** * Executes the create request. @@ -352,23 +335,6 @@ interface WithManagedBy { WithCreate withManagedBy(String managedBy); } - /** - * The stage of the ContainerApp definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Metadata used to render different experiences for resources of the same - * type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider - * must validate and persist this value.. - * - * @param kind Metadata used to render different experiences for resources of the same type; e.g. - * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must - * validate and persist this value. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - /** * The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ @@ -408,19 +374,6 @@ interface WithWorkloadProfileName { WithCreate withWorkloadProfileName(String workloadProfileName); } - /** - * The stage of the ContainerApp definition allowing to specify patchingConfiguration. - */ - interface WithPatchingConfiguration { - /** - * Specifies the patchingConfiguration property: Container App auto patch configuration.. - * - * @param patchingConfiguration Container App auto patch configuration. - * @return the next definition stage. - */ - WithCreate withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration); - } - /** * The stage of the ContainerApp definition allowing to specify configuration. */ @@ -459,8 +412,8 @@ interface WithTemplate { * The template for ContainerApp update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, - UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithPatchingConfiguration, - UpdateStages.WithConfiguration, UpdateStages.WithTemplate { + UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithConfiguration, + UpdateStages.WithTemplate { /** * Executes the update request. * @@ -553,19 +506,6 @@ interface WithWorkloadProfileName { Update withWorkloadProfileName(String workloadProfileName); } - /** - * The stage of the ContainerApp update allowing to specify patchingConfiguration. - */ - interface WithPatchingConfiguration { - /** - * Specifies the patchingConfiguration property: Container App auto patch configuration.. - * - * @param patchingConfiguration Container App auto patch configuration. - * @return the next definition stage. - */ - Update withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration); - } - /** * The stage of the ContainerApp update allowing to specify configuration. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java deleted file mode 100644 index 538fd7361ad8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java +++ /dev/null @@ -1,102 +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.appcontainers.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 java.io.IOException; - -/** - * Container App auto patch configuration. - */ -@Fluent -public final class ContainerAppPropertiesPatchingConfiguration - implements JsonSerializable { - /* - * Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. - * Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply - * patches. Disabled mode will stop patch detection and auto patching. - */ - private PatchingMode patchingMode; - - /** - * Creates an instance of ContainerAppPropertiesPatchingConfiguration class. - */ - public ContainerAppPropertiesPatchingConfiguration() { - } - - /** - * Get the patchingMode property: Patching mode for the container app. Null or default in this field will be - * interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will - * require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. - * - * @return the patchingMode value. - */ - public PatchingMode patchingMode() { - return this.patchingMode; - } - - /** - * Set the patchingMode property: Patching mode for the container app. Null or default in this field will be - * interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will - * require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. - * - * @param patchingMode the patchingMode value to set. - * @return the ContainerAppPropertiesPatchingConfiguration object itself. - */ - public ContainerAppPropertiesPatchingConfiguration withPatchingMode(PatchingMode patchingMode) { - this.patchingMode = patchingMode; - 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("patchingMode", this.patchingMode == null ? null : this.patchingMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppPropertiesPatchingConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppPropertiesPatchingConfiguration 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 ContainerAppPropertiesPatchingConfiguration. - */ - public static ContainerAppPropertiesPatchingConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppPropertiesPatchingConfiguration deserializedContainerAppPropertiesPatchingConfiguration - = new ContainerAppPropertiesPatchingConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("patchingMode".equals(fieldName)) { - deserializedContainerAppPropertiesPatchingConfiguration.patchingMode - = PatchingMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppPropertiesPatchingConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppRunningStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppRunningStatus.java new file mode 100644 index 000000000000..a6072e9e02da --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppRunningStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Running status of the Container App. + */ +public final class ContainerAppRunningStatus extends ExpandableStringEnum { + /** + * Static value Progressing for ContainerAppRunningStatus. + */ + public static final ContainerAppRunningStatus PROGRESSING = fromString("Progressing"); + + /** + * Static value Running for ContainerAppRunningStatus. + */ + public static final ContainerAppRunningStatus RUNNING = fromString("Running"); + + /** + * Static value Stopped for ContainerAppRunningStatus. + */ + public static final ContainerAppRunningStatus STOPPED = fromString("Stopped"); + + /** + * Static value Suspended for ContainerAppRunningStatus. + */ + public static final ContainerAppRunningStatus SUSPENDED = fromString("Suspended"); + + /** + * Static value Ready for ContainerAppRunningStatus. + */ + public static final ContainerAppRunningStatus READY = fromString("Ready"); + + /** + * Creates a new instance of ContainerAppRunningStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContainerAppRunningStatus() { + } + + /** + * Creates or finds a ContainerAppRunningStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerAppRunningStatus. + */ + public static ContainerAppRunningStatus fromString(String name) { + return fromString(name, ContainerAppRunningStatus.class); + } + + /** + * Gets known ContainerAppRunningStatus values. + * + * @return known ContainerAppRunningStatus values. + */ + public static Collection values() { + return values(ContainerAppRunningStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java deleted file mode 100644 index d0764cdbf52f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java +++ /dev/null @@ -1,136 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a Container Apps Build Resource list operation. - */ -@Fluent -public final class ContainerAppsBuildCollection implements JsonSerializable { - /* - * The Container Apps Build Resource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of ContainerAppsBuildCollection class. - */ - public ContainerAppsBuildCollection() { - } - - /** - * Get the value property: The Container Apps Build Resource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The Container Apps Build Resource items on this page. - * - * @param value the value value to set. - * @return the ContainerAppsBuildCollection object itself. - */ - public ContainerAppsBuildCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the ContainerAppsBuildCollection object itself. - */ - public ContainerAppsBuildCollection 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ContainerAppsBuildCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildCollection.class); - - /** - * {@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 ContainerAppsBuildCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildCollection 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 ContainerAppsBuildCollection. - */ - public static ContainerAppsBuildCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildCollection deserializedContainerAppsBuildCollection = new ContainerAppsBuildCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ContainerAppsBuildResourceInner.fromJson(reader1)); - deserializedContainerAppsBuildCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContainerAppsBuildCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java deleted file mode 100644 index 1404749df225..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java +++ /dev/null @@ -1,157 +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.appcontainers.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; -import java.util.List; - -/** - * Configuration of the build. - */ -@Immutable -public final class ContainerAppsBuildConfiguration implements JsonSerializable { - /* - * Base OS used to build and run the app. - */ - private String baseOs; - - /* - * Platform to be used to build and run the app. - */ - private String platform; - - /* - * Platform version to be used to build and run the app. - */ - private String platformVersion; - - /* - * List of environment variables to be passed to the build, secrets should not be used in environment variable. - */ - private List environmentVariables; - - /* - * List of steps to perform before the build. - */ - private List preBuildSteps; - - /** - * Creates an instance of ContainerAppsBuildConfiguration class. - */ - public ContainerAppsBuildConfiguration() { - } - - /** - * Get the baseOs property: Base OS used to build and run the app. - * - * @return the baseOs value. - */ - public String baseOs() { - return this.baseOs; - } - - /** - * Get the platform property: Platform to be used to build and run the app. - * - * @return the platform value. - */ - public String platform() { - return this.platform; - } - - /** - * Get the platformVersion property: Platform version to be used to build and run the app. - * - * @return the platformVersion value. - */ - public String platformVersion() { - return this.platformVersion; - } - - /** - * Get the environmentVariables property: List of environment variables to be passed to the build, secrets should - * not be used in environment variable. - * - * @return the environmentVariables value. - */ - public List environmentVariables() { - return this.environmentVariables; - } - - /** - * Get the preBuildSteps property: List of steps to perform before the build. - * - * @return the preBuildSteps value. - */ - public List preBuildSteps() { - return this.preBuildSteps; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environmentVariables() != null) { - environmentVariables().forEach(e -> e.validate()); - } - if (preBuildSteps() != null) { - preBuildSteps().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildConfiguration 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 ContainerAppsBuildConfiguration. - */ - public static ContainerAppsBuildConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildConfiguration deserializedContainerAppsBuildConfiguration - = new ContainerAppsBuildConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("baseOs".equals(fieldName)) { - deserializedContainerAppsBuildConfiguration.baseOs = reader.getString(); - } else if ("platform".equals(fieldName)) { - deserializedContainerAppsBuildConfiguration.platform = reader.getString(); - } else if ("platformVersion".equals(fieldName)) { - deserializedContainerAppsBuildConfiguration.platformVersion = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - List environmentVariables - = reader.readArray(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedContainerAppsBuildConfiguration.environmentVariables = environmentVariables; - } else if ("preBuildSteps".equals(fieldName)) { - List preBuildSteps = reader.readArray(reader1 -> PreBuildStep.fromJson(reader1)); - deserializedContainerAppsBuildConfiguration.preBuildSteps = preBuildSteps; - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java deleted file mode 100644 index e0a93c5e4895..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java +++ /dev/null @@ -1,83 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; - -/** - * An immutable client-side representation of ContainerAppsBuildResource. - */ -public interface ContainerAppsBuildResource { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - BuildProvisioningState provisioningState(); - - /** - * Gets the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - BuildStatus buildStatus(); - - /** - * Gets the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - ContainerRegistryWithCustomImage destinationContainerRegistry(); - - /** - * Gets the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - ContainerAppsBuildConfiguration configuration(); - - /** - * Gets the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - String logStreamEndpoint(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner object. - * - * @return the inner object. - */ - ContainerAppsBuildResourceInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java deleted file mode 100644 index 293579325fa1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java +++ /dev/null @@ -1,66 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ContainerAppsBuilds. - */ -public interface ContainerAppsBuilds { - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 a Container Apps Build resource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String containerAppName, - String buildName, Context context); - - /** - * Get a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 a Container Apps Build resource. - */ - ContainerAppsBuildResource get(String resourceGroupName, String containerAppName, String buildName); - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName); - - /** - * Delete a Container Apps Build resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @param buildName The name of a build. - * @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 containerAppName, String buildName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java deleted file mode 100644 index bb61f0cf9013..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ContainerAppsBuildsByContainerApps. - */ -public interface ContainerAppsBuildsByContainerApps { - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String containerAppName); - - /** - * List Container Apps Build resources by Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Build is associated. - * @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 of a Container Apps Build Resource list operation as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String containerAppName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java deleted file mode 100644 index 0a032a7e86e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java +++ /dev/null @@ -1,55 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; - -/** - * An immutable client-side representation of ContainerAppsPatchResource. - */ -public interface ContainerAppsPatchResource { - /** - * 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: Properties that describes current states of the patch resource. - * - * @return the properties value. - */ - PatchProperties 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.appcontainers.fluent.models.ContainerAppsPatchResourceInner object. - * - * @return the inner object. - */ - ContainerAppsPatchResourceInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java deleted file mode 100644 index 04509a19a50e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java +++ /dev/null @@ -1,152 +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.appcontainers.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 ContainerAppsPatches. - */ -public interface ContainerAppsPatches { - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @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 container App patch collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * List Container Apps Patch resources by ContainerApp. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq - * 'Succeeded'. - * @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 container App patch collection as paginated response with {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - String filter, Context context); - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String containerAppName, - String patchName, Context context); - - /** - * Get details for specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 details for specific Container Apps Patch by patch name. - */ - ContainerAppsPatchResource get(String resourceGroupName, String containerAppName, String patchName); - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName); - - /** - * Delete specific Container Apps Patch by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 containerAppName, String patchName, Context context); - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig); - - /** - * Configure the Container Apps Patch skip option by patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @param patchSkipConfig Configure patcher to skip a patch or not. - * @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 skipConfigure(String resourceGroupName, String containerAppName, String patchName, - PatchSkipConfig patchSkipConfig, Context context); - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName); - - /** - * Apply a Container Apps Patch resource with patch name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App the Patch is associated. - * @param patchName The name of the patch. - * @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 container App Patch. - */ - ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName, - Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java index da694047a71d..41cc21d952a2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java @@ -90,17 +90,13 @@ Response getWithResponse(String resourceGroupName, String contain * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String sourceControlName, String xMsGithubAuxiliary, - Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context); + void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context); /** * Get a SourceControl of a Container App. @@ -142,17 +138,13 @@ void delete(String resourceGroupName, String containerAppName, String sourceCont * Delete a Container App SourceControl. * * @param id the resource ID. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context); + void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new SourceControl resource. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java deleted file mode 100644 index 0ca01e367769..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java +++ /dev/null @@ -1,177 +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.appcontainers.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 java.io.IOException; - -/** - * Container Apps Job execution container status. Contains status code and reason. - */ -@Fluent -public final class ContainerExecutionStatus implements JsonSerializable { - /* - * Container Name. - */ - private String name; - - /* - * Exit code - */ - private Integer code; - - /* - * Additional information for the container status - */ - private String additionalInformation; - - /* - * Status of the container - */ - private String status; - - /** - * Creates an instance of ContainerExecutionStatus class. - */ - public ContainerExecutionStatus() { - } - - /** - * Get the name property: Container Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Container Name. - * - * @param name the name value to set. - * @return the ContainerExecutionStatus object itself. - */ - public ContainerExecutionStatus withName(String name) { - this.name = name; - return this; - } - - /** - * Get the code property: Exit code. - * - * @return the code value. - */ - public Integer code() { - return this.code; - } - - /** - * Set the code property: Exit code. - * - * @param code the code value to set. - * @return the ContainerExecutionStatus object itself. - */ - public ContainerExecutionStatus withCode(Integer code) { - this.code = code; - return this; - } - - /** - * Get the additionalInformation property: Additional information for the container status. - * - * @return the additionalInformation value. - */ - public String additionalInformation() { - return this.additionalInformation; - } - - /** - * Set the additionalInformation property: Additional information for the container status. - * - * @param additionalInformation the additionalInformation value to set. - * @return the ContainerExecutionStatus object itself. - */ - public ContainerExecutionStatus withAdditionalInformation(String additionalInformation) { - this.additionalInformation = additionalInformation; - return this; - } - - /** - * Get the status property: Status of the container. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Status of the container. - * - * @param status the status value to set. - * @return the ContainerExecutionStatus object itself. - */ - public ContainerExecutionStatus withStatus(String status) { - this.status = status; - 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("name", this.name); - jsonWriter.writeNumberField("code", this.code); - jsonWriter.writeStringField("additionalInformation", this.additionalInformation); - jsonWriter.writeStringField("status", this.status); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerExecutionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerExecutionStatus 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 ContainerExecutionStatus. - */ - public static ContainerExecutionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerExecutionStatus deserializedContainerExecutionStatus = new ContainerExecutionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContainerExecutionStatus.name = reader.getString(); - } else if ("code".equals(fieldName)) { - deserializedContainerExecutionStatus.code = reader.getNullable(JsonReader::getInt); - } else if ("additionalInformation".equals(fieldName)) { - deserializedContainerExecutionStatus.additionalInformation = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedContainerExecutionStatus.status = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerExecutionStatus; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java deleted file mode 100644 index a20c60c56254..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java +++ /dev/null @@ -1,135 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model representing a mapping from a container registry to the identity used to connect to it. - */ -@Fluent -public final class ContainerRegistry implements JsonSerializable { - /* - * Login server of the container registry. - */ - private String containerRegistryServer; - - /* - * Resource ID of the managed identity. - */ - private String identityResourceId; - - /** - * Creates an instance of ContainerRegistry class. - */ - public ContainerRegistry() { - } - - /** - * Get the containerRegistryServer property: Login server of the container registry. - * - * @return the containerRegistryServer value. - */ - public String containerRegistryServer() { - return this.containerRegistryServer; - } - - /** - * Set the containerRegistryServer property: Login server of the container registry. - * - * @param containerRegistryServer the containerRegistryServer value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withContainerRegistryServer(String containerRegistryServer) { - this.containerRegistryServer = containerRegistryServer; - return this; - } - - /** - * Get the identityResourceId property: Resource ID of the managed identity. - * - * @return the identityResourceId value. - */ - public String identityResourceId() { - return this.identityResourceId; - } - - /** - * Set the identityResourceId property: Resource ID of the managed identity. - * - * @param identityResourceId the identityResourceId value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withIdentityResourceId(String identityResourceId) { - this.identityResourceId = identityResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerRegistryServer() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property containerRegistryServer in model ContainerRegistry")); - } - if (identityResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property identityResourceId in model ContainerRegistry")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistry.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("containerRegistryServer", this.containerRegistryServer); - jsonWriter.writeStringField("identityResourceId", this.identityResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerRegistry from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerRegistry 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 ContainerRegistry. - */ - public static ContainerRegistry fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerRegistry deserializedContainerRegistry = new ContainerRegistry(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containerRegistryServer".equals(fieldName)) { - deserializedContainerRegistry.containerRegistryServer = reader.getString(); - } else if ("identityResourceId".equals(fieldName)) { - deserializedContainerRegistry.identityResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerRegistry; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java deleted file mode 100644 index aefd2633fb20..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java +++ /dev/null @@ -1,134 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container registry that the final image will be uploaded to. - */ -@Fluent -public final class ContainerRegistryWithCustomImage implements JsonSerializable { - /* - * Login server of the container registry that the final image should be uploaded to. Builder resource needs to have - * this container registry defined along with an identity to use to access it. - */ - private String server; - - /* - * Full name that the final image should be uploaded as, including both image name and tag. - */ - private String image; - - /** - * Creates an instance of ContainerRegistryWithCustomImage class. - */ - public ContainerRegistryWithCustomImage() { - } - - /** - * Get the server property: Login server of the container registry that the final image should be uploaded to. - * Builder resource needs to have this container registry defined along with an identity to use to access it. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: Login server of the container registry that the final image should be uploaded to. - * Builder resource needs to have this container registry defined along with an identity to use to access it. - * - * @param server the server value to set. - * @return the ContainerRegistryWithCustomImage object itself. - */ - public ContainerRegistryWithCustomImage withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the image property: Full name that the final image should be uploaded as, including both image name and tag. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Full name that the final image should be uploaded as, including both image name and tag. - * - * @param image the image value to set. - * @return the ContainerRegistryWithCustomImage object itself. - */ - public ContainerRegistryWithCustomImage withImage(String image) { - this.image = image; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (server() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property server in model ContainerRegistryWithCustomImage")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryWithCustomImage.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("server", this.server); - jsonWriter.writeStringField("image", this.image); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerRegistryWithCustomImage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerRegistryWithCustomImage 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 ContainerRegistryWithCustomImage. - */ - public static ContainerRegistryWithCustomImage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerRegistryWithCustomImage deserializedContainerRegistryWithCustomImage - = new ContainerRegistryWithCustomImage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("server".equals(fieldName)) { - deserializedContainerRegistryWithCustomImage.server = reader.getString(); - } else if ("image".equals(fieldName)) { - deserializedContainerRegistryWithCustomImage.image = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerRegistryWithCustomImage; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java index dc79196c9979..11986b1d22c9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java @@ -98,13 +98,6 @@ public interface DaprComponent { */ List scopes(); - /** - * Gets the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @return the serviceComponentBind value. - */ - List serviceComponentBind(); - /** * Gets the name of the resource group. * @@ -154,10 +147,9 @@ interface WithParentResource { * The stage of the DaprComponent 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.WithComponentType, DefinitionStages.WithVersion, DefinitionStages.WithIgnoreErrors, - DefinitionStages.WithInitTimeout, DefinitionStages.WithSecrets, DefinitionStages.WithSecretStoreComponent, - DefinitionStages.WithMetadata, DefinitionStages.WithScopes, DefinitionStages.WithServiceComponentBind { + interface WithCreate extends DefinitionStages.WithComponentType, DefinitionStages.WithVersion, + DefinitionStages.WithIgnoreErrors, DefinitionStages.WithInitTimeout, DefinitionStages.WithSecrets, + DefinitionStages.WithSecretStoreComponent, DefinitionStages.WithMetadata, DefinitionStages.WithScopes { /** * Executes the create request. * @@ -277,20 +269,6 @@ interface WithScopes { */ WithCreate withScopes(List scopes); } - - /** - * The stage of the DaprComponent definition allowing to specify serviceComponentBind. - */ - interface WithServiceComponentBind { - /** - * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr - * component. - * - * @param serviceComponentBind List of container app services that are bound to the Dapr component. - * @return the next definition stage. - */ - WithCreate withServiceComponentBind(List serviceComponentBind); - } } /** @@ -305,7 +283,7 @@ interface WithServiceComponentBind { */ interface Update extends UpdateStages.WithComponentType, UpdateStages.WithVersion, UpdateStages.WithIgnoreErrors, UpdateStages.WithInitTimeout, UpdateStages.WithSecrets, UpdateStages.WithSecretStoreComponent, - UpdateStages.WithMetadata, UpdateStages.WithScopes, UpdateStages.WithServiceComponentBind { + UpdateStages.WithMetadata, UpdateStages.WithScopes { /** * Executes the update request. * @@ -429,20 +407,6 @@ interface WithScopes { */ Update withScopes(List scopes); } - - /** - * The stage of the DaprComponent update allowing to specify serviceComponentBind. - */ - interface WithServiceComponentBind { - /** - * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr - * component. - * - * @param serviceComponentBind List of container app services that are bound to the Dapr component. - * @return the next definition stage. - */ - Update withServiceComponentBind(List serviceComponentBind); - } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java deleted file mode 100644 index 5658db8005ad..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java +++ /dev/null @@ -1,174 +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.appcontainers.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 DaprComponentResiliencyPolicies. - */ -public interface DaprComponentResiliencyPolicies { - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, - String componentName); - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, String name, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy. - */ - DaprComponentResiliencyPolicy get(String resourceGroupName, String environmentName, String componentName, - String name); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String componentName, String name); - - /** - * Get a Dapr component resiliency policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - DaprComponentResiliencyPolicy getById(String id); - - /** - * Get a Dapr component resiliency policy. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprComponentResiliencyPolicy resource. - * - * @param name resource name. - * @return the first stage of the new DaprComponentResiliencyPolicy definition. - */ - DaprComponentResiliencyPolicy.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java deleted file mode 100644 index cc87807184db..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java +++ /dev/null @@ -1,126 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Component Resiliency Policies ARM resource. - */ -@Fluent -public final class DaprComponentResiliencyPoliciesCollection - implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DaprComponentResiliencyPoliciesCollection class. - */ - public DaprComponentResiliencyPoliciesCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the DaprComponentResiliencyPoliciesCollection object itself. - */ - public DaprComponentResiliencyPoliciesCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DaprComponentResiliencyPoliciesCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentResiliencyPoliciesCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPoliciesCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPoliciesCollection 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 DaprComponentResiliencyPoliciesCollection. - */ - public static DaprComponentResiliencyPoliciesCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPoliciesCollection deserializedDaprComponentResiliencyPoliciesCollection - = new DaprComponentResiliencyPoliciesCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DaprComponentResiliencyPolicyInner.fromJson(reader1)); - deserializedDaprComponentResiliencyPoliciesCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDaprComponentResiliencyPoliciesCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPoliciesCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java deleted file mode 100644 index a8322cfe73ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java +++ /dev/null @@ -1,224 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; - -/** - * An immutable client-side representation of DaprComponentResiliencyPolicy. - */ -public interface DaprComponentResiliencyPolicy { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @return the inboundPolicy value. - */ - DaprComponentResiliencyPolicyConfiguration inboundPolicy(); - - /** - * Gets the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @return the outboundPolicy value. - */ - DaprComponentResiliencyPolicyConfiguration outboundPolicy(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner object. - * - * @return the inner object. - */ - DaprComponentResiliencyPolicyInner innerModel(); - - /** - * The entirety of the DaprComponentResiliencyPolicy definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DaprComponentResiliencyPolicy definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DaprComponentResiliencyPolicy definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DaprComponentResiliencyPolicy definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName, componentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @return the next definition stage. - */ - WithCreate withExistingDaprComponent(String resourceGroupName, String environmentName, - String componentName); - } - - /** - * The stage of the DaprComponentResiliencyPolicy 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.WithInboundPolicy, DefinitionStages.WithOutboundPolicy { - /** - * Executes the create request. - * - * @return the created resource. - */ - DaprComponentResiliencyPolicy create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DaprComponentResiliencyPolicy create(Context context); - } - - /** - * The stage of the DaprComponentResiliencyPolicy definition allowing to specify inboundPolicy. - */ - interface WithInboundPolicy { - /** - * Specifies the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy The optional inbound component resiliency policy configuration. - * @return the next definition stage. - */ - WithCreate withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy); - } - - /** - * The stage of the DaprComponentResiliencyPolicy definition allowing to specify outboundPolicy. - */ - interface WithOutboundPolicy { - /** - * Specifies the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy The optional outbound component resiliency policy configuration. - * @return the next definition stage. - */ - WithCreate withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy); - } - } - - /** - * Begins update for the DaprComponentResiliencyPolicy resource. - * - * @return the stage of resource update. - */ - DaprComponentResiliencyPolicy.Update update(); - - /** - * The template for DaprComponentResiliencyPolicy update. - */ - interface Update extends UpdateStages.WithInboundPolicy, UpdateStages.WithOutboundPolicy { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DaprComponentResiliencyPolicy apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DaprComponentResiliencyPolicy apply(Context context); - } - - /** - * The DaprComponentResiliencyPolicy update stages. - */ - interface UpdateStages { - /** - * The stage of the DaprComponentResiliencyPolicy update allowing to specify inboundPolicy. - */ - interface WithInboundPolicy { - /** - * Specifies the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy The optional inbound component resiliency policy configuration. - * @return the next definition stage. - */ - Update withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy); - } - - /** - * The stage of the DaprComponentResiliencyPolicy update allowing to specify outboundPolicy. - */ - interface WithOutboundPolicy { - /** - * Specifies the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy The optional outbound component resiliency policy configuration. - * @return the next definition stage. - */ - Update withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DaprComponentResiliencyPolicy refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DaprComponentResiliencyPolicy refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java deleted file mode 100644 index d1e30673c559..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java +++ /dev/null @@ -1,164 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr Component Resiliency Policy Circuit Breaker Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - implements JsonSerializable { - /* - * The number of consecutive errors before the circuit is opened. - */ - private Integer consecutiveErrors; - - /* - * The interval in seconds until a retry attempt is made after the circuit is opened. - */ - private Integer timeoutInSeconds; - - /* - * The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If - * not specified, the timeoutInSeconds value will be used. - */ - private Integer intervalInSeconds; - - /** - * Creates an instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() { - } - - /** - * Get the consecutiveErrors property: The number of consecutive errors before the circuit is opened. - * - * @return the consecutiveErrors value. - */ - public Integer consecutiveErrors() { - return this.consecutiveErrors; - } - - /** - * Set the consecutiveErrors property: The number of consecutive errors before the circuit is opened. - * - * @param consecutiveErrors the consecutiveErrors value to set. - * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - withConsecutiveErrors(Integer consecutiveErrors) { - this.consecutiveErrors = consecutiveErrors; - return this; - } - - /** - * Get the timeoutInSeconds property: The interval in seconds until a retry attempt is made after the circuit is - * opened. - * - * @return the timeoutInSeconds value. - */ - public Integer timeoutInSeconds() { - return this.timeoutInSeconds; - } - - /** - * Set the timeoutInSeconds property: The interval in seconds until a retry attempt is made after the circuit is - * opened. - * - * @param timeoutInSeconds the timeoutInSeconds value to set. - * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - withTimeoutInSeconds(Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - return this; - } - - /** - * Get the intervalInSeconds property: The optional interval in seconds after which the error count resets to 0. An - * interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. - * - * @return the intervalInSeconds value. - */ - public Integer intervalInSeconds() { - return this.intervalInSeconds; - } - - /** - * Set the intervalInSeconds property: The optional interval in seconds after which the error count resets to 0. An - * interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. - * - * @param intervalInSeconds the intervalInSeconds value to set. - * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - withIntervalInSeconds(Integer intervalInSeconds) { - this.intervalInSeconds = intervalInSeconds; - 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.writeNumberField("consecutiveErrors", this.consecutiveErrors); - jsonWriter.writeNumberField("timeoutInSeconds", this.timeoutInSeconds); - jsonWriter.writeNumberField("intervalInSeconds", this.intervalInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration 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 - * DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("consecutiveErrors".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.consecutiveErrors - = reader.getNullable(JsonReader::getInt); - } else if ("timeoutInSeconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.timeoutInSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("intervalInSeconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.intervalInSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java deleted file mode 100644 index 3e83447dbee9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java +++ /dev/null @@ -1,166 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr Component Resiliency Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyConfiguration - implements JsonSerializable { - /* - * The optional HTTP retry policy configuration - */ - private DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy; - - /* - * The optional timeout policy configuration - */ - private DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy; - - /* - * The optional circuit breaker policy configuration - */ - private DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy; - - /** - * Creates an instance of DaprComponentResiliencyPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyConfiguration() { - } - - /** - * Get the httpRetryPolicy property: The optional HTTP retry policy configuration. - * - * @return the httpRetryPolicy value. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy() { - return this.httpRetryPolicy; - } - - /** - * Set the httpRetryPolicy property: The optional HTTP retry policy configuration. - * - * @param httpRetryPolicy the httpRetryPolicy value to set. - * @return the DaprComponentResiliencyPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyConfiguration - withHttpRetryPolicy(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy) { - this.httpRetryPolicy = httpRetryPolicy; - return this; - } - - /** - * Get the timeoutPolicy property: The optional timeout policy configuration. - * - * @return the timeoutPolicy value. - */ - public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy() { - return this.timeoutPolicy; - } - - /** - * Set the timeoutPolicy property: The optional timeout policy configuration. - * - * @param timeoutPolicy the timeoutPolicy value to set. - * @return the DaprComponentResiliencyPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyConfiguration - withTimeoutPolicy(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy) { - this.timeoutPolicy = timeoutPolicy; - return this; - } - - /** - * Get the circuitBreakerPolicy property: The optional circuit breaker policy configuration. - * - * @return the circuitBreakerPolicy value. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy() { - return this.circuitBreakerPolicy; - } - - /** - * Set the circuitBreakerPolicy property: The optional circuit breaker policy configuration. - * - * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. - * @return the DaprComponentResiliencyPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyConfiguration - withCircuitBreakerPolicy(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy) { - this.circuitBreakerPolicy = circuitBreakerPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpRetryPolicy() != null) { - httpRetryPolicy().validate(); - } - if (timeoutPolicy() != null) { - timeoutPolicy().validate(); - } - if (circuitBreakerPolicy() != null) { - circuitBreakerPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("httpRetryPolicy", this.httpRetryPolicy); - jsonWriter.writeJsonField("timeoutPolicy", this.timeoutPolicy); - jsonWriter.writeJsonField("circuitBreakerPolicy", this.circuitBreakerPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyConfiguration 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 DaprComponentResiliencyPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyConfiguration deserializedDaprComponentResiliencyPolicyConfiguration - = new DaprComponentResiliencyPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("httpRetryPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyConfiguration.httpRetryPolicy - = DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.fromJson(reader); - } else if ("timeoutPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyConfiguration.timeoutPolicy - = DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.fromJson(reader); - } else if ("circuitBreakerPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyConfiguration.circuitBreakerPolicy - = DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java deleted file mode 100644 index 5a8a3dfdbaf1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java +++ /dev/null @@ -1,133 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr Component Resiliency Policy HTTP Retry Backoff Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - implements JsonSerializable { - /* - * The optional initial delay in milliseconds before an operation is retried - */ - private Integer initialDelayInMilliseconds; - - /* - * The optional maximum time interval in milliseconds between retry attempts - */ - private Integer maxIntervalInMilliseconds; - - /** - * Creates an instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration class. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() { - } - - /** - * Get the initialDelayInMilliseconds property: The optional initial delay in milliseconds before an operation is - * retried. - * - * @return the initialDelayInMilliseconds value. - */ - public Integer initialDelayInMilliseconds() { - return this.initialDelayInMilliseconds; - } - - /** - * Set the initialDelayInMilliseconds property: The optional initial delay in milliseconds before an operation is - * retried. - * - * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - withInitialDelayInMilliseconds(Integer initialDelayInMilliseconds) { - this.initialDelayInMilliseconds = initialDelayInMilliseconds; - return this; - } - - /** - * Get the maxIntervalInMilliseconds property: The optional maximum time interval in milliseconds between retry - * attempts. - * - * @return the maxIntervalInMilliseconds value. - */ - public Integer maxIntervalInMilliseconds() { - return this.maxIntervalInMilliseconds; - } - - /** - * Set the maxIntervalInMilliseconds property: The optional maximum time interval in milliseconds between retry - * attempts. - * - * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - withMaxIntervalInMilliseconds(Integer maxIntervalInMilliseconds) { - this.maxIntervalInMilliseconds = maxIntervalInMilliseconds; - 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.writeNumberField("initialDelayInMilliseconds", this.initialDelayInMilliseconds); - jsonWriter.writeNumberField("maxIntervalInMilliseconds", this.maxIntervalInMilliseconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration 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 - * DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration. - */ - public static DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initialDelayInMilliseconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.initialDelayInMilliseconds - = reader.getNullable(JsonReader::getInt); - } else if ("maxIntervalInMilliseconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.maxIntervalInMilliseconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java deleted file mode 100644 index f88a92cdb674..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java +++ /dev/null @@ -1,131 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr Component Resiliency Policy HTTP Retry Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration - implements JsonSerializable { - /* - * The optional maximum number of retries - */ - private Integer maxRetries; - - /* - * The optional retry backoff configuration - */ - private DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff; - - /** - * Creates an instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration() { - } - - /** - * Get the maxRetries property: The optional maximum number of retries. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: The optional maximum number of retries. - * - * @param maxRetries the maxRetries value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the retryBackOff property: The optional retry backoff configuration. - * - * @return the retryBackOff value. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff() { - return this.retryBackOff; - } - - /** - * Set the retryBackOff property: The optional retry backoff configuration. - * - * @param retryBackOff the retryBackOff value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration - withRetryBackOff(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff) { - this.retryBackOff = retryBackOff; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retryBackOff() != null) { - retryBackOff().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxRetries", this.maxRetries); - jsonWriter.writeJsonField("retryBackOff", this.retryBackOff); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration 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 - * DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration - = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxRetries".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.maxRetries - = reader.getNullable(JsonReader::getInt); - } else if ("retryBackOff".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.retryBackOff - = DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java deleted file mode 100644 index c90caf2f86bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java +++ /dev/null @@ -1,98 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr Component Resiliency Policy Timeout Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyTimeoutPolicyConfiguration - implements JsonSerializable { - /* - * The optional response timeout in seconds - */ - private Integer responseTimeoutInSeconds; - - /** - * Creates an instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() { - } - - /** - * Get the responseTimeoutInSeconds property: The optional response timeout in seconds. - * - * @return the responseTimeoutInSeconds value. - */ - public Integer responseTimeoutInSeconds() { - return this.responseTimeoutInSeconds; - } - - /** - * Set the responseTimeoutInSeconds property: The optional response timeout in seconds. - * - * @param responseTimeoutInSeconds the responseTimeoutInSeconds value to set. - * @return the DaprComponentResiliencyPolicyTimeoutPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration - withResponseTimeoutInSeconds(Integer responseTimeoutInSeconds) { - this.responseTimeoutInSeconds = responseTimeoutInSeconds; - 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.writeNumberField("responseTimeoutInSeconds", this.responseTimeoutInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration 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 DaprComponentResiliencyPolicyTimeoutPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyTimeoutPolicyConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration deserializedDaprComponentResiliencyPolicyTimeoutPolicyConfiguration - = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("responseTimeoutInSeconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyTimeoutPolicyConfiguration.responseTimeoutInSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyTimeoutPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java deleted file mode 100644 index 0d4739a9d4f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java +++ /dev/null @@ -1,152 +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.appcontainers.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 java.io.IOException; - -/** - * Configuration to bind a Dapr Component to a dev ContainerApp Service. - */ -@Fluent -public final class DaprComponentServiceBinding implements JsonSerializable { - /* - * Name of the service bind - */ - private String name; - - /* - * Resource id of the target service - */ - private String serviceId; - - /* - * Service bind metadata - */ - private DaprServiceBindMetadata metadata; - - /** - * Creates an instance of DaprComponentServiceBinding class. - */ - public DaprComponentServiceBinding() { - } - - /** - * Get the name property: Name of the service bind. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the service bind. - * - * @param name the name value to set. - * @return the DaprComponentServiceBinding object itself. - */ - public DaprComponentServiceBinding withName(String name) { - this.name = name; - return this; - } - - /** - * Get the serviceId property: Resource id of the target service. - * - * @return the serviceId value. - */ - public String serviceId() { - return this.serviceId; - } - - /** - * Set the serviceId property: Resource id of the target service. - * - * @param serviceId the serviceId value to set. - * @return the DaprComponentServiceBinding object itself. - */ - public DaprComponentServiceBinding withServiceId(String serviceId) { - this.serviceId = serviceId; - return this; - } - - /** - * Get the metadata property: Service bind metadata. - * - * @return the metadata value. - */ - public DaprServiceBindMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Service bind metadata. - * - * @param metadata the metadata value to set. - * @return the DaprComponentServiceBinding object itself. - */ - public DaprComponentServiceBinding withMetadata(DaprServiceBindMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("serviceId", this.serviceId); - jsonWriter.writeJsonField("metadata", this.metadata); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentServiceBinding from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentServiceBinding 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 DaprComponentServiceBinding. - */ - public static DaprComponentServiceBinding fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentServiceBinding deserializedDaprComponentServiceBinding = new DaprComponentServiceBinding(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprComponentServiceBinding.name = reader.getString(); - } else if ("serviceId".equals(fieldName)) { - deserializedDaprComponentServiceBinding.serviceId = reader.getString(); - } else if ("metadata".equals(fieldName)) { - deserializedDaprComponentServiceBinding.metadata = DaprServiceBindMetadata.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentServiceBinding; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java deleted file mode 100644 index d273181362de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java +++ /dev/null @@ -1,121 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr component metadata. - */ -@Fluent -public final class DaprServiceBindMetadata implements JsonSerializable { - /* - * Service bind metadata property name. - */ - private String name; - - /* - * Service bind metadata property value. - */ - private String value; - - /** - * Creates an instance of DaprServiceBindMetadata class. - */ - public DaprServiceBindMetadata() { - } - - /** - * Get the name property: Service bind metadata property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Service bind metadata property name. - * - * @param name the name value to set. - * @return the DaprServiceBindMetadata object itself. - */ - public DaprServiceBindMetadata withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Service bind metadata property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Service bind metadata property value. - * - * @param value the value value to set. - * @return the DaprServiceBindMetadata object itself. - */ - public DaprServiceBindMetadata withValue(String value) { - this.value = value; - 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("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprServiceBindMetadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprServiceBindMetadata 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 DaprServiceBindMetadata. - */ - public static DaprServiceBindMetadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprServiceBindMetadata deserializedDaprServiceBindMetadata = new DaprServiceBindMetadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprServiceBindMetadata.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDaprServiceBindMetadata.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprServiceBindMetadata; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java deleted file mode 100644 index f5283e5b9ec8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java +++ /dev/null @@ -1,392 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of DaprSubscription. - */ -public interface DaprSubscription { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the pubsubName property: Dapr PubSub component name. - * - * @return the pubsubName value. - */ - String pubsubName(); - - /** - * Gets the topic property: Topic name. - * - * @return the topic value. - */ - String topic(); - - /** - * Gets the deadLetterTopic property: Deadletter topic name. - * - * @return the deadLetterTopic value. - */ - String deadLetterTopic(); - - /** - * Gets the routes property: Subscription routes. - * - * @return the routes value. - */ - DaprSubscriptionRoutes routes(); - - /** - * Gets the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @return the scopes value. - */ - List scopes(); - - /** - * Gets the metadata property: Subscription metadata. - * - * @return the metadata value. - */ - Map metadata(); - - /** - * Gets the bulkSubscribe property: Bulk subscription options. - * - * @return the bulkSubscribe value. - */ - DaprSubscriptionBulkSubscribeOptions bulkSubscribe(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner object. - * - * @return the inner object. - */ - DaprSubscriptionInner innerModel(); - - /** - * The entirety of the DaprSubscription definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DaprSubscription definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DaprSubscription definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DaprSubscription definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - - /** - * The stage of the DaprSubscription 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.WithPubsubName, DefinitionStages.WithTopic, - DefinitionStages.WithDeadLetterTopic, DefinitionStages.WithRoutes, DefinitionStages.WithScopes, - DefinitionStages.WithMetadata, DefinitionStages.WithBulkSubscribe { - /** - * Executes the create request. - * - * @return the created resource. - */ - DaprSubscription create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DaprSubscription create(Context context); - } - - /** - * The stage of the DaprSubscription definition allowing to specify pubsubName. - */ - interface WithPubsubName { - /** - * Specifies the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName Dapr PubSub component name. - * @return the next definition stage. - */ - WithCreate withPubsubName(String pubsubName); - } - - /** - * The stage of the DaprSubscription definition allowing to specify topic. - */ - interface WithTopic { - /** - * Specifies the topic property: Topic name. - * - * @param topic Topic name. - * @return the next definition stage. - */ - WithCreate withTopic(String topic); - } - - /** - * The stage of the DaprSubscription definition allowing to specify deadLetterTopic. - */ - interface WithDeadLetterTopic { - /** - * Specifies the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic Deadletter topic name. - * @return the next definition stage. - */ - WithCreate withDeadLetterTopic(String deadLetterTopic); - } - - /** - * The stage of the DaprSubscription definition allowing to specify routes. - */ - interface WithRoutes { - /** - * Specifies the routes property: Subscription routes. - * - * @param routes Subscription routes. - * @return the next definition stage. - */ - WithCreate withRoutes(DaprSubscriptionRoutes routes); - } - - /** - * The stage of the DaprSubscription definition allowing to specify scopes. - */ - interface WithScopes { - /** - * Specifies the scopes property: Application scopes to restrict the subscription to specific apps.. - * - * @param scopes Application scopes to restrict the subscription to specific apps. - * @return the next definition stage. - */ - WithCreate withScopes(List scopes); - } - - /** - * The stage of the DaprSubscription definition allowing to specify metadata. - */ - interface WithMetadata { - /** - * Specifies the metadata property: Subscription metadata. - * - * @param metadata Subscription metadata. - * @return the next definition stage. - */ - WithCreate withMetadata(Map metadata); - } - - /** - * The stage of the DaprSubscription definition allowing to specify bulkSubscribe. - */ - interface WithBulkSubscribe { - /** - * Specifies the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe Bulk subscription options. - * @return the next definition stage. - */ - WithCreate withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe); - } - } - - /** - * Begins update for the DaprSubscription resource. - * - * @return the stage of resource update. - */ - DaprSubscription.Update update(); - - /** - * The template for DaprSubscription update. - */ - interface Update extends UpdateStages.WithPubsubName, UpdateStages.WithTopic, UpdateStages.WithDeadLetterTopic, - UpdateStages.WithRoutes, UpdateStages.WithScopes, UpdateStages.WithMetadata, UpdateStages.WithBulkSubscribe { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DaprSubscription apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DaprSubscription apply(Context context); - } - - /** - * The DaprSubscription update stages. - */ - interface UpdateStages { - /** - * The stage of the DaprSubscription update allowing to specify pubsubName. - */ - interface WithPubsubName { - /** - * Specifies the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName Dapr PubSub component name. - * @return the next definition stage. - */ - Update withPubsubName(String pubsubName); - } - - /** - * The stage of the DaprSubscription update allowing to specify topic. - */ - interface WithTopic { - /** - * Specifies the topic property: Topic name. - * - * @param topic Topic name. - * @return the next definition stage. - */ - Update withTopic(String topic); - } - - /** - * The stage of the DaprSubscription update allowing to specify deadLetterTopic. - */ - interface WithDeadLetterTopic { - /** - * Specifies the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic Deadletter topic name. - * @return the next definition stage. - */ - Update withDeadLetterTopic(String deadLetterTopic); - } - - /** - * The stage of the DaprSubscription update allowing to specify routes. - */ - interface WithRoutes { - /** - * Specifies the routes property: Subscription routes. - * - * @param routes Subscription routes. - * @return the next definition stage. - */ - Update withRoutes(DaprSubscriptionRoutes routes); - } - - /** - * The stage of the DaprSubscription update allowing to specify scopes. - */ - interface WithScopes { - /** - * Specifies the scopes property: Application scopes to restrict the subscription to specific apps.. - * - * @param scopes Application scopes to restrict the subscription to specific apps. - * @return the next definition stage. - */ - Update withScopes(List scopes); - } - - /** - * The stage of the DaprSubscription update allowing to specify metadata. - */ - interface WithMetadata { - /** - * Specifies the metadata property: Subscription metadata. - * - * @param metadata Subscription metadata. - * @return the next definition stage. - */ - Update withMetadata(Map metadata); - } - - /** - * The stage of the DaprSubscription update allowing to specify bulkSubscribe. - */ - interface WithBulkSubscribe { - /** - * Specifies the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe Bulk subscription options. - * @return the next definition stage. - */ - Update withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DaprSubscription refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DaprSubscription refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java deleted file mode 100644 index 2359c554ab54..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java +++ /dev/null @@ -1,156 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr PubSub Bulk Subscription Options. - */ -@Fluent -public final class DaprSubscriptionBulkSubscribeOptions - implements JsonSerializable { - /* - * Enable bulk subscription - */ - private Boolean enabled; - - /* - * Maximum number of messages to deliver in a bulk message. - */ - private Integer maxMessagesCount; - - /* - * Maximum duration in milliseconds to wait before a bulk message is sent to the app. - */ - private Integer maxAwaitDurationMs; - - /** - * Creates an instance of DaprSubscriptionBulkSubscribeOptions class. - */ - public DaprSubscriptionBulkSubscribeOptions() { - } - - /** - * Get the enabled property: Enable bulk subscription. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Enable bulk subscription. - * - * @param enabled the enabled value to set. - * @return the DaprSubscriptionBulkSubscribeOptions object itself. - */ - public DaprSubscriptionBulkSubscribeOptions withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the maxMessagesCount property: Maximum number of messages to deliver in a bulk message. - * - * @return the maxMessagesCount value. - */ - public Integer maxMessagesCount() { - return this.maxMessagesCount; - } - - /** - * Set the maxMessagesCount property: Maximum number of messages to deliver in a bulk message. - * - * @param maxMessagesCount the maxMessagesCount value to set. - * @return the DaprSubscriptionBulkSubscribeOptions object itself. - */ - public DaprSubscriptionBulkSubscribeOptions withMaxMessagesCount(Integer maxMessagesCount) { - this.maxMessagesCount = maxMessagesCount; - return this; - } - - /** - * Get the maxAwaitDurationMs property: Maximum duration in milliseconds to wait before a bulk message is sent to - * the app. - * - * @return the maxAwaitDurationMs value. - */ - public Integer maxAwaitDurationMs() { - return this.maxAwaitDurationMs; - } - - /** - * Set the maxAwaitDurationMs property: Maximum duration in milliseconds to wait before a bulk message is sent to - * the app. - * - * @param maxAwaitDurationMs the maxAwaitDurationMs value to set. - * @return the DaprSubscriptionBulkSubscribeOptions object itself. - */ - public DaprSubscriptionBulkSubscribeOptions withMaxAwaitDurationMs(Integer maxAwaitDurationMs) { - this.maxAwaitDurationMs = maxAwaitDurationMs; - 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.writeBooleanField("enabled", this.enabled); - jsonWriter.writeNumberField("maxMessagesCount", this.maxMessagesCount); - jsonWriter.writeNumberField("maxAwaitDurationMs", this.maxAwaitDurationMs); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionBulkSubscribeOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionBulkSubscribeOptions 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 DaprSubscriptionBulkSubscribeOptions. - */ - public static DaprSubscriptionBulkSubscribeOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionBulkSubscribeOptions deserializedDaprSubscriptionBulkSubscribeOptions - = new DaprSubscriptionBulkSubscribeOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedDaprSubscriptionBulkSubscribeOptions.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("maxMessagesCount".equals(fieldName)) { - deserializedDaprSubscriptionBulkSubscribeOptions.maxMessagesCount - = reader.getNullable(JsonReader::getInt); - } else if ("maxAwaitDurationMs".equals(fieldName)) { - deserializedDaprSubscriptionBulkSubscribeOptions.maxAwaitDurationMs - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionBulkSubscribeOptions; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java deleted file mode 100644 index 6b18d09b436f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java +++ /dev/null @@ -1,127 +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.appcontainers.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 java.io.IOException; - -/** - * Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path. - */ -@Fluent -public final class DaprSubscriptionRouteRule implements JsonSerializable { - /* - * The optional CEL expression used to match the event. If the match is not specified, then the route is considered - * the default. The rules are tested in the order specified, so they should be define from most-to-least specific. - * The default route should appear last in the list. - */ - private String match; - - /* - * The path for events that match this rule - */ - private String path; - - /** - * Creates an instance of DaprSubscriptionRouteRule class. - */ - public DaprSubscriptionRouteRule() { - } - - /** - * Get the match property: The optional CEL expression used to match the event. If the match is not specified, then - * the route is considered the default. The rules are tested in the order specified, so they should be define from - * most-to-least specific. The default route should appear last in the list. - * - * @return the match value. - */ - public String match() { - return this.match; - } - - /** - * Set the match property: The optional CEL expression used to match the event. If the match is not specified, then - * the route is considered the default. The rules are tested in the order specified, so they should be define from - * most-to-least specific. The default route should appear last in the list. - * - * @param match the match value to set. - * @return the DaprSubscriptionRouteRule object itself. - */ - public DaprSubscriptionRouteRule withMatch(String match) { - this.match = match; - return this; - } - - /** - * Get the path property: The path for events that match this rule. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path for events that match this rule. - * - * @param path the path value to set. - * @return the DaprSubscriptionRouteRule object itself. - */ - public DaprSubscriptionRouteRule withPath(String path) { - this.path = path; - 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("match", this.match); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionRouteRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionRouteRule 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 DaprSubscriptionRouteRule. - */ - public static DaprSubscriptionRouteRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionRouteRule deserializedDaprSubscriptionRouteRule = new DaprSubscriptionRouteRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("match".equals(fieldName)) { - deserializedDaprSubscriptionRouteRule.match = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedDaprSubscriptionRouteRule.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionRouteRule; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java deleted file mode 100644 index 8e8e43b7e9f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java +++ /dev/null @@ -1,127 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Dapr PubSub Event Subscription Routes configuration. - */ -@Fluent -public final class DaprSubscriptionRoutes implements JsonSerializable { - /* - * The list of Dapr PubSub Event Subscription Route Rules. - */ - private List rules; - - /* - * The default path to deliver events that do not match any of the rules. - */ - private String defaultProperty; - - /** - * Creates an instance of DaprSubscriptionRoutes class. - */ - public DaprSubscriptionRoutes() { - } - - /** - * Get the rules property: The list of Dapr PubSub Event Subscription Route Rules. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: The list of Dapr PubSub Event Subscription Route Rules. - * - * @param rules the rules value to set. - * @return the DaprSubscriptionRoutes object itself. - */ - public DaprSubscriptionRoutes withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Get the defaultProperty property: The default path to deliver events that do not match any of the rules. - * - * @return the defaultProperty value. - */ - public String defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: The default path to deliver events that do not match any of the rules. - * - * @param defaultProperty the defaultProperty value to set. - * @return the DaprSubscriptionRoutes object itself. - */ - public DaprSubscriptionRoutes withDefaultProperty(String defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("default", this.defaultProperty); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionRoutes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionRoutes 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 DaprSubscriptionRoutes. - */ - public static DaprSubscriptionRoutes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionRoutes deserializedDaprSubscriptionRoutes = new DaprSubscriptionRoutes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rules".equals(fieldName)) { - List rules - = reader.readArray(reader1 -> DaprSubscriptionRouteRule.fromJson(reader1)); - deserializedDaprSubscriptionRoutes.rules = rules; - } else if ("default".equals(fieldName)) { - deserializedDaprSubscriptionRoutes.defaultProperty = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionRoutes; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java deleted file mode 100644 index a7cc8cc87f40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java +++ /dev/null @@ -1,164 +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.appcontainers.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 DaprSubscriptions. - */ -public interface DaprSubscriptions { - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr subscriptions for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription. - */ - DaprSubscription get(String resourceGroupName, String environmentName, String name); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String name, Context context); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 environmentName, String name); - - /** - * Get a dapr subscription. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - DaprSubscription getById(String id); - - /** - * Get a dapr subscription. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprSubscription resource. - * - * @param name resource name. - * @return the first stage of the new DaprSubscription definition. - */ - DaprSubscription.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java deleted file mode 100644 index 5149087ecbb8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java +++ /dev/null @@ -1,124 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Subscriptions ARM resource. - */ -@Fluent -public final class DaprSubscriptionsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DaprSubscriptionsCollection class. - */ - public DaprSubscriptionsCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the DaprSubscriptionsCollection object itself. - */ - public DaprSubscriptionsCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DaprSubscriptionsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprSubscriptionsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionsCollection 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 DaprSubscriptionsCollection. - */ - public static DaprSubscriptionsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionsCollection deserializedDaprSubscriptionsCollection = new DaprSubscriptionsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DaprSubscriptionInner.fromJson(reader1)); - deserializedDaprSubscriptionsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDaprSubscriptionsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java deleted file mode 100644 index 169088edbdcd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java +++ /dev/null @@ -1,121 +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.appcontainers.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 java.io.IOException; - -/** - * Configuration of datadog. - */ -@Fluent -public final class DataDogConfiguration implements JsonSerializable { - /* - * The data dog site - */ - private String site; - - /* - * The data dog api key - */ - private String key; - - /** - * Creates an instance of DataDogConfiguration class. - */ - public DataDogConfiguration() { - } - - /** - * Get the site property: The data dog site. - * - * @return the site value. - */ - public String site() { - return this.site; - } - - /** - * Set the site property: The data dog site. - * - * @param site the site value to set. - * @return the DataDogConfiguration object itself. - */ - public DataDogConfiguration withSite(String site) { - this.site = site; - return this; - } - - /** - * Get the key property: The data dog api key. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The data dog api key. - * - * @param key the key value to set. - * @return the DataDogConfiguration object itself. - */ - public DataDogConfiguration withKey(String key) { - this.key = key; - 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("site", this.site); - jsonWriter.writeStringField("key", this.key); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataDogConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataDogConfiguration 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 DataDogConfiguration. - */ - public static DataDogConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataDogConfiguration deserializedDataDogConfiguration = new DataDogConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("site".equals(fieldName)) { - deserializedDataDogConfiguration.site = reader.getString(); - } else if ("key".equals(fieldName)) { - deserializedDataDogConfiguration.key = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataDogConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java deleted file mode 100644 index d79de70647ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java +++ /dev/null @@ -1,131 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry destinations. - */ -@Fluent -public final class DestinationsConfiguration implements JsonSerializable { - /* - * Open telemetry datadog destination configuration - */ - private DataDogConfiguration dataDogConfiguration; - - /* - * Open telemetry otlp configurations - */ - private List otlpConfigurations; - - /** - * Creates an instance of DestinationsConfiguration class. - */ - public DestinationsConfiguration() { - } - - /** - * Get the dataDogConfiguration property: Open telemetry datadog destination configuration. - * - * @return the dataDogConfiguration value. - */ - public DataDogConfiguration dataDogConfiguration() { - return this.dataDogConfiguration; - } - - /** - * Set the dataDogConfiguration property: Open telemetry datadog destination configuration. - * - * @param dataDogConfiguration the dataDogConfiguration value to set. - * @return the DestinationsConfiguration object itself. - */ - public DestinationsConfiguration withDataDogConfiguration(DataDogConfiguration dataDogConfiguration) { - this.dataDogConfiguration = dataDogConfiguration; - return this; - } - - /** - * Get the otlpConfigurations property: Open telemetry otlp configurations. - * - * @return the otlpConfigurations value. - */ - public List otlpConfigurations() { - return this.otlpConfigurations; - } - - /** - * Set the otlpConfigurations property: Open telemetry otlp configurations. - * - * @param otlpConfigurations the otlpConfigurations value to set. - * @return the DestinationsConfiguration object itself. - */ - public DestinationsConfiguration withOtlpConfigurations(List otlpConfigurations) { - this.otlpConfigurations = otlpConfigurations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataDogConfiguration() != null) { - dataDogConfiguration().validate(); - } - if (otlpConfigurations() != null) { - otlpConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("dataDogConfiguration", this.dataDogConfiguration); - jsonWriter.writeArrayField("otlpConfigurations", this.otlpConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DestinationsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DestinationsConfiguration 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 DestinationsConfiguration. - */ - public static DestinationsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DestinationsConfiguration deserializedDestinationsConfiguration = new DestinationsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataDogConfiguration".equals(fieldName)) { - deserializedDestinationsConfiguration.dataDogConfiguration = DataDogConfiguration.fromJson(reader); - } else if ("otlpConfigurations".equals(fieldName)) { - List otlpConfigurations - = reader.readArray(reader1 -> OtlpConfiguration.fromJson(reader1)); - deserializedDestinationsConfiguration.otlpConfigurations = otlpConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedDestinationsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java deleted file mode 100644 index 8b203aaede5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java +++ /dev/null @@ -1,56 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of the patch detection. - */ -public final class DetectionStatus extends ExpandableStringEnum { - /** - * Static value Succeeded for DetectionStatus. - */ - public static final DetectionStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value RegistryLoginFailed for DetectionStatus. - */ - public static final DetectionStatus REGISTRY_LOGIN_FAILED = fromString("RegistryLoginFailed"); - - /** - * Static value Failed for DetectionStatus. - */ - public static final DetectionStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of DetectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DetectionStatus() { - } - - /** - * Creates or finds a DetectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DetectionStatus. - */ - public static DetectionStatus fromString(String name) { - return fromString(name, DetectionStatus.class); - } - - /** - * Gets known DetectionStatus values. - * - * @return known DetectionStatus values. - */ - public static Collection values() { - return values(DetectionStatus.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java deleted file mode 100644 index 6b1f7daa5772..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java +++ /dev/null @@ -1,265 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import java.util.List; - -/** - * An immutable client-side representation of DotNetComponent. - */ -public interface DotNetComponent { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the componentType property: Type of the .NET Component. - * - * @return the componentType value. - */ - DotNetComponentType componentType(); - - /** - * Gets the provisioningState property: Provisioning state of the .NET Component. - * - * @return the provisioningState value. - */ - DotNetComponentProvisioningState provisioningState(); - - /** - * Gets the configurations property: List of .NET Components configuration properties. - * - * @return the configurations value. - */ - List configurations(); - - /** - * Gets the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @return the serviceBinds value. - */ - List serviceBinds(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner object. - * - * @return the inner object. - */ - DotNetComponentInner innerModel(); - - /** - * The entirety of the DotNetComponent definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DotNetComponent definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DotNetComponent definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DotNetComponent definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - - /** - * The stage of the DotNetComponent 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.WithComponentType, DefinitionStages.WithConfigurations, - DefinitionStages.WithServiceBinds { - /** - * Executes the create request. - * - * @return the created resource. - */ - DotNetComponent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DotNetComponent create(Context context); - } - - /** - * The stage of the DotNetComponent definition allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the .NET Component.. - * - * @param componentType Type of the .NET Component. - * @return the next definition stage. - */ - WithCreate withComponentType(DotNetComponentType componentType); - } - - /** - * The stage of the DotNetComponent definition allowing to specify configurations. - */ - interface WithConfigurations { - /** - * Specifies the configurations property: List of .NET Components configuration properties. - * - * @param configurations List of .NET Components configuration properties. - * @return the next definition stage. - */ - WithCreate withConfigurations(List configurations); - } - - /** - * The stage of the DotNetComponent definition allowing to specify serviceBinds. - */ - interface WithServiceBinds { - /** - * Specifies the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds List of .NET Components that are bound to the .NET component. - * @return the next definition stage. - */ - WithCreate withServiceBinds(List serviceBinds); - } - } - - /** - * Begins update for the DotNetComponent resource. - * - * @return the stage of resource update. - */ - DotNetComponent.Update update(); - - /** - * The template for DotNetComponent update. - */ - interface Update - extends UpdateStages.WithComponentType, UpdateStages.WithConfigurations, UpdateStages.WithServiceBinds { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DotNetComponent apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DotNetComponent apply(Context context); - } - - /** - * The DotNetComponent update stages. - */ - interface UpdateStages { - /** - * The stage of the DotNetComponent update allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the .NET Component.. - * - * @param componentType Type of the .NET Component. - * @return the next definition stage. - */ - Update withComponentType(DotNetComponentType componentType); - } - - /** - * The stage of the DotNetComponent update allowing to specify configurations. - */ - interface WithConfigurations { - /** - * Specifies the configurations property: List of .NET Components configuration properties. - * - * @param configurations List of .NET Components configuration properties. - * @return the next definition stage. - */ - Update withConfigurations(List configurations); - } - - /** - * The stage of the DotNetComponent update allowing to specify serviceBinds. - */ - interface WithServiceBinds { - /** - * Specifies the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds List of .NET Components that are bound to the .NET component. - * @return the next definition stage. - */ - Update withServiceBinds(List serviceBinds); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DotNetComponent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DotNetComponent refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java deleted file mode 100644 index 467ae1e04d6a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java +++ /dev/null @@ -1,123 +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.appcontainers.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 java.io.IOException; - -/** - * Configuration properties for a .NET Component. - */ -@Fluent -public final class DotNetComponentConfigurationProperty - implements JsonSerializable { - /* - * The name of the property - */ - private String propertyName; - - /* - * The value of the property - */ - private String value; - - /** - * Creates an instance of DotNetComponentConfigurationProperty class. - */ - public DotNetComponentConfigurationProperty() { - } - - /** - * Get the propertyName property: The name of the property. - * - * @return the propertyName value. - */ - public String propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The name of the property. - * - * @param propertyName the propertyName value to set. - * @return the DotNetComponentConfigurationProperty object itself. - */ - public DotNetComponentConfigurationProperty withPropertyName(String propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the value property: The value of the property. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of the property. - * - * @param value the value value to set. - * @return the DotNetComponentConfigurationProperty object itself. - */ - public DotNetComponentConfigurationProperty withValue(String value) { - this.value = value; - 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("propertyName", this.propertyName); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentConfigurationProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentConfigurationProperty 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 DotNetComponentConfigurationProperty. - */ - public static DotNetComponentConfigurationProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentConfigurationProperty deserializedDotNetComponentConfigurationProperty - = new DotNetComponentConfigurationProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("propertyName".equals(fieldName)) { - deserializedDotNetComponentConfigurationProperty.propertyName = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDotNetComponentConfigurationProperty.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentConfigurationProperty; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java deleted file mode 100644 index e192894c00c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java +++ /dev/null @@ -1,66 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the .NET Component. - */ -public final class DotNetComponentProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value InProgress for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** - * Creates a new instance of DotNetComponentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DotNetComponentProvisioningState() { - } - - /** - * Creates or finds a DotNetComponentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DotNetComponentProvisioningState. - */ - public static DotNetComponentProvisioningState fromString(String name) { - return fromString(name, DotNetComponentProvisioningState.class); - } - - /** - * Gets known DotNetComponentProvisioningState values. - * - * @return known DotNetComponentProvisioningState values. - */ - public static Collection values() { - return values(DotNetComponentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java deleted file mode 100644 index 0f9a7ff68eff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java +++ /dev/null @@ -1,121 +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.appcontainers.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 java.io.IOException; - -/** - * Configuration to bind a .NET Component to another .NET Component. - */ -@Fluent -public final class DotNetComponentServiceBind implements JsonSerializable { - /* - * Name of the service bind - */ - private String name; - - /* - * Resource id of the target service - */ - private String serviceId; - - /** - * Creates an instance of DotNetComponentServiceBind class. - */ - public DotNetComponentServiceBind() { - } - - /** - * Get the name property: Name of the service bind. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the service bind. - * - * @param name the name value to set. - * @return the DotNetComponentServiceBind object itself. - */ - public DotNetComponentServiceBind withName(String name) { - this.name = name; - return this; - } - - /** - * Get the serviceId property: Resource id of the target service. - * - * @return the serviceId value. - */ - public String serviceId() { - return this.serviceId; - } - - /** - * Set the serviceId property: Resource id of the target service. - * - * @param serviceId the serviceId value to set. - * @return the DotNetComponentServiceBind object itself. - */ - public DotNetComponentServiceBind withServiceId(String serviceId) { - this.serviceId = serviceId; - 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("name", this.name); - jsonWriter.writeStringField("serviceId", this.serviceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentServiceBind from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentServiceBind 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 DotNetComponentServiceBind. - */ - public static DotNetComponentServiceBind fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentServiceBind deserializedDotNetComponentServiceBind = new DotNetComponentServiceBind(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDotNetComponentServiceBind.name = reader.getString(); - } else if ("serviceId".equals(fieldName)) { - deserializedDotNetComponentServiceBind.serviceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentServiceBind; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java deleted file mode 100644 index 2a317ac4d3c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java +++ /dev/null @@ -1,46 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the .NET Component. - */ -public final class DotNetComponentType extends ExpandableStringEnum { - /** - * Static value AspireDashboard for DotNetComponentType. - */ - public static final DotNetComponentType ASPIRE_DASHBOARD = fromString("AspireDashboard"); - - /** - * Creates a new instance of DotNetComponentType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DotNetComponentType() { - } - - /** - * Creates or finds a DotNetComponentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DotNetComponentType. - */ - public static DotNetComponentType fromString(String name) { - return fromString(name, DotNetComponentType.class); - } - - /** - * Gets known DotNetComponentType values. - * - * @return known DotNetComponentType values. - */ - public static Collection values() { - return values(DotNetComponentType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java deleted file mode 100644 index 18177c70e586..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java +++ /dev/null @@ -1,144 +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.appcontainers.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 DotNetComponents. - */ -public interface DotNetComponents { - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the .NET Components for a managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 a .NET Component along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 a .NET Component. - */ - DotNetComponent get(String resourceGroupName, String environmentName, String name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @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 environmentName, String name, Context context); - - /** - * Get a .NET Component. - * - * @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 a .NET Component along with {@link Response}. - */ - DotNetComponent getById(String id); - - /** - * Get a .NET Component. - * - * @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 a .NET Component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a .NET Component. - * - * @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); - - /** - * Delete a .NET Component. - * - * @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 DotNetComponent resource. - * - * @param name resource name. - * @return the first stage of the new DotNetComponent definition. - */ - DotNetComponent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java deleted file mode 100644 index 15ad8913eeff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java +++ /dev/null @@ -1,124 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import java.io.IOException; -import java.util.List; - -/** - * .NET Components ARM resource. - */ -@Fluent -public final class DotNetComponentsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DotNetComponentsCollection class. - */ - public DotNetComponentsCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the DotNetComponentsCollection object itself. - */ - public DotNetComponentsCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model DotNetComponentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DotNetComponentsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentsCollection 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 DotNetComponentsCollection. - */ - public static DotNetComponentsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentsCollection deserializedDotNetComponentsCollection = new DotNetComponentsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DotNetComponentInner.fromJson(reader1)); - deserializedDotNetComponentsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDotNetComponentsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java index 2aa2b808a776..477c946d64b0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java @@ -17,14 +17,9 @@ @Fluent public final class DynamicPoolConfiguration implements JsonSerializable { /* - * The execution type of the session pool. + * The lifecycle configuration of a session in the dynamic session pool */ - private ExecutionType executionType; - - /* - * The cooldown period of a session in seconds. - */ - private Integer cooldownPeriodInSeconds; + private LifecycleConfiguration lifecycleConfiguration; /** * Creates an instance of DynamicPoolConfiguration class. @@ -33,42 +28,22 @@ public DynamicPoolConfiguration() { } /** - * Get the executionType property: The execution type of the session pool. - * - * @return the executionType value. - */ - public ExecutionType executionType() { - return this.executionType; - } - - /** - * Set the executionType property: The execution type of the session pool. - * - * @param executionType the executionType value to set. - * @return the DynamicPoolConfiguration object itself. - */ - public DynamicPoolConfiguration withExecutionType(ExecutionType executionType) { - this.executionType = executionType; - return this; - } - - /** - * Get the cooldownPeriodInSeconds property: The cooldown period of a session in seconds. + * Get the lifecycleConfiguration property: The lifecycle configuration of a session in the dynamic session pool. * - * @return the cooldownPeriodInSeconds value. + * @return the lifecycleConfiguration value. */ - public Integer cooldownPeriodInSeconds() { - return this.cooldownPeriodInSeconds; + public LifecycleConfiguration lifecycleConfiguration() { + return this.lifecycleConfiguration; } /** - * Set the cooldownPeriodInSeconds property: The cooldown period of a session in seconds. + * Set the lifecycleConfiguration property: The lifecycle configuration of a session in the dynamic session pool. * - * @param cooldownPeriodInSeconds the cooldownPeriodInSeconds value to set. + * @param lifecycleConfiguration the lifecycleConfiguration value to set. * @return the DynamicPoolConfiguration object itself. */ - public DynamicPoolConfiguration withCooldownPeriodInSeconds(Integer cooldownPeriodInSeconds) { - this.cooldownPeriodInSeconds = cooldownPeriodInSeconds; + public DynamicPoolConfiguration withLifecycleConfiguration(LifecycleConfiguration lifecycleConfiguration) { + this.lifecycleConfiguration = lifecycleConfiguration; return this; } @@ -78,6 +53,9 @@ public DynamicPoolConfiguration withCooldownPeriodInSeconds(Integer cooldownPeri * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (lifecycleConfiguration() != null) { + lifecycleConfiguration().validate(); + } } /** @@ -86,8 +64,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("executionType", this.executionType == null ? null : this.executionType.toString()); - jsonWriter.writeNumberField("cooldownPeriodInSeconds", this.cooldownPeriodInSeconds); + jsonWriter.writeJsonField("lifecycleConfiguration", this.lifecycleConfiguration); return jsonWriter.writeEndObject(); } @@ -106,11 +83,9 @@ public static DynamicPoolConfiguration fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("executionType".equals(fieldName)) { - deserializedDynamicPoolConfiguration.executionType = ExecutionType.fromString(reader.getString()); - } else if ("cooldownPeriodInSeconds".equals(fieldName)) { - deserializedDynamicPoolConfiguration.cooldownPeriodInSeconds - = reader.getNullable(JsonReader::getInt); + if ("lifecycleConfiguration".equals(fieldName)) { + deserializedDynamicPoolConfiguration.lifecycleConfiguration + = LifecycleConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java deleted file mode 100644 index c4701b917d05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java +++ /dev/null @@ -1,133 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model representing an environment variable. - */ -@Fluent -public final class EnvironmentVariable implements JsonSerializable { - /* - * Environment variable name. - */ - private String name; - - /* - * Environment variable value. - */ - private String value; - - /** - * Creates an instance of EnvironmentVariable class. - */ - public EnvironmentVariable() { - } - - /** - * Get the name property: Environment variable name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Environment variable name. - * - * @param name the name value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Environment variable value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Environment variable value. - * - * @param value the value value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withValue(String value) { - this.value = value; - 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 EnvironmentVariable")); - } - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVariable.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVariable from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVariable 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 EnvironmentVariable. - */ - public static EnvironmentVariable fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVariable deserializedEnvironmentVariable = new EnvironmentVariable(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedEnvironmentVariable.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedEnvironmentVariable.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentVariable; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java deleted file mode 100644 index cae94ab237ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java +++ /dev/null @@ -1,299 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Body of the error response returned from the API. - */ -@Fluent -public final class ErrorEntity implements JsonSerializable { - /* - * Type of error. - */ - private String extendedCode; - - /* - * Message template. - */ - private String messageTemplate; - - /* - * Parameters for the template. - */ - private List parameters; - - /* - * Inner errors. - */ - private List innerErrors; - - /* - * Error Details. - */ - private List details; - - /* - * The error target. - */ - private String target; - - /* - * Basic error code. - */ - private String code; - - /* - * Any details of the error. - */ - private String message; - - /** - * Creates an instance of ErrorEntity class. - */ - public ErrorEntity() { - } - - /** - * Get the extendedCode property: Type of error. - * - * @return the extendedCode value. - */ - public String extendedCode() { - return this.extendedCode; - } - - /** - * Set the extendedCode property: Type of error. - * - * @param extendedCode the extendedCode value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withExtendedCode(String extendedCode) { - this.extendedCode = extendedCode; - return this; - } - - /** - * Get the messageTemplate property: Message template. - * - * @return the messageTemplate value. - */ - public String messageTemplate() { - return this.messageTemplate; - } - - /** - * Set the messageTemplate property: Message template. - * - * @param messageTemplate the messageTemplate value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withMessageTemplate(String messageTemplate) { - this.messageTemplate = messageTemplate; - return this; - } - - /** - * Get the parameters property: Parameters for the template. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Parameters for the template. - * - * @param parameters the parameters value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the innerErrors property: Inner errors. - * - * @return the innerErrors value. - */ - public List innerErrors() { - return this.innerErrors; - } - - /** - * Set the innerErrors property: Inner errors. - * - * @param innerErrors the innerErrors value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withInnerErrors(List innerErrors) { - this.innerErrors = innerErrors; - return this; - } - - /** - * Get the details property: Error Details. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: Error Details. - * - * @param details the details value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withDetails(List details) { - this.details = details; - return this; - } - - /** - * Get the target property: The error target. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The error target. - * - * @param target the target value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the code property: Basic error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: Basic error code. - * - * @param code the code value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: Any details of the error. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Any details of the error. - * - * @param message the message value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerErrors() != null) { - innerErrors().forEach(e -> e.validate()); - } - if (details() != null) { - details().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("extendedCode", this.extendedCode); - jsonWriter.writeStringField("messageTemplate", this.messageTemplate); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("innerErrors", this.innerErrors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("target", this.target); - jsonWriter.writeStringField("code", this.code); - jsonWriter.writeStringField("message", this.message); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ErrorEntity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ErrorEntity 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 ErrorEntity. - */ - public static ErrorEntity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ErrorEntity deserializedErrorEntity = new ErrorEntity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("extendedCode".equals(fieldName)) { - deserializedErrorEntity.extendedCode = reader.getString(); - } else if ("messageTemplate".equals(fieldName)) { - deserializedErrorEntity.messageTemplate = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters = reader.readArray(reader1 -> reader1.getString()); - deserializedErrorEntity.parameters = parameters; - } else if ("innerErrors".equals(fieldName)) { - List innerErrors = reader.readArray(reader1 -> ErrorEntity.fromJson(reader1)); - deserializedErrorEntity.innerErrors = innerErrors; - } else if ("details".equals(fieldName)) { - List details = reader.readArray(reader1 -> ErrorEntity.fromJson(reader1)); - deserializedErrorEntity.details = details; - } else if ("target".equals(fieldName)) { - deserializedErrorEntity.target = reader.getString(); - } else if ("code".equals(fieldName)) { - deserializedErrorEntity.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedErrorEntity.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedErrorEntity; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java deleted file mode 100644 index 35e1d2d7c639..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java +++ /dev/null @@ -1,99 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Container Apps Job execution status. - */ -@Fluent -public final class ExecutionStatus implements JsonSerializable { - /* - * Replicas in the execution. - */ - private List replicas; - - /** - * Creates an instance of ExecutionStatus class. - */ - public ExecutionStatus() { - } - - /** - * Get the replicas property: Replicas in the execution. - * - * @return the replicas value. - */ - public List replicas() { - return this.replicas; - } - - /** - * Set the replicas property: Replicas in the execution. - * - * @param replicas the replicas value to set. - * @return the ExecutionStatus object itself. - */ - public ExecutionStatus withReplicas(List replicas) { - this.replicas = replicas; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (replicas() != null) { - replicas().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("replicas", this.replicas, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExecutionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExecutionStatus 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 ExecutionStatus. - */ - public static ExecutionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExecutionStatus deserializedExecutionStatus = new ExecutionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("replicas".equals(fieldName)) { - List replicas - = reader.readArray(reader1 -> ReplicaExecutionStatus.fromJson(reader1)); - deserializedExecutionStatus.replicas = replicas; - } else { - reader.skipChildren(); - } - } - - return deserializedExecutionStatus; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java deleted file mode 100644 index bfa282dff6a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java +++ /dev/null @@ -1,46 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The execution type of the session pool. - */ -public final class ExecutionType extends ExpandableStringEnum { - /** - * Static value Timed for ExecutionType. - */ - public static final ExecutionType TIMED = fromString("Timed"); - - /** - * Creates a new instance of ExecutionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExecutionType() { - } - - /** - * Creates or finds a ExecutionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExecutionType. - */ - public static ExecutionType fromString(String name) { - return fromString(name, ExecutionType.class); - } - - /** - * Gets known ExecutionType values. - * - * @return known ExecutionType values. - */ - public static Collection values() { - return values(ExecutionType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java deleted file mode 100644 index 3a5584b9d59a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java +++ /dev/null @@ -1,46 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of FunctionsExtensions. - */ -public interface FunctionsExtensions { - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String functionAppName, Context context); - - /** - * Proxies a Functions host call to the function app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param revisionName Name of the Container App Revision, the parent resource. - * @param functionAppName Name of the Function App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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. - */ - String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, - String functionAppName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java index dc17112b6d6d..4d06f4ad64f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.List; /** * Configuration properties that define the mutable settings of a Container App SourceControl. @@ -32,11 +31,6 @@ public final class GithubActionConfiguration implements JsonSerializable buildEnvironmentVariables; - /** * Creates an instance of GithubActionConfiguration class. */ @@ -138,26 +127,6 @@ public GithubActionConfiguration withContextPath(String contextPath) { return this; } - /** - * Get the dockerfilePath property: Dockerfile path. - * - * @return the dockerfilePath value. - */ - public String dockerfilePath() { - return this.dockerfilePath; - } - - /** - * Set the dockerfilePath property: Dockerfile path. - * - * @param dockerfilePath the dockerfilePath value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withDockerfilePath(String dockerfilePath) { - this.dockerfilePath = dockerfilePath; - return this; - } - /** * Get the githubPersonalAccessToken property: One time Github PAT to configure github environment. * @@ -278,27 +247,6 @@ public GithubActionConfiguration withRuntimeVersion(String runtimeVersion) { return this; } - /** - * Get the buildEnvironmentVariables property: List of environment variables to be passed to the build. - * - * @return the buildEnvironmentVariables value. - */ - public List buildEnvironmentVariables() { - return this.buildEnvironmentVariables; - } - - /** - * Set the buildEnvironmentVariables property: List of environment variables to be passed to the build. - * - * @param buildEnvironmentVariables the buildEnvironmentVariables value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration - withBuildEnvironmentVariables(List buildEnvironmentVariables) { - this.buildEnvironmentVariables = buildEnvironmentVariables; - return this; - } - /** * Validates the instance. * @@ -311,9 +259,6 @@ public void validate() { if (azureCredentials() != null) { azureCredentials().validate(); } - if (buildEnvironmentVariables() != null) { - buildEnvironmentVariables().forEach(e -> e.validate()); - } } /** @@ -325,15 +270,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("registryInfo", this.registryInfo); jsonWriter.writeJsonField("azureCredentials", this.azureCredentials); jsonWriter.writeStringField("contextPath", this.contextPath); - jsonWriter.writeStringField("dockerfilePath", this.dockerfilePath); jsonWriter.writeStringField("githubPersonalAccessToken", this.githubPersonalAccessToken); jsonWriter.writeStringField("image", this.image); jsonWriter.writeStringField("publishType", this.publishType); jsonWriter.writeStringField("os", this.os); jsonWriter.writeStringField("runtimeStack", this.runtimeStack); jsonWriter.writeStringField("runtimeVersion", this.runtimeVersion); - jsonWriter.writeArrayField("buildEnvironmentVariables", this.buildEnvironmentVariables, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -358,8 +300,6 @@ public static GithubActionConfiguration fromJson(JsonReader jsonReader) throws I deserializedGithubActionConfiguration.azureCredentials = AzureCredentials.fromJson(reader); } else if ("contextPath".equals(fieldName)) { deserializedGithubActionConfiguration.contextPath = reader.getString(); - } else if ("dockerfilePath".equals(fieldName)) { - deserializedGithubActionConfiguration.dockerfilePath = reader.getString(); } else if ("githubPersonalAccessToken".equals(fieldName)) { deserializedGithubActionConfiguration.githubPersonalAccessToken = reader.getString(); } else if ("image".equals(fieldName)) { @@ -372,10 +312,6 @@ public static GithubActionConfiguration fromJson(JsonReader jsonReader) throws I deserializedGithubActionConfiguration.runtimeStack = reader.getString(); } else if ("runtimeVersion".equals(fieldName)) { deserializedGithubActionConfiguration.runtimeVersion = reader.getString(); - } else if ("buildEnvironmentVariables".equals(fieldName)) { - List buildEnvironmentVariables - = reader.readArray(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedGithubActionConfiguration.buildEnvironmentVariables = buildEnvironmentVariables; } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java deleted file mode 100644 index daa4078204fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java +++ /dev/null @@ -1,121 +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.appcontainers.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 java.io.IOException; - -/** - * Header of otlp configuration. - */ -@Fluent -public final class Header implements JsonSerializable
{ - /* - * The key of otlp configuration header - */ - private String key; - - /* - * The value of otlp configuration header - */ - private String value; - - /** - * Creates an instance of Header class. - */ - public Header() { - } - - /** - * Get the key property: The key of otlp configuration header. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The key of otlp configuration header. - * - * @param key the key value to set. - * @return the Header object itself. - */ - public Header withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the value property: The value of otlp configuration header. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of otlp configuration header. - * - * @param value the value value to set. - * @return the Header object itself. - */ - public Header withValue(String value) { - this.value = value; - 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("key", this.key); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Header from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Header 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 Header. - */ - public static Header fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Header deserializedHeader = new Header(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedHeader.key = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedHeader.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHeader; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java deleted file mode 100644 index 91f50b3a4234..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java +++ /dev/null @@ -1,206 +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.appcontainers.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.appcontainers.fluent.models.HeaderMatchMatch; -import java.io.IOException; - -/** - * Conditions required to match a header. - */ -@Fluent -public final class HeaderMatch implements JsonSerializable { - /* - * Name of the header - */ - private String headerProperty; - - /* - * Type of match to perform - */ - private HeaderMatchMatch innerMatch; - - /** - * Creates an instance of HeaderMatch class. - */ - public HeaderMatch() { - } - - /** - * Get the headerProperty property: Name of the header. - * - * @return the headerProperty value. - */ - public String headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty property: Name of the header. - * - * @param headerProperty the headerProperty value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withHeaderProperty(String headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the innerMatch property: Type of match to perform. - * - * @return the innerMatch value. - */ - private HeaderMatchMatch innerMatch() { - return this.innerMatch; - } - - /** - * Get the exactMatch property: Exact value of the header. - * - * @return the exactMatch value. - */ - public String exactMatch() { - return this.innerMatch() == null ? null : this.innerMatch().exactMatch(); - } - - /** - * Set the exactMatch property: Exact value of the header. - * - * @param exactMatch the exactMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withExactMatch(String exactMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withExactMatch(exactMatch); - return this; - } - - /** - * Get the prefixMatch property: Prefix value of the header. - * - * @return the prefixMatch value. - */ - public String prefixMatch() { - return this.innerMatch() == null ? null : this.innerMatch().prefixMatch(); - } - - /** - * Set the prefixMatch property: Prefix value of the header. - * - * @param prefixMatch the prefixMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withPrefixMatch(String prefixMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withPrefixMatch(prefixMatch); - return this; - } - - /** - * Get the suffixMatch property: Suffix value of the header. - * - * @return the suffixMatch value. - */ - public String suffixMatch() { - return this.innerMatch() == null ? null : this.innerMatch().suffixMatch(); - } - - /** - * Set the suffixMatch property: Suffix value of the header. - * - * @param suffixMatch the suffixMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withSuffixMatch(String suffixMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withSuffixMatch(suffixMatch); - return this; - } - - /** - * Get the regexMatch property: Regex value of the header. - * - * @return the regexMatch value. - */ - public String regexMatch() { - return this.innerMatch() == null ? null : this.innerMatch().regexMatch(); - } - - /** - * Set the regexMatch property: Regex value of the header. - * - * @param regexMatch the regexMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withRegexMatch(String regexMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withRegexMatch(regexMatch); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerMatch() != null) { - innerMatch().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("header", this.headerProperty); - jsonWriter.writeJsonField("match", this.innerMatch); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HeaderMatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HeaderMatch 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 HeaderMatch. - */ - public static HeaderMatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HeaderMatch deserializedHeaderMatch = new HeaderMatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("header".equals(fieldName)) { - deserializedHeaderMatch.headerProperty = reader.getString(); - } else if ("match".equals(fieldName)) { - deserializedHeaderMatch.innerMatch = HeaderMatchMatch.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHeaderMatch; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java deleted file mode 100644 index 1bab688679cb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java +++ /dev/null @@ -1,121 +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.appcontainers.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 java.io.IOException; - -/** - * Defines parameters for http connection pooling. - */ -@Fluent -public final class HttpConnectionPool implements JsonSerializable { - /* - * Maximum number of pending http1 requests allowed - */ - private Integer http1MaxPendingRequests; - - /* - * Maximum number of http2 requests allowed - */ - private Integer http2MaxRequests; - - /** - * Creates an instance of HttpConnectionPool class. - */ - public HttpConnectionPool() { - } - - /** - * Get the http1MaxPendingRequests property: Maximum number of pending http1 requests allowed. - * - * @return the http1MaxPendingRequests value. - */ - public Integer http1MaxPendingRequests() { - return this.http1MaxPendingRequests; - } - - /** - * Set the http1MaxPendingRequests property: Maximum number of pending http1 requests allowed. - * - * @param http1MaxPendingRequests the http1MaxPendingRequests value to set. - * @return the HttpConnectionPool object itself. - */ - public HttpConnectionPool withHttp1MaxPendingRequests(Integer http1MaxPendingRequests) { - this.http1MaxPendingRequests = http1MaxPendingRequests; - return this; - } - - /** - * Get the http2MaxRequests property: Maximum number of http2 requests allowed. - * - * @return the http2MaxRequests value. - */ - public Integer http2MaxRequests() { - return this.http2MaxRequests; - } - - /** - * Set the http2MaxRequests property: Maximum number of http2 requests allowed. - * - * @param http2MaxRequests the http2MaxRequests value to set. - * @return the HttpConnectionPool object itself. - */ - public HttpConnectionPool withHttp2MaxRequests(Integer http2MaxRequests) { - this.http2MaxRequests = http2MaxRequests; - 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.writeNumberField("http1MaxPendingRequests", this.http1MaxPendingRequests); - jsonWriter.writeNumberField("http2MaxRequests", this.http2MaxRequests); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpConnectionPool from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpConnectionPool 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 HttpConnectionPool. - */ - public static HttpConnectionPool fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpConnectionPool deserializedHttpConnectionPool = new HttpConnectionPool(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("http1MaxPendingRequests".equals(fieldName)) { - deserializedHttpConnectionPool.http1MaxPendingRequests = reader.getNullable(JsonReader::getInt); - } else if ("http2MaxRequests".equals(fieldName)) { - deserializedHttpConnectionPool.http2MaxRequests = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpConnectionPool; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java deleted file mode 100644 index 5579b4b5dfbb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java +++ /dev/null @@ -1,158 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model representing a http get request. - */ -@Fluent -public final class HttpGet implements JsonSerializable { - /* - * URL to make HTTP GET request against. - */ - private String url; - - /* - * Name of the file that the request should be saved to. - */ - private String fileName; - - /* - * List of headers to send with the request. - */ - private List headers; - - /** - * Creates an instance of HttpGet class. - */ - public HttpGet() { - } - - /** - * Get the url property: URL to make HTTP GET request against. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL to make HTTP GET request against. - * - * @param url the url value to set. - * @return the HttpGet object itself. - */ - public HttpGet withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the fileName property: Name of the file that the request should be saved to. - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName property: Name of the file that the request should be saved to. - * - * @param fileName the fileName value to set. - * @return the HttpGet object itself. - */ - public HttpGet withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the headers property: List of headers to send with the request. - * - * @return the headers value. - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers property: List of headers to send with the request. - * - * @param headers the headers value to set. - * @return the HttpGet object itself. - */ - public HttpGet withHeaders(List headers) { - this.headers = headers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (url() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property url in model HttpGet")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HttpGet.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeStringField("fileName", this.fileName); - jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpGet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpGet 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 HttpGet. - */ - public static HttpGet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpGet deserializedHttpGet = new HttpGet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("url".equals(fieldName)) { - deserializedHttpGet.url = reader.getString(); - } else if ("fileName".equals(fieldName)) { - deserializedHttpGet.fileName = reader.getString(); - } else if ("headers".equals(fieldName)) { - List headers = reader.readArray(reader1 -> reader1.getString()); - deserializedHttpGet.headers = headers; - } else { - reader.skipChildren(); - } - } - - return deserializedHttpGet; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java deleted file mode 100644 index 2c4c1eee0e96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java +++ /dev/null @@ -1,251 +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.appcontainers.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.appcontainers.fluent.models.HttpRetryPolicyMatches; -import com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyRetryBackOff; -import java.io.IOException; -import java.util.List; - -/** - * Policy that defines http request retry conditions. - */ -@Fluent -public final class HttpRetryPolicy implements JsonSerializable { - /* - * Maximum number of times a request will retry - */ - private Integer maxRetries; - - /* - * Settings for retry backoff characteristics - */ - private HttpRetryPolicyRetryBackOff innerRetryBackOff; - - /* - * Conditions that must be met for a request to be retried - */ - private HttpRetryPolicyMatches innerMatches; - - /** - * Creates an instance of HttpRetryPolicy class. - */ - public HttpRetryPolicy() { - } - - /** - * Get the maxRetries property: Maximum number of times a request will retry. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: Maximum number of times a request will retry. - * - * @param maxRetries the maxRetries value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the innerRetryBackOff property: Settings for retry backoff characteristics. - * - * @return the innerRetryBackOff value. - */ - private HttpRetryPolicyRetryBackOff innerRetryBackOff() { - return this.innerRetryBackOff; - } - - /** - * Get the innerMatches property: Conditions that must be met for a request to be retried. - * - * @return the innerMatches value. - */ - private HttpRetryPolicyMatches innerMatches() { - return this.innerMatches; - } - - /** - * Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @return the initialDelayInMilliseconds value. - */ - public Long initialDelayInMilliseconds() { - return this.innerRetryBackOff() == null ? null : this.innerRetryBackOff().initialDelayInMilliseconds(); - } - - /** - * Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withInitialDelayInMilliseconds(Long initialDelayInMilliseconds) { - if (this.innerRetryBackOff() == null) { - this.innerRetryBackOff = new HttpRetryPolicyRetryBackOff(); - } - this.innerRetryBackOff().withInitialDelayInMilliseconds(initialDelayInMilliseconds); - return this; - } - - /** - * Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @return the maxIntervalInMilliseconds value. - */ - public Long maxIntervalInMilliseconds() { - return this.innerRetryBackOff() == null ? null : this.innerRetryBackOff().maxIntervalInMilliseconds(); - } - - /** - * Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds) { - if (this.innerRetryBackOff() == null) { - this.innerRetryBackOff = new HttpRetryPolicyRetryBackOff(); - } - this.innerRetryBackOff().withMaxIntervalInMilliseconds(maxIntervalInMilliseconds); - return this; - } - - /** - * Get the headers property: Headers that must be present for a request to be retried. - * - * @return the headers value. - */ - public List headers() { - return this.innerMatches() == null ? null : this.innerMatches().headers(); - } - - /** - * Set the headers property: Headers that must be present for a request to be retried. - * - * @param headers the headers value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withHeaders(List headers) { - if (this.innerMatches() == null) { - this.innerMatches = new HttpRetryPolicyMatches(); - } - this.innerMatches().withHeaders(headers); - return this; - } - - /** - * Get the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @return the httpStatusCodes value. - */ - public List httpStatusCodes() { - return this.innerMatches() == null ? null : this.innerMatches().httpStatusCodes(); - } - - /** - * Set the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @param httpStatusCodes the httpStatusCodes value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withHttpStatusCodes(List httpStatusCodes) { - if (this.innerMatches() == null) { - this.innerMatches = new HttpRetryPolicyMatches(); - } - this.innerMatches().withHttpStatusCodes(httpStatusCodes); - return this; - } - - /** - * Get the errors property: Errors that can trigger a retry. - * - * @return the errors value. - */ - public List errors() { - return this.innerMatches() == null ? null : this.innerMatches().errors(); - } - - /** - * Set the errors property: Errors that can trigger a retry. - * - * @param errors the errors value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withErrors(List errors) { - if (this.innerMatches() == null) { - this.innerMatches = new HttpRetryPolicyMatches(); - } - this.innerMatches().withErrors(errors); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerRetryBackOff() != null) { - innerRetryBackOff().validate(); - } - if (innerMatches() != null) { - innerMatches().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxRetries", this.maxRetries); - jsonWriter.writeJsonField("retryBackOff", this.innerRetryBackOff); - jsonWriter.writeJsonField("matches", this.innerMatches); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpRetryPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpRetryPolicy 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 HttpRetryPolicy. - */ - public static HttpRetryPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpRetryPolicy deserializedHttpRetryPolicy = new HttpRetryPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxRetries".equals(fieldName)) { - deserializedHttpRetryPolicy.maxRetries = reader.getNullable(JsonReader::getInt); - } else if ("retryBackOff".equals(fieldName)) { - deserializedHttpRetryPolicy.innerRetryBackOff = HttpRetryPolicyRetryBackOff.fromJson(reader); - } else if ("matches".equals(fieldName)) { - deserializedHttpRetryPolicy.innerMatches = HttpRetryPolicyMatches.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpRetryPolicy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java index 3df9c4c12245..513429b26e67 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java @@ -8,28 +8,18 @@ import java.util.Collection; /** - * Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. + * Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. */ public final class IdentitySettingsLifeCycle extends ExpandableStringEnum { - /** - * Static value Init for IdentitySettingsLifeCycle. - */ - public static final IdentitySettingsLifeCycle INIT = fromString("Init"); - - /** - * Static value Main for IdentitySettingsLifeCycle. - */ - public static final IdentitySettingsLifeCycle MAIN = fromString("Main"); - /** * Static value None for IdentitySettingsLifeCycle. */ public static final IdentitySettingsLifeCycle NONE = fromString("None"); /** - * Static value All for IdentitySettingsLifeCycle. + * Static value Main for IdentitySettingsLifeCycle. */ - public static final IdentitySettingsLifeCycle ALL = fromString("All"); + public static final IdentitySettingsLifeCycle MAIN = fromString("Main"); /** * Creates a new instance of IdentitySettingsLifeCycle value. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java deleted file mode 100644 index 968fafc226f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java +++ /dev/null @@ -1,52 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update - * image through image field. Set to ContainerImage for user provided image. - */ -public final class ImageType extends ExpandableStringEnum { - /** - * Static value CloudBuild for ImageType. - */ - public static final ImageType CLOUD_BUILD = fromString("CloudBuild"); - - /** - * Static value ContainerImage for ImageType. - */ - public static final ImageType CONTAINER_IMAGE = fromString("ContainerImage"); - - /** - * Creates a new instance of ImageType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ImageType() { - } - - /** - * Creates or finds a ImageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ImageType. - */ - public static ImageType fromString(String name) { - return fromString(name, ImageType.class); - } - - /** - * Gets known ImageType values. - * - * @return known ImageType values. - */ - public static Collection values() { - return values(ImageType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java index bcfe8ad33e0c..f06b3c3f2df7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java @@ -85,11 +85,6 @@ public final class Ingress implements JsonSerializable { */ private List additionalPortMappings; - /* - * Whether an http app listens on http or https - */ - private IngressTargetPortHttpScheme targetPortHttpScheme; - /** * Creates an instance of Ingress class. */ @@ -351,26 +346,6 @@ public Ingress withAdditionalPortMappings(List additionalPor return this; } - /** - * Get the targetPortHttpScheme property: Whether an http app listens on http or https. - * - * @return the targetPortHttpScheme value. - */ - public IngressTargetPortHttpScheme targetPortHttpScheme() { - return this.targetPortHttpScheme; - } - - /** - * Set the targetPortHttpScheme property: Whether an http app listens on http or https. - * - * @param targetPortHttpScheme the targetPortHttpScheme value to set. - * @return the Ingress object itself. - */ - public Ingress withTargetPortHttpScheme(IngressTargetPortHttpScheme targetPortHttpScheme) { - this.targetPortHttpScheme = targetPortHttpScheme; - return this; - } - /** * Validates the instance. * @@ -418,8 +393,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("corsPolicy", this.corsPolicy); jsonWriter.writeArrayField("additionalPortMappings", this.additionalPortMappings, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("targetPortHttpScheme", - this.targetPortHttpScheme == null ? null : this.targetPortHttpScheme.toString()); return jsonWriter.writeEndObject(); } @@ -471,9 +444,6 @@ public static Ingress fromJson(JsonReader jsonReader) throws IOException { List additionalPortMappings = reader.readArray(reader1 -> IngressPortMapping.fromJson(reader1)); deserializedIngress.additionalPortMappings = additionalPortMappings; - } else if ("targetPortHttpScheme".equals(fieldName)) { - deserializedIngress.targetPortHttpScheme - = IngressTargetPortHttpScheme.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java deleted file mode 100644 index 2a165d3bcd0b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java +++ /dev/null @@ -1,51 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether an http app listens on http or https. - */ -public final class IngressTargetPortHttpScheme extends ExpandableStringEnum { - /** - * Static value http for IngressTargetPortHttpScheme. - */ - public static final IngressTargetPortHttpScheme HTTP = fromString("http"); - - /** - * Static value https for IngressTargetPortHttpScheme. - */ - public static final IngressTargetPortHttpScheme HTTPS = fromString("https"); - - /** - * Creates a new instance of IngressTargetPortHttpScheme value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IngressTargetPortHttpScheme() { - } - - /** - * Creates or finds a IngressTargetPortHttpScheme from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngressTargetPortHttpScheme. - */ - public static IngressTargetPortHttpScheme fromString(String name) { - return fromString(name, IngressTargetPortHttpScheme.class); - } - - /** - * Gets known IngressTargetPortHttpScheme values. - * - * @return known IngressTargetPortHttpScheme values. - */ - public static Collection values() { - return values(IngressTargetPortHttpScheme.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java index 83304b0ad6a8..0b6a44491d2e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java @@ -31,15 +31,6 @@ public InitContainer withImage(String image) { return this; } - /** - * {@inheritDoc} - */ - @Override - public InitContainer withImageType(ImageType imageType) { - super.withImageType(imageType); - return this; - } - /** * {@inheritDoc} */ @@ -119,7 +110,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("image", image()); - jsonWriter.writeStringField("imageType", imageType() == null ? null : imageType().toString()); jsonWriter.writeStringField("name", name()); jsonWriter.writeArrayField("command", command(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("args", args(), (writer, element) -> writer.writeString(element)); @@ -146,8 +136,6 @@ public static InitContainer fromJson(JsonReader jsonReader) throws IOException { if ("image".equals(fieldName)) { deserializedInitContainer.withImage(reader.getString()); - } else if ("imageType".equals(fieldName)) { - deserializedInitContainer.withImageType(ImageType.fromString(reader.getString())); } else if ("name".equals(fieldName)) { deserializedInitContainer.withName(reader.getString()); } else if ("command".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java index 6de48a551d17..06ba2752603c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java @@ -192,12 +192,8 @@ public static JavaComponentProperties fromJson(JsonReader jsonReader) throws IOE } } // Use the discriminator value to determine which subtype should be deserialized. - if ("SpringCloudGateway".equals(discriminatorValue)) { - return SpringCloudGatewayComponent.fromJson(readerToUse.reset()); - } else if ("SpringBootAdmin".equals(discriminatorValue)) { + if ("SpringBootAdmin".equals(discriminatorValue)) { return SpringBootAdminComponent.fromJson(readerToUse.reset()); - } else if ("Nacos".equals(discriminatorValue)) { - return NacosComponent.fromJson(readerToUse.reset()); } else if ("SpringCloudEureka".equals(discriminatorValue)) { return SpringCloudEurekaComponent.fromJson(readerToUse.reset()); } else if ("SpringCloudConfig".equals(discriminatorValue)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java index d53349332fe6..6991bbaf0a90 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java @@ -26,16 +26,6 @@ public final class JavaComponentType extends ExpandableStringEnum getWithResponse(String resourceGroupName, String environ JavaComponent get(String resourceGroupName, String environmentName, String name); /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -78,6 +80,8 @@ Response getWithResponse(String resourceGroupName, String environ void delete(String resourceGroupName, String environmentName, String name); /** + * Delete. + * * Delete a Java Component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -114,6 +118,8 @@ Response getWithResponse(String resourceGroupName, String environ Response getByIdWithResponse(String id, Context context); /** + * Delete. + * * Delete a Java Component. * * @param id the resource ID. @@ -124,6 +130,8 @@ Response getWithResponse(String resourceGroupName, String environ void deleteById(String id); /** + * Delete. + * * Delete a Java Component. * * @param id the resource ID. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java index 3c867ad96ea8..705ec61cb7ab 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java @@ -51,13 +51,6 @@ public interface Job { */ Map tags(); - /** - * Gets the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - /** * Gets the identity property: Managed identities needed by a container app job to interact with other Azure * services to not maintain any secrets or credentials in code. @@ -80,13 +73,6 @@ public interface Job { */ JobProvisioningState provisioningState(); - /** - * Gets the runningState property: Current running state of the job. - * - * @return the runningState value. - */ - JobRunningState runningState(); - /** * Gets the environmentId property: Resource ID of environment. * @@ -212,8 +198,8 @@ interface WithResourceGroup { * The stage of the Job 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.WithExtendedLocation, - DefinitionStages.WithIdentity, DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** * Executes the create request. @@ -244,19 +230,6 @@ interface WithTags { WithCreate withTags(Map tags); } - /** - * The stage of the Job definition allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - /** * The stage of the Job definition allowing to specify identity. */ @@ -336,8 +309,7 @@ interface WithTemplate { /** * The template for Job update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, - UpdateStages.WithProperties { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { /** * Executes the update request. * @@ -371,19 +343,6 @@ interface WithTags { Update withTags(Map tags); } - /** - * The stage of the Job update allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - Update withExtendedLocation(ExtendedLocation extendedLocation); - } - /** * The stage of the Job update allowing to specify identity. */ @@ -494,44 +453,4 @@ interface WithProperties { * @return container Apps Job Secrets Collection ARM resource. */ JobSecretsCollection listSecrets(); - - /** - * Resumes a suspended job. - * - * @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 container App Job. - */ - Job resume(); - - /** - * Resumes a suspended job. - * - * @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 container App Job. - */ - Job resume(Context context); - - /** - * Suspends a job. - * - * @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 container App Job. - */ - Job suspend(); - - /** - * Suspends a job. - * - * @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 container App Job. - */ - Job suspend(Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java index 5f8e8c2f509a..f1faf8af59b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java @@ -60,12 +60,6 @@ public final class JobConfiguration implements JsonSerializable registries; - /* - * Optional settings for Managed Identities that are assigned to the Container App Job. If a Managed Identity is not - * specified here, default settings will be used. - */ - private List identitySettings; - /** * Creates an instance of JobConfiguration class. */ @@ -236,28 +230,6 @@ public JobConfiguration withRegistries(List registries) { return this; } - /** - * Get the identitySettings property: Optional settings for Managed Identities that are assigned to the Container - * App Job. If a Managed Identity is not specified here, default settings will be used. - * - * @return the identitySettings value. - */ - public List identitySettings() { - return this.identitySettings; - } - - /** - * Set the identitySettings property: Optional settings for Managed Identities that are assigned to the Container - * App Job. If a Managed Identity is not specified here, default settings will be used. - * - * @param identitySettings the identitySettings value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withIdentitySettings(List identitySettings) { - this.identitySettings = identitySettings; - return this; - } - /** * Validates the instance. * @@ -283,9 +255,6 @@ public void validate() { if (registries() != null) { registries().forEach(e -> e.validate()); } - if (identitySettings() != null) { - identitySettings().forEach(e -> e.validate()); - } } private static final ClientLogger LOGGER = new ClientLogger(JobConfiguration.class); @@ -304,8 +273,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("scheduleTriggerConfig", this.scheduleTriggerConfig); jsonWriter.writeJsonField("eventTriggerConfig", this.eventTriggerConfig); jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("identitySettings", this.identitySettings, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -347,10 +314,6 @@ public static JobConfiguration fromJson(JsonReader jsonReader) throws IOExceptio List registries = reader.readArray(reader1 -> RegistryCredentials.fromJson(reader1)); deserializedJobConfiguration.registries = registries; - } else if ("identitySettings".equals(fieldName)) { - List identitySettings - = reader.readArray(reader1 -> IdentitySettings.fromJson(reader1)); - deserializedJobConfiguration.identitySettings = identitySettings; } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java index 86f5654629d5..cf83584a4386 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java @@ -60,13 +60,6 @@ public interface JobExecution { */ JobExecutionTemplate template(); - /** - * Gets the detailedStatus property: Detailed status of the job execution. - * - * @return the detailedStatus value. - */ - ExecutionStatus detailedStatus(); - /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner object. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java index 5ee1158155f0..32de8d05cc33 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java @@ -17,11 +17,6 @@ */ @Fluent public final class JobPatchProperties implements JsonSerializable { - /* - * The complex type of the extended location. - */ - private ExtendedLocation extendedLocation; - /* * Managed identities needed by a container app job to interact with other Azure services to not maintain any * secrets or credentials in code. @@ -44,26 +39,6 @@ public final class JobPatchProperties implements JsonSerializable writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); @@ -171,9 +142,7 @@ public static JobPatchProperties fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("extendedLocation".equals(fieldName)) { - deserializedJobPatchProperties.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("identity".equals(fieldName)) { + if ("identity".equals(fieldName)) { deserializedJobPatchProperties.identity = ManagedServiceIdentity.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java deleted file mode 100644 index 382ef10f0ca7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java +++ /dev/null @@ -1,56 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current running state of the job. - */ -public final class JobRunningState extends ExpandableStringEnum { - /** - * Static value Ready for JobRunningState. - */ - public static final JobRunningState READY = fromString("Ready"); - - /** - * Static value Progressing for JobRunningState. - */ - public static final JobRunningState PROGRESSING = fromString("Progressing"); - - /** - * Static value Suspended for JobRunningState. - */ - public static final JobRunningState SUSPENDED = fromString("Suspended"); - - /** - * Creates a new instance of JobRunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobRunningState() { - } - - /** - * Creates or finds a JobRunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobRunningState. - */ - public static JobRunningState fromString(String name) { - return fromString(name, JobRunningState.class); - } - - /** - * Gets known JobRunningState values. - * - * @return known JobRunningState values. - */ - public static Collection values() { - return values(JobRunningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java index def329453208..0c1f208c7638 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java @@ -39,8 +39,8 @@ public final class JobScaleRule implements JsonSerializable { private List auth; /* - * The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned - * identity. + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for + * system-assigned identity. */ private String identity; @@ -133,8 +133,8 @@ public JobScaleRule withAuth(List auth) { } /** - * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the job, or - * 'system' for system-assigned identity. + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. * * @return the identity value. */ @@ -143,8 +143,8 @@ public String identity() { } /** - * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the job, or - * 'system' for system-assigned identity. + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. * * @param identity the identity value to set. * @return the JobScaleRule object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java index 709a218d0ec4..f789354e54f9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java @@ -78,8 +78,6 @@ Response getDetectorWithResponse(String resourceGroupName, String j Diagnostics getDetector(String resourceGroupName, String jobName, String detectorName); /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -95,8 +93,6 @@ Response getDetectorWithResponse(String resourceGroupName, String j Response proxyGetWithResponse(String resourceGroupName, String jobName, String apiName, Context context); /** - * Get the properties for a given Container App Job. - * * Get the properties of a Container App Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -318,56 +314,6 @@ Response getDetectorWithResponse(String resourceGroupName, String j */ JobSecretsCollection listSecrets(String resourceGroupName, String jobName); - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - Job resume(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - Job resume(String resourceGroupName, String jobName, Context context); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - Job suspend(String resourceGroupName, String jobName); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @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 container App Job. - */ - Job suspend(String resourceGroupName, String jobName, Context context); - /** * Get the properties of a Container Apps Job. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java deleted file mode 100644 index 6bdc6796467c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java +++ /dev/null @@ -1,47 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of - * Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. - */ -public final class Kind extends ExpandableStringEnum { - /** - * Static value workflowapp for Kind. - */ - public static final Kind WORKFLOWAPP = fromString("workflowapp"); - - /** - * Creates a new instance of Kind value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Kind() { - } - - /** - * Creates or finds a Kind from its string representation. - * - * @param name a name to look for. - * @return the corresponding Kind. - */ - public static Kind fromString(String name) { - return fromString(name, Kind.class); - } - - /** - * Gets known Kind values. - * - * @return known Kind values. - */ - public static Collection values() { - return values(Kind.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java deleted file mode 100644 index cb7577f3909b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java +++ /dev/null @@ -1,71 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The specified logger's log level. - */ -public final class Level extends ExpandableStringEnum { - /** - * Static value off for Level. - */ - public static final Level OFF = fromString("off"); - - /** - * Static value error for Level. - */ - public static final Level ERROR = fromString("error"); - - /** - * Static value info for Level. - */ - public static final Level INFO = fromString("info"); - - /** - * Static value debug for Level. - */ - public static final Level DEBUG = fromString("debug"); - - /** - * Static value trace for Level. - */ - public static final Level TRACE = fromString("trace"); - - /** - * Static value warn for Level. - */ - public static final Level WARN = fromString("warn"); - - /** - * Creates a new instance of Level value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Level() { - } - - /** - * Creates or finds a Level from its string representation. - * - * @param name a name to look for. - * @return the corresponding Level. - */ - public static Level fromString(String name) { - return fromString(name, Level.class); - } - - /** - * Gets known Level values. - * - * @return known Level values. - */ - public static Collection values() { - return values(Level.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LifecycleConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LifecycleConfiguration.java new file mode 100644 index 000000000000..bda5589196f1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LifecycleConfiguration.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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 java.io.IOException; + +/** + * The lifecycle configuration properties of a session in the dynamic session pool. + */ +@Fluent +public final class LifecycleConfiguration implements JsonSerializable { + /* + * The lifecycle type of the session pool. + */ + private LifecycleType lifecycleType; + + /* + * The cooldown period of a session in seconds when the lifecycle type is 'Timed'. + */ + private Integer cooldownPeriodInSeconds; + + /* + * The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'. + */ + private Integer maxAlivePeriodInSeconds; + + /** + * Creates an instance of LifecycleConfiguration class. + */ + public LifecycleConfiguration() { + } + + /** + * Get the lifecycleType property: The lifecycle type of the session pool. + * + * @return the lifecycleType value. + */ + public LifecycleType lifecycleType() { + return this.lifecycleType; + } + + /** + * Set the lifecycleType property: The lifecycle type of the session pool. + * + * @param lifecycleType the lifecycleType value to set. + * @return the LifecycleConfiguration object itself. + */ + public LifecycleConfiguration withLifecycleType(LifecycleType lifecycleType) { + this.lifecycleType = lifecycleType; + return this; + } + + /** + * Get the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is + * 'Timed'. + * + * @return the cooldownPeriodInSeconds value. + */ + public Integer cooldownPeriodInSeconds() { + return this.cooldownPeriodInSeconds; + } + + /** + * Set the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is + * 'Timed'. + * + * @param cooldownPeriodInSeconds the cooldownPeriodInSeconds value to set. + * @return the LifecycleConfiguration object itself. + */ + public LifecycleConfiguration withCooldownPeriodInSeconds(Integer cooldownPeriodInSeconds) { + this.cooldownPeriodInSeconds = cooldownPeriodInSeconds; + return this; + } + + /** + * Get the maxAlivePeriodInSeconds property: The maximum alive period of a session in seconds when the lifecycle + * type is 'OnContainerExit'. + * + * @return the maxAlivePeriodInSeconds value. + */ + public Integer maxAlivePeriodInSeconds() { + return this.maxAlivePeriodInSeconds; + } + + /** + * Set the maxAlivePeriodInSeconds property: The maximum alive period of a session in seconds when the lifecycle + * type is 'OnContainerExit'. + * + * @param maxAlivePeriodInSeconds the maxAlivePeriodInSeconds value to set. + * @return the LifecycleConfiguration object itself. + */ + public LifecycleConfiguration withMaxAlivePeriodInSeconds(Integer maxAlivePeriodInSeconds) { + this.maxAlivePeriodInSeconds = maxAlivePeriodInSeconds; + 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("lifecycleType", this.lifecycleType == null ? null : this.lifecycleType.toString()); + jsonWriter.writeNumberField("cooldownPeriodInSeconds", this.cooldownPeriodInSeconds); + jsonWriter.writeNumberField("maxAlivePeriodInSeconds", this.maxAlivePeriodInSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LifecycleConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LifecycleConfiguration 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 LifecycleConfiguration. + */ + public static LifecycleConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LifecycleConfiguration deserializedLifecycleConfiguration = new LifecycleConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("lifecycleType".equals(fieldName)) { + deserializedLifecycleConfiguration.lifecycleType = LifecycleType.fromString(reader.getString()); + } else if ("cooldownPeriodInSeconds".equals(fieldName)) { + deserializedLifecycleConfiguration.cooldownPeriodInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("maxAlivePeriodInSeconds".equals(fieldName)) { + deserializedLifecycleConfiguration.maxAlivePeriodInSeconds = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedLifecycleConfiguration; + }); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LifecycleType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LifecycleType.java new file mode 100644 index 000000000000..2ef8db51ef22 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LifecycleType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The lifecycle type of the session pool. + */ +public final class LifecycleType extends ExpandableStringEnum { + /** + * Static value Timed for LifecycleType. + */ + public static final LifecycleType TIMED = fromString("Timed"); + + /** + * Static value OnContainerExit for LifecycleType. + */ + public static final LifecycleType ON_CONTAINER_EXIT = fromString("OnContainerExit"); + + /** + * Creates a new instance of LifecycleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LifecycleType() { + } + + /** + * Creates or finds a LifecycleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LifecycleType. + */ + public static LifecycleType fromString(String name) { + return fromString(name, LifecycleType.class); + } + + /** + * Gets known LifecycleType values. + * + * @return known LifecycleType values. + */ + public static Collection values() { + return values(LifecycleType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java index da8a3c852632..4aaeb16fe2ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java @@ -26,11 +26,6 @@ public final class LogAnalyticsConfiguration implements JsonSerializable { - /* - * Logger name. - */ - private String logger; - - /* - * The specified logger's log level. - */ - private Level level; - - /** - * Creates an instance of LoggerSetting class. - */ - public LoggerSetting() { - } - - /** - * Get the logger property: Logger name. - * - * @return the logger value. - */ - public String logger() { - return this.logger; - } - - /** - * Set the logger property: Logger name. - * - * @param logger the logger value to set. - * @return the LoggerSetting object itself. - */ - public LoggerSetting withLogger(String logger) { - this.logger = logger; - return this; - } - - /** - * Get the level property: The specified logger's log level. - * - * @return the level value. - */ - public Level level() { - return this.level; - } - - /** - * Set the level property: The specified logger's log level. - * - * @param level the level value to set. - * @return the LoggerSetting object itself. - */ - public LoggerSetting withLevel(Level level) { - this.level = level; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logger() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property logger in model LoggerSetting")); - } - if (level() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property level in model LoggerSetting")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LoggerSetting.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("logger", this.logger); - jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoggerSetting from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoggerSetting 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 LoggerSetting. - */ - public static LoggerSetting fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoggerSetting deserializedLoggerSetting = new LoggerSetting(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("logger".equals(fieldName)) { - deserializedLoggerSetting.logger = reader.getString(); - } else if ("level".equals(fieldName)) { - deserializedLoggerSetting.level = Level.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLoggerSetting; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java deleted file mode 100644 index e1e846984fc1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java +++ /dev/null @@ -1,234 +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.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; - -/** - * An immutable client-side representation of LogicApp. - */ -public interface LogicApp { - /** - * 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: The resource-specific properties for this resource. - * - * @return the properties value. - */ - Object 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. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner object. - * - * @return the inner object. - */ - LogicAppInner innerModel(); - - /** - * The entirety of the LogicApp definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The LogicApp definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the LogicApp definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the LogicApp definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, containerAppName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String containerAppName); - } - - /** - * The stage of the LogicApp 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. - */ - LogicApp create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - LogicApp create(Context context); - } - - /** - * The stage of the LogicApp definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(Object properties); - } - } - - /** - * Begins update for the LogicApp resource. - * - * @return the stage of resource update. - */ - LogicApp.Update update(); - - /** - * The template for LogicApp update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - LogicApp apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - LogicApp apply(Context context); - } - - /** - * The LogicApp update stages. - */ - interface UpdateStages { - /** - * The stage of the LogicApp update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(Object properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - LogicApp refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - LogicApp refresh(Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param workflowArtifacts Application settings and files of the workflow. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deployWorkflowArtifactsWithResponse(WorkflowArtifacts workflowArtifacts, Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deployWorkflowArtifacts(); - - /** - * Gets logic app's connections. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections along with {@link Response}. - */ - Response listWorkflowsConnectionsWithResponse(Context context); - - /** - * Gets logic app's connections. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections. - */ - WorkflowEnvelope listWorkflowsConnections(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java deleted file mode 100644 index b853015478be..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java +++ /dev/null @@ -1,289 +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.appcontainers.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 LogicApps. - */ -public interface LogicApps { - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource. - */ - LogicApp get(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 containerAppName, String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name along with {@link Response}. - */ - Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return workflow information by its name. - */ - WorkflowEnvelope getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections along with {@link Response}. - */ - Response listWorkflowsConnectionsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, Context context); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return logic app's connections. - */ - WorkflowEnvelope listWorkflowsConnections(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object along with {@link Response}. - */ - Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context); - - /** - * Proxies a the API call to the logic app backed by the container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return any object. - */ - Object invoke(String resourceGroupName, String containerAppName, String logicAppName, String xMsLogicAppsProxyPath, - LogicAppsProxyMethod xMsLogicAppsProxyMethod); - - /** - * Gets a logic app extension resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - LogicApp getById(String id); - - /** - * Gets a logic app extension resource. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Logic App extension resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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); - - /** - * Deletes a Logic App extension resource. - * - * @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.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new LogicApp resource. - * - * @param name resource name. - * @return the first stage of the new LogicApp definition. - */ - LogicApp.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.java deleted file mode 100644 index f4702aad851d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.java +++ /dev/null @@ -1,51 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for LogicAppsProxyMethod. - */ -public final class LogicAppsProxyMethod extends ExpandableStringEnum { - /** - * Static value GET for LogicAppsProxyMethod. - */ - public static final LogicAppsProxyMethod GET = fromString("GET"); - - /** - * Static value POST for LogicAppsProxyMethod. - */ - public static final LogicAppsProxyMethod POST = fromString("POST"); - - /** - * Creates a new instance of LogicAppsProxyMethod value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogicAppsProxyMethod() { - } - - /** - * Creates or finds a LogicAppsProxyMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogicAppsProxyMethod. - */ - public static LogicAppsProxyMethod fromString(String name) { - return fromString(name, LogicAppsProxyMethod.class); - } - - /** - * Gets known LogicAppsProxyMethod values. - * - * @return known LogicAppsProxyMethod values. - */ - public static Collection values() { - return values(LogicAppsProxyMethod.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java deleted file mode 100644 index eb495caff890..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java +++ /dev/null @@ -1,95 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry logs. - */ -@Fluent -public final class LogsConfiguration implements JsonSerializable { - /* - * Open telemetry logs destinations - */ - private List destinations; - - /** - * Creates an instance of LogsConfiguration class. - */ - public LogsConfiguration() { - } - - /** - * Get the destinations property: Open telemetry logs destinations. - * - * @return the destinations value. - */ - public List destinations() { - return this.destinations; - } - - /** - * Set the destinations property: Open telemetry logs destinations. - * - * @param destinations the destinations value to set. - * @return the LogsConfiguration object itself. - */ - public LogsConfiguration withDestinations(List destinations) { - this.destinations = destinations; - 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.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogsConfiguration 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 LogsConfiguration. - */ - public static LogsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogsConfiguration deserializedLogsConfiguration = new LogsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destinations".equals(fieldName)) { - List destinations = reader.readArray(reader1 -> reader1.getString()); - deserializedLogsConfiguration.destinations = destinations; - } else { - reader.skipChildren(); - } - } - - return deserializedLogsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java index 116461604263..72dd649e3be1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java @@ -125,28 +125,13 @@ public interface ManagedEnvironment { String staticIp(); /** - * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to + * configured destination. * * @return the appLogsConfiguration value. */ AppLogsConfiguration appLogsConfiguration(); - /** - * Gets the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @return the appInsightsConfiguration value. - */ - AppInsightsConfiguration appInsightsConfiguration(); - - /** - * Gets the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @return the openTelemetryConfiguration value. - */ - OpenTelemetryConfiguration openTelemetryConfiguration(); - /** * Gets the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. * @@ -212,21 +197,6 @@ public interface ManagedEnvironment { */ ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration(); - /** - * Gets the privateEndpointConnections property: Private endpoint connections to the resource. - * - * @return the privateEndpointConnections value. - */ - List privateEndpointConnections(); - - /** - * Gets the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @return the publicNetworkAccess value. - */ - PublicNetworkAccess publicNetworkAccess(); - /** * Gets the region of the resource. * @@ -310,15 +280,14 @@ interface WithResourceGroup { * The stage of the ManagedEnvironment 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithDaprAIInstrumentationKey, - DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, - DefinitionStages.WithAppLogsConfiguration, DefinitionStages.WithAppInsightsConfiguration, - DefinitionStages.WithOpenTelemetryConfiguration, DefinitionStages.WithZoneRedundant, - DefinitionStages.WithCustomDomainConfiguration, DefinitionStages.WithWorkloadProfiles, - DefinitionStages.WithKedaConfiguration, DefinitionStages.WithDaprConfiguration, - DefinitionStages.WithInfrastructureResourceGroup, DefinitionStages.WithPeerAuthentication, - DefinitionStages.WithPeerTrafficConfiguration, DefinitionStages.WithPublicNetworkAccess { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithKind, DefinitionStages.WithIdentity, + DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, + DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, + DefinitionStages.WithZoneRedundant, DefinitionStages.WithCustomDomainConfiguration, + DefinitionStages.WithWorkloadProfiles, DefinitionStages.WithKedaConfiguration, + DefinitionStages.WithDaprConfiguration, DefinitionStages.WithInfrastructureResourceGroup, + DefinitionStages.WithPeerAuthentication, DefinitionStages.WithPeerTrafficConfiguration { /** * Executes the create request. * @@ -425,43 +394,15 @@ interface WithVnetConfiguration { interface WithAppLogsConfiguration { /** * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * app logs to configured destination.. * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to + * configured destination. * @return the next definition stage. */ WithCreate withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } - /** - * The stage of the ManagedEnvironment definition allowing to specify appInsightsConfiguration. - */ - interface WithAppInsightsConfiguration { - /** - * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration Environment level Application Insights configuration. - * @return the next definition stage. - */ - WithCreate withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify openTelemetryConfiguration. - */ - interface WithOpenTelemetryConfiguration { - /** - * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration Environment Open Telemetry configuration. - * @return the next definition stage. - */ - WithCreate withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); - } - /** * The stage of the ManagedEnvironment definition allowing to specify zoneRedundant. */ @@ -570,21 +511,6 @@ interface WithPeerTrafficConfiguration { WithCreate withPeerTrafficConfiguration( ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration); } - - /** - * The stage of the ManagedEnvironment definition allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Property to allow or block all public traffic. Allowed - * Values: 'Enabled', 'Disabled'.. - * - * @param publicNetworkAccess Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * @return the next definition stage. - */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } } /** @@ -600,10 +526,9 @@ interface WithPublicNetworkAccess { interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateStages.WithIdentity, UpdateStages.WithDaprAIInstrumentationKey, UpdateStages.WithDaprAIConnectionString, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, - UpdateStages.WithAppInsightsConfiguration, UpdateStages.WithOpenTelemetryConfiguration, UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication, - UpdateStages.WithPeerTrafficConfiguration, UpdateStages.WithPublicNetworkAccess { + UpdateStages.WithPeerTrafficConfiguration { /** * Executes the update request. * @@ -714,43 +639,15 @@ interface WithVnetConfiguration { interface WithAppLogsConfiguration { /** * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * app logs to configured destination.. * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. + * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to + * configured destination. * @return the next definition stage. */ Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } - /** - * The stage of the ManagedEnvironment update allowing to specify appInsightsConfiguration. - */ - interface WithAppInsightsConfiguration { - /** - * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration Environment level Application Insights configuration. - * @return the next definition stage. - */ - Update withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify openTelemetryConfiguration. - */ - interface WithOpenTelemetryConfiguration { - /** - * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration Environment Open Telemetry configuration. - * @return the next definition stage. - */ - Update withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); - } - /** * The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. */ @@ -829,21 +726,6 @@ interface WithPeerTrafficConfiguration { Update withPeerTrafficConfiguration( ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration); } - - /** - * The stage of the ManagedEnvironment update allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Property to allow or block all public traffic. Allowed - * Values: 'Enabled', 'Disabled'.. - * - * @param publicNetworkAccess Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java deleted file mode 100644 index 7bb6dfb9d798..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java +++ /dev/null @@ -1,152 +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.appcontainers.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 ManagedEnvironmentPrivateEndpointConnections. - */ -public interface ManagedEnvironmentPrivateEndpointConnections { - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * List private endpoint connections for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 list of private endpoint connection associated with the specified resource as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 a private endpoint connection for a given managed environment along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, - String privateEndpointConnectionName, Context context); - - /** - * Get a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 a private endpoint connection for a given managed environment. - */ - PrivateEndpointConnection get(String resourceGroupName, String environmentName, - String privateEndpointConnectionName); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, String privateEndpointConnectionName); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @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 environmentName, String privateEndpointConnectionName, - Context context); - - /** - * Get a private endpoint connection for a given managed environment. - * - * @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 a private endpoint connection for a given managed environment along with {@link Response}. - */ - PrivateEndpointConnection getById(String id); - - /** - * Get a private endpoint connection for a given managed environment. - * - * @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 a private endpoint connection for a given managed environment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @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); - - /** - * Delete a private endpoint connection for a given managed environment. - * - * @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 PrivateEndpointConnection resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnection definition. - */ - PrivateEndpointConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java deleted file mode 100644 index 480e3073148a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java +++ /dev/null @@ -1,38 +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.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ManagedEnvironmentPrivateLinkResources. - */ -public interface ManagedEnvironmentPrivateLinkResources { - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 a list of private link resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * List private link resources for a given managed environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @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 a list of private link resources as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedIdentitySetting.java similarity index 62% rename from sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java rename to sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedIdentitySetting.java index 700777e85038..1fdac6a7e8cf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedIdentitySetting.java @@ -13,30 +13,30 @@ import java.io.IOException; /** - * Optional settings for a Managed Identity that is assigned to the Container App. + * Optional settings for a Managed Identity that is assigned to the Session pool. */ @Fluent -public final class IdentitySettings implements JsonSerializable { +public final class ManagedIdentitySetting implements JsonSerializable { /* - * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for + * The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for * system-assigned identity. */ private String identity; /* - * Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. + * Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. */ private IdentitySettingsLifeCycle lifecycle; /** - * Creates an instance of IdentitySettings class. + * Creates an instance of ManagedIdentitySetting class. */ - public IdentitySettings() { + public ManagedIdentitySetting() { } /** - * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container - * App, or 'system' for system-assigned identity. + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Session + * Pool, or 'system' for system-assigned identity. * * @return the identity value. */ @@ -45,19 +45,19 @@ public String identity() { } /** - * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container - * App, or 'system' for system-assigned identity. + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Session + * Pool, or 'system' for system-assigned identity. * * @param identity the identity value to set. - * @return the IdentitySettings object itself. + * @return the ManagedIdentitySetting object itself. */ - public IdentitySettings withIdentity(String identity) { + public ManagedIdentitySetting withIdentity(String identity) { this.identity = identity; return this; } /** - * Get the lifecycle property: Use to select the lifecycle stages of a Container App during which the Managed + * Get the lifecycle property: Use to select the lifecycle stages of a Session Pool during which the Managed * Identity should be available. * * @return the lifecycle value. @@ -67,13 +67,13 @@ public IdentitySettingsLifeCycle lifecycle() { } /** - * Set the lifecycle property: Use to select the lifecycle stages of a Container App during which the Managed + * Set the lifecycle property: Use to select the lifecycle stages of a Session Pool during which the Managed * Identity should be available. * * @param lifecycle the lifecycle value to set. - * @return the IdentitySettings object itself. + * @return the ManagedIdentitySetting object itself. */ - public IdentitySettings withLifecycle(IdentitySettingsLifeCycle lifecycle) { + public ManagedIdentitySetting withLifecycle(IdentitySettingsLifeCycle lifecycle) { this.lifecycle = lifecycle; return this; } @@ -86,11 +86,12 @@ public IdentitySettings withLifecycle(IdentitySettingsLifeCycle lifecycle) { public void validate() { if (identity() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property identity in model IdentitySettings")); + .log( + new IllegalArgumentException("Missing required property identity in model ManagedIdentitySetting")); } } - private static final ClientLogger LOGGER = new ClientLogger(IdentitySettings.class); + private static final ClientLogger LOGGER = new ClientLogger(ManagedIdentitySetting.class); /** * {@inheritDoc} @@ -104,31 +105,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of IdentitySettings from the JsonReader. + * Reads an instance of ManagedIdentitySetting from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of IdentitySettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. + * @return An instance of ManagedIdentitySetting 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 IdentitySettings. + * @throws IOException If an error occurs while reading the ManagedIdentitySetting. */ - public static IdentitySettings fromJson(JsonReader jsonReader) throws IOException { + public static ManagedIdentitySetting fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - IdentitySettings deserializedIdentitySettings = new IdentitySettings(); + ManagedIdentitySetting deserializedManagedIdentitySetting = new ManagedIdentitySetting(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("identity".equals(fieldName)) { - deserializedIdentitySettings.identity = reader.getString(); + deserializedManagedIdentitySetting.identity = reader.getString(); } else if ("lifecycle".equals(fieldName)) { - deserializedIdentitySettings.lifecycle = IdentitySettingsLifeCycle.fromString(reader.getString()); + deserializedManagedIdentitySetting.lifecycle + = IdentitySettingsLifeCycle.fromString(reader.getString()); } else { reader.skipChildren(); } } - return deserializedIdentitySettings; + return deserializedManagedIdentitySetting; }); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java deleted file mode 100644 index 5fa2a2d26131..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java +++ /dev/null @@ -1,123 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry metrics. - */ -@Fluent -public final class MetricsConfiguration implements JsonSerializable { - /* - * Boolean indicating if including keda metrics - */ - private Boolean includeKeda; - - /* - * Open telemetry metrics destinations - */ - private List destinations; - - /** - * Creates an instance of MetricsConfiguration class. - */ - public MetricsConfiguration() { - } - - /** - * Get the includeKeda property: Boolean indicating if including keda metrics. - * - * @return the includeKeda value. - */ - public Boolean includeKeda() { - return this.includeKeda; - } - - /** - * Set the includeKeda property: Boolean indicating if including keda metrics. - * - * @param includeKeda the includeKeda value to set. - * @return the MetricsConfiguration object itself. - */ - public MetricsConfiguration withIncludeKeda(Boolean includeKeda) { - this.includeKeda = includeKeda; - return this; - } - - /** - * Get the destinations property: Open telemetry metrics destinations. - * - * @return the destinations value. - */ - public List destinations() { - return this.destinations; - } - - /** - * Set the destinations property: Open telemetry metrics destinations. - * - * @param destinations the destinations value to set. - * @return the MetricsConfiguration object itself. - */ - public MetricsConfiguration withDestinations(List destinations) { - this.destinations = destinations; - 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.writeBooleanField("includeKeda", this.includeKeda); - jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MetricsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MetricsConfiguration 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 MetricsConfiguration. - */ - public static MetricsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MetricsConfiguration deserializedMetricsConfiguration = new MetricsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("includeKeda".equals(fieldName)) { - deserializedMetricsConfiguration.includeKeda = reader.getNullable(JsonReader::getBoolean); - } else if ("destinations".equals(fieldName)) { - List destinations = reader.readArray(reader1 -> reader1.getString()); - deserializedMetricsConfiguration.destinations = destinations; - } else { - reader.skipChildren(); - } - } - - return deserializedMetricsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java deleted file mode 100644 index 852c94665bfe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java +++ /dev/null @@ -1,182 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Nacos properties. - */ -@Fluent -public final class NacosComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.NACOS; - - /* - * Java Component Ingress configurations. - */ - private JavaComponentIngress ingress; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * Creates an instance of NacosComponent class. - */ - public NacosComponent() { - } - - /** - * Get the componentType property: Type of the Java Component. - * - * @return the componentType value. - */ - @Override - public JavaComponentType componentType() { - return this.componentType; - } - - /** - * Get the ingress property: Java Component Ingress configurations. - * - * @return the ingress value. - */ - public JavaComponentIngress ingress() { - return this.ingress; - } - - /** - * Set the ingress property: Java Component Ingress configurations. - * - * @param ingress the ingress value to set. - * @return the NacosComponent object itself. - */ - public NacosComponent withIngress(JavaComponentIngress ingress) { - this.ingress = ingress; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public NacosComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NacosComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NacosComponent withServiceBinds(List serviceBinds) { - super.withServiceBinds(serviceBinds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (ingress() != null) { - ingress().validate(); - } - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NacosComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NacosComponent 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 NacosComponent. - */ - public static NacosComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NacosComponent deserializedNacosComponent = new NacosComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedNacosComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedNacosComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedNacosComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedNacosComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedNacosComponent.componentType = JavaComponentType.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedNacosComponent.ingress = JavaComponentIngress.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNacosComponent; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java index 7b05dea106e2..83b390bd608f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java @@ -17,7 +17,7 @@ @Fluent public final class NfsAzureFileProperties implements JsonSerializable { /* - * Server for NFS azure file. + * Server for NFS azure file. Specify the Azure storage account server address. */ private String server; @@ -38,7 +38,7 @@ public NfsAzureFileProperties() { } /** - * Get the server property: Server for NFS azure file. + * Get the server property: Server for NFS azure file. Specify the Azure storage account server address. * * @return the server value. */ @@ -47,7 +47,7 @@ public String server() { } /** - * Set the server property: Server for NFS azure file. + * Set the server property: Server for NFS azure file. Specify the Azure storage account server address. * * @param server the server value to set. * @return the NfsAzureFileProperties object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java deleted file mode 100644 index 96a98ff4db40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java +++ /dev/null @@ -1,191 +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.appcontainers.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 java.io.IOException; - -/** - * Configuration of Open Telemetry. - */ -@Fluent -public final class OpenTelemetryConfiguration implements JsonSerializable { - /* - * Open telemetry destinations configuration - */ - private DestinationsConfiguration destinationsConfiguration; - - /* - * Open telemetry trace configuration - */ - private TracesConfiguration tracesConfiguration; - - /* - * Open telemetry logs configuration - */ - private LogsConfiguration logsConfiguration; - - /* - * Open telemetry metrics configuration - */ - private MetricsConfiguration metricsConfiguration; - - /** - * Creates an instance of OpenTelemetryConfiguration class. - */ - public OpenTelemetryConfiguration() { - } - - /** - * Get the destinationsConfiguration property: Open telemetry destinations configuration. - * - * @return the destinationsConfiguration value. - */ - public DestinationsConfiguration destinationsConfiguration() { - return this.destinationsConfiguration; - } - - /** - * Set the destinationsConfiguration property: Open telemetry destinations configuration. - * - * @param destinationsConfiguration the destinationsConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration - withDestinationsConfiguration(DestinationsConfiguration destinationsConfiguration) { - this.destinationsConfiguration = destinationsConfiguration; - return this; - } - - /** - * Get the tracesConfiguration property: Open telemetry trace configuration. - * - * @return the tracesConfiguration value. - */ - public TracesConfiguration tracesConfiguration() { - return this.tracesConfiguration; - } - - /** - * Set the tracesConfiguration property: Open telemetry trace configuration. - * - * @param tracesConfiguration the tracesConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration withTracesConfiguration(TracesConfiguration tracesConfiguration) { - this.tracesConfiguration = tracesConfiguration; - return this; - } - - /** - * Get the logsConfiguration property: Open telemetry logs configuration. - * - * @return the logsConfiguration value. - */ - public LogsConfiguration logsConfiguration() { - return this.logsConfiguration; - } - - /** - * Set the logsConfiguration property: Open telemetry logs configuration. - * - * @param logsConfiguration the logsConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration withLogsConfiguration(LogsConfiguration logsConfiguration) { - this.logsConfiguration = logsConfiguration; - return this; - } - - /** - * Get the metricsConfiguration property: Open telemetry metrics configuration. - * - * @return the metricsConfiguration value. - */ - public MetricsConfiguration metricsConfiguration() { - return this.metricsConfiguration; - } - - /** - * Set the metricsConfiguration property: Open telemetry metrics configuration. - * - * @param metricsConfiguration the metricsConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration withMetricsConfiguration(MetricsConfiguration metricsConfiguration) { - this.metricsConfiguration = metricsConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destinationsConfiguration() != null) { - destinationsConfiguration().validate(); - } - if (tracesConfiguration() != null) { - tracesConfiguration().validate(); - } - if (logsConfiguration() != null) { - logsConfiguration().validate(); - } - if (metricsConfiguration() != null) { - metricsConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("destinationsConfiguration", this.destinationsConfiguration); - jsonWriter.writeJsonField("tracesConfiguration", this.tracesConfiguration); - jsonWriter.writeJsonField("logsConfiguration", this.logsConfiguration); - jsonWriter.writeJsonField("metricsConfiguration", this.metricsConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OpenTelemetryConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OpenTelemetryConfiguration 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 OpenTelemetryConfiguration. - */ - public static OpenTelemetryConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OpenTelemetryConfiguration deserializedOpenTelemetryConfiguration = new OpenTelemetryConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destinationsConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.destinationsConfiguration - = DestinationsConfiguration.fromJson(reader); - } else if ("tracesConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.tracesConfiguration = TracesConfiguration.fromJson(reader); - } else if ("logsConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.logsConfiguration = LogsConfiguration.fromJson(reader); - } else if ("metricsConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.metricsConfiguration = MetricsConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOpenTelemetryConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java deleted file mode 100644 index 019c556544f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java +++ /dev/null @@ -1,182 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Configuration of otlp. - */ -@Fluent -public final class OtlpConfiguration implements JsonSerializable { - /* - * The name of otlp configuration - */ - private String name; - - /* - * The endpoint of otlp configuration - */ - private String endpoint; - - /* - * Boolean indicating if otlp configuration is insecure - */ - private Boolean insecure; - - /* - * Headers of otlp configurations - */ - private List
headers; - - /** - * Creates an instance of OtlpConfiguration class. - */ - public OtlpConfiguration() { - } - - /** - * Get the name property: The name of otlp configuration. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of otlp configuration. - * - * @param name the name value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the endpoint property: The endpoint of otlp configuration. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: The endpoint of otlp configuration. - * - * @param endpoint the endpoint value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the insecure property: Boolean indicating if otlp configuration is insecure. - * - * @return the insecure value. - */ - public Boolean insecure() { - return this.insecure; - } - - /** - * Set the insecure property: Boolean indicating if otlp configuration is insecure. - * - * @param insecure the insecure value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withInsecure(Boolean insecure) { - this.insecure = insecure; - return this; - } - - /** - * Get the headers property: Headers of otlp configurations. - * - * @return the headers value. - */ - public List
headers() { - return this.headers; - } - - /** - * Set the headers property: Headers of otlp configurations. - * - * @param headers the headers value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withHeaders(List
headers) { - this.headers = headers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (headers() != null) { - headers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeBooleanField("insecure", this.insecure); - jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OtlpConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OtlpConfiguration 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 OtlpConfiguration. - */ - public static OtlpConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OtlpConfiguration deserializedOtlpConfiguration = new OtlpConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOtlpConfiguration.name = reader.getString(); - } else if ("endpoint".equals(fieldName)) { - deserializedOtlpConfiguration.endpoint = reader.getString(); - } else if ("insecure".equals(fieldName)) { - deserializedOtlpConfiguration.insecure = reader.getNullable(JsonReader::getBoolean); - } else if ("headers".equals(fieldName)) { - List
headers = reader.readArray(reader1 -> Header.fromJson(reader1)); - deserializedOtlpConfiguration.headers = headers; - } else { - reader.skipChildren(); - } - } - - return deserializedOtlpConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java deleted file mode 100644 index 4b830fda01be..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java +++ /dev/null @@ -1,86 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The status of the patch once it has been provisioned. - */ -public final class PatchApplyStatus extends ExpandableStringEnum { - /** - * Static value NotStarted for PatchApplyStatus. - */ - public static final PatchApplyStatus NOT_STARTED = fromString("NotStarted"); - - /** - * Static value RebaseInProgress for PatchApplyStatus. - */ - public static final PatchApplyStatus REBASE_IN_PROGRESS = fromString("RebaseInProgress"); - - /** - * Static value CreatingRevision for PatchApplyStatus. - */ - public static final PatchApplyStatus CREATING_REVISION = fromString("CreatingRevision"); - - /** - * Static value Succeeded for PatchApplyStatus. - */ - public static final PatchApplyStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for PatchApplyStatus. - */ - public static final PatchApplyStatus CANCELED = fromString("Canceled"); - - /** - * Static value RebaseFailed for PatchApplyStatus. - */ - public static final PatchApplyStatus REBASE_FAILED = fromString("RebaseFailed"); - - /** - * Static value RevisionCreationFailed for PatchApplyStatus. - */ - public static final PatchApplyStatus REVISION_CREATION_FAILED = fromString("RevisionCreationFailed"); - - /** - * Static value ImagePushPullFailed for PatchApplyStatus. - */ - public static final PatchApplyStatus IMAGE_PUSH_PULL_FAILED = fromString("ImagePushPullFailed"); - - /** - * Static value ManuallySkipped for PatchApplyStatus. - */ - public static final PatchApplyStatus MANUALLY_SKIPPED = fromString("ManuallySkipped"); - - /** - * Creates a new instance of PatchApplyStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PatchApplyStatus() { - } - - /** - * Creates or finds a PatchApplyStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PatchApplyStatus. - */ - public static PatchApplyStatus fromString(String name) { - return fromString(name, PatchApplyStatus.class); - } - - /** - * Gets known PatchApplyStatus values. - * - * @return known PatchApplyStatus values. - */ - public static Collection values() { - return values(PatchApplyStatus.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java deleted file mode 100644 index ec63e8b856c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java +++ /dev/null @@ -1,135 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * Container App patch collection. - */ -@Fluent -public final class PatchCollection implements JsonSerializable { - /* - * Collection of patch resources. - */ - private List value; - - /* - * the link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of PatchCollection class. - */ - public PatchCollection() { - } - - /** - * Get the value property: Collection of patch resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of patch resources. - * - * @param value the value value to set. - * @return the PatchCollection object itself. - */ - public PatchCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: the link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: the link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the PatchCollection object itself. - */ - public PatchCollection 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) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model PatchCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PatchCollection.class); - - /** - * {@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 PatchCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchCollection 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 PatchCollection. - */ - public static PatchCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchCollection deserializedPatchCollection = new PatchCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ContainerAppsPatchResourceInner.fromJson(reader1)); - deserializedPatchCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPatchCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java deleted file mode 100644 index 9f7536135574..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java +++ /dev/null @@ -1,203 +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.appcontainers.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; -import java.time.OffsetDateTime; - -/** - * The detailed info of patch operation performing when applying a patch. - */ -@Immutable -public final class PatchDetails implements JsonSerializable { - /* - * The name of the target container for the patch. - */ - private String targetContainerName; - - /* - * The name of the target image for the patch. - */ - private String targetImage; - - /* - * The UTC timestamp that describes the latest detection was done. - */ - private OffsetDateTime lastDetectionTime; - - /* - * The status of the patch detection. - */ - private DetectionStatus detectionStatus; - - /* - * The name of the new image created by the patch. - */ - private String newImageName; - - /* - * New layer update details in the target image. - */ - private PatchDetailsNewLayer newLayer; - - /* - * The old layer details in the target image. - */ - private PatchDetailsOldLayer oldLayer; - - /* - * The type for the patch. - */ - private PatchType patchType; - - /** - * Creates an instance of PatchDetails class. - */ - public PatchDetails() { - } - - /** - * Get the targetContainerName property: The name of the target container for the patch. - * - * @return the targetContainerName value. - */ - public String targetContainerName() { - return this.targetContainerName; - } - - /** - * Get the targetImage property: The name of the target image for the patch. - * - * @return the targetImage value. - */ - public String targetImage() { - return this.targetImage; - } - - /** - * Get the lastDetectionTime property: The UTC timestamp that describes the latest detection was done. - * - * @return the lastDetectionTime value. - */ - public OffsetDateTime lastDetectionTime() { - return this.lastDetectionTime; - } - - /** - * Get the detectionStatus property: The status of the patch detection. - * - * @return the detectionStatus value. - */ - public DetectionStatus detectionStatus() { - return this.detectionStatus; - } - - /** - * Get the newImageName property: The name of the new image created by the patch. - * - * @return the newImageName value. - */ - public String newImageName() { - return this.newImageName; - } - - /** - * Get the newLayer property: New layer update details in the target image. - * - * @return the newLayer value. - */ - public PatchDetailsNewLayer newLayer() { - return this.newLayer; - } - - /** - * Get the oldLayer property: The old layer details in the target image. - * - * @return the oldLayer value. - */ - public PatchDetailsOldLayer oldLayer() { - return this.oldLayer; - } - - /** - * Get the patchType property: The type for the patch. - * - * @return the patchType value. - */ - public PatchType patchType() { - return this.patchType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (newLayer() != null) { - newLayer().validate(); - } - if (oldLayer() != null) { - oldLayer().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchDetails 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 PatchDetails. - */ - public static PatchDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchDetails deserializedPatchDetails = new PatchDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetContainerName".equals(fieldName)) { - deserializedPatchDetails.targetContainerName = reader.getString(); - } else if ("targetImage".equals(fieldName)) { - deserializedPatchDetails.targetImage = reader.getString(); - } else if ("lastDetectionTime".equals(fieldName)) { - deserializedPatchDetails.lastDetectionTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("detectionStatus".equals(fieldName)) { - deserializedPatchDetails.detectionStatus = DetectionStatus.fromString(reader.getString()); - } else if ("newImageName".equals(fieldName)) { - deserializedPatchDetails.newImageName = reader.getString(); - } else if ("newLayer".equals(fieldName)) { - deserializedPatchDetails.newLayer = PatchDetailsNewLayer.fromJson(reader); - } else if ("oldLayer".equals(fieldName)) { - deserializedPatchDetails.oldLayer = PatchDetailsOldLayer.fromJson(reader); - } else if ("patchType".equals(fieldName)) { - deserializedPatchDetails.patchType = PatchType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchDetails; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java deleted file mode 100644 index 0e6f2b59cab2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java +++ /dev/null @@ -1,149 +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.appcontainers.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 java.io.IOException; - -/** - * New layer update details in the target image. - */ -@Fluent -public final class PatchDetailsNewLayer implements JsonSerializable { - /* - * The details of the new layer for the target image. - */ - private String name; - - /* - * The framework and its version in the new run image for the target image. - */ - private String frameworkAndVersion; - - /* - * The OS name and its version in the new run image for the target image. - */ - private String osAndVersion; - - /** - * Creates an instance of PatchDetailsNewLayer class. - */ - public PatchDetailsNewLayer() { - } - - /** - * Get the name property: The details of the new layer for the target image. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The details of the new layer for the target image. - * - * @param name the name value to set. - * @return the PatchDetailsNewLayer object itself. - */ - public PatchDetailsNewLayer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the frameworkAndVersion property: The framework and its version in the new run image for the target image. - * - * @return the frameworkAndVersion value. - */ - public String frameworkAndVersion() { - return this.frameworkAndVersion; - } - - /** - * Set the frameworkAndVersion property: The framework and its version in the new run image for the target image. - * - * @param frameworkAndVersion the frameworkAndVersion value to set. - * @return the PatchDetailsNewLayer object itself. - */ - public PatchDetailsNewLayer withFrameworkAndVersion(String frameworkAndVersion) { - this.frameworkAndVersion = frameworkAndVersion; - return this; - } - - /** - * Get the osAndVersion property: The OS name and its version in the new run image for the target image. - * - * @return the osAndVersion value. - */ - public String osAndVersion() { - return this.osAndVersion; - } - - /** - * Set the osAndVersion property: The OS name and its version in the new run image for the target image. - * - * @param osAndVersion the osAndVersion value to set. - * @return the PatchDetailsNewLayer object itself. - */ - public PatchDetailsNewLayer withOsAndVersion(String osAndVersion) { - this.osAndVersion = osAndVersion; - 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("name", this.name); - jsonWriter.writeStringField("frameworkAndVersion", this.frameworkAndVersion); - jsonWriter.writeStringField("osAndVersion", this.osAndVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchDetailsNewLayer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchDetailsNewLayer 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 PatchDetailsNewLayer. - */ - public static PatchDetailsNewLayer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchDetailsNewLayer deserializedPatchDetailsNewLayer = new PatchDetailsNewLayer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPatchDetailsNewLayer.name = reader.getString(); - } else if ("frameworkAndVersion".equals(fieldName)) { - deserializedPatchDetailsNewLayer.frameworkAndVersion = reader.getString(); - } else if ("osAndVersion".equals(fieldName)) { - deserializedPatchDetailsNewLayer.osAndVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchDetailsNewLayer; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java deleted file mode 100644 index f67ae64e7ec5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java +++ /dev/null @@ -1,149 +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.appcontainers.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 java.io.IOException; - -/** - * The old layer details in the target image. - */ -@Fluent -public final class PatchDetailsOldLayer implements JsonSerializable { - /* - * The details of the old layer for the target image. - */ - private String name; - - /* - * The framework and its version in the old run image for the target image. - */ - private String frameworkAndVersion; - - /* - * The OS name and its version in the old run image for the target image. - */ - private String osAndVersion; - - /** - * Creates an instance of PatchDetailsOldLayer class. - */ - public PatchDetailsOldLayer() { - } - - /** - * Get the name property: The details of the old layer for the target image. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The details of the old layer for the target image. - * - * @param name the name value to set. - * @return the PatchDetailsOldLayer object itself. - */ - public PatchDetailsOldLayer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the frameworkAndVersion property: The framework and its version in the old run image for the target image. - * - * @return the frameworkAndVersion value. - */ - public String frameworkAndVersion() { - return this.frameworkAndVersion; - } - - /** - * Set the frameworkAndVersion property: The framework and its version in the old run image for the target image. - * - * @param frameworkAndVersion the frameworkAndVersion value to set. - * @return the PatchDetailsOldLayer object itself. - */ - public PatchDetailsOldLayer withFrameworkAndVersion(String frameworkAndVersion) { - this.frameworkAndVersion = frameworkAndVersion; - return this; - } - - /** - * Get the osAndVersion property: The OS name and its version in the old run image for the target image. - * - * @return the osAndVersion value. - */ - public String osAndVersion() { - return this.osAndVersion; - } - - /** - * Set the osAndVersion property: The OS name and its version in the old run image for the target image. - * - * @param osAndVersion the osAndVersion value to set. - * @return the PatchDetailsOldLayer object itself. - */ - public PatchDetailsOldLayer withOsAndVersion(String osAndVersion) { - this.osAndVersion = osAndVersion; - 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("name", this.name); - jsonWriter.writeStringField("frameworkAndVersion", this.frameworkAndVersion); - jsonWriter.writeStringField("osAndVersion", this.osAndVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchDetailsOldLayer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchDetailsOldLayer 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 PatchDetailsOldLayer. - */ - public static PatchDetailsOldLayer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchDetailsOldLayer deserializedPatchDetailsOldLayer = new PatchDetailsOldLayer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPatchDetailsOldLayer.name = reader.getString(); - } else if ("frameworkAndVersion".equals(fieldName)) { - deserializedPatchDetailsOldLayer.frameworkAndVersion = reader.getString(); - } else if ("osAndVersion".equals(fieldName)) { - deserializedPatchDetailsOldLayer.osAndVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchDetailsOldLayer; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java deleted file mode 100644 index 42bd0ccf9f07..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java +++ /dev/null @@ -1,222 +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.appcontainers.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; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Top level properties that describes current states of the patch resource. - */ -@Fluent -public final class PatchProperties implements JsonSerializable { - /* - * The Azure resource id of the target environment for the patch. - */ - private String targetEnvironmentId; - - /* - * The Azure resource id of the target container app for the patch. - */ - private String targetContainerAppId; - - /* - * The Azure resource id of the target revision for the patch. - */ - private String targetRevisionId; - - /* - * The status of the patch operation. - */ - private PatchApplyStatus patchApplyStatus; - - /* - * The UTC timestamp that describes when the patch object was created. - */ - private OffsetDateTime createdAt; - - /* - * The UTC timestamp that describes when the patch object was last updated. - */ - private OffsetDateTime lastModifiedAt; - - /* - * Detailed info describes the patch operation for the target container app. - */ - private List patchDetails; - - /** - * Creates an instance of PatchProperties class. - */ - public PatchProperties() { - } - - /** - * Get the targetEnvironmentId property: The Azure resource id of the target environment for the patch. - * - * @return the targetEnvironmentId value. - */ - public String targetEnvironmentId() { - return this.targetEnvironmentId; - } - - /** - * Set the targetEnvironmentId property: The Azure resource id of the target environment for the patch. - * - * @param targetEnvironmentId the targetEnvironmentId value to set. - * @return the PatchProperties object itself. - */ - public PatchProperties withTargetEnvironmentId(String targetEnvironmentId) { - this.targetEnvironmentId = targetEnvironmentId; - return this; - } - - /** - * Get the targetContainerAppId property: The Azure resource id of the target container app for the patch. - * - * @return the targetContainerAppId value. - */ - public String targetContainerAppId() { - return this.targetContainerAppId; - } - - /** - * Set the targetContainerAppId property: The Azure resource id of the target container app for the patch. - * - * @param targetContainerAppId the targetContainerAppId value to set. - * @return the PatchProperties object itself. - */ - public PatchProperties withTargetContainerAppId(String targetContainerAppId) { - this.targetContainerAppId = targetContainerAppId; - return this; - } - - /** - * Get the targetRevisionId property: The Azure resource id of the target revision for the patch. - * - * @return the targetRevisionId value. - */ - public String targetRevisionId() { - return this.targetRevisionId; - } - - /** - * Set the targetRevisionId property: The Azure resource id of the target revision for the patch. - * - * @param targetRevisionId the targetRevisionId value to set. - * @return the PatchProperties object itself. - */ - public PatchProperties withTargetRevisionId(String targetRevisionId) { - this.targetRevisionId = targetRevisionId; - return this; - } - - /** - * Get the patchApplyStatus property: The status of the patch operation. - * - * @return the patchApplyStatus value. - */ - public PatchApplyStatus patchApplyStatus() { - return this.patchApplyStatus; - } - - /** - * Get the createdAt property: The UTC timestamp that describes when the patch object was created. - * - * @return the createdAt value. - */ - public OffsetDateTime createdAt() { - return this.createdAt; - } - - /** - * Get the lastModifiedAt property: The UTC timestamp that describes when the patch object was last updated. - * - * @return the lastModifiedAt value. - */ - public OffsetDateTime lastModifiedAt() { - return this.lastModifiedAt; - } - - /** - * Get the patchDetails property: Detailed info describes the patch operation for the target container app. - * - * @return the patchDetails value. - */ - public List patchDetails() { - return this.patchDetails; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (patchDetails() != null) { - patchDetails().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetEnvironmentId", this.targetEnvironmentId); - jsonWriter.writeStringField("targetContainerAppId", this.targetContainerAppId); - jsonWriter.writeStringField("targetRevisionId", this.targetRevisionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchProperties 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 PatchProperties. - */ - public static PatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchProperties deserializedPatchProperties = new PatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetEnvironmentId".equals(fieldName)) { - deserializedPatchProperties.targetEnvironmentId = reader.getString(); - } else if ("targetContainerAppId".equals(fieldName)) { - deserializedPatchProperties.targetContainerAppId = reader.getString(); - } else if ("targetRevisionId".equals(fieldName)) { - deserializedPatchProperties.targetRevisionId = reader.getString(); - } else if ("patchApplyStatus".equals(fieldName)) { - deserializedPatchProperties.patchApplyStatus = PatchApplyStatus.fromString(reader.getString()); - } else if ("createdAt".equals(fieldName)) { - deserializedPatchProperties.createdAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastModifiedAt".equals(fieldName)) { - deserializedPatchProperties.lastModifiedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("patchDetails".equals(fieldName)) { - List patchDetails = reader.readArray(reader1 -> PatchDetails.fromJson(reader1)); - deserializedPatchProperties.patchDetails = patchDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedPatchProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java deleted file mode 100644 index 8d8868383d61..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java +++ /dev/null @@ -1,93 +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.appcontainers.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 java.io.IOException; - -/** - * The configuration for patcher to skip a patch or not. - */ -@Fluent -public final class PatchSkipConfig implements JsonSerializable { - /* - * The flag to indicate whether to skip the patch or not. - */ - private Boolean skip; - - /** - * Creates an instance of PatchSkipConfig class. - */ - public PatchSkipConfig() { - } - - /** - * Get the skip property: The flag to indicate whether to skip the patch or not. - * - * @return the skip value. - */ - public Boolean skip() { - return this.skip; - } - - /** - * Set the skip property: The flag to indicate whether to skip the patch or not. - * - * @param skip the skip value to set. - * @return the PatchSkipConfig object itself. - */ - public PatchSkipConfig withSkip(Boolean skip) { - this.skip = skip; - 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.writeBooleanField("skip", this.skip); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchSkipConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchSkipConfig 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 PatchSkipConfig. - */ - public static PatchSkipConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchSkipConfig deserializedPatchSkipConfig = new PatchSkipConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("skip".equals(fieldName)) { - deserializedPatchSkipConfig.skip = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchSkipConfig; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java deleted file mode 100644 index 3ee6cd1a3fd4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java +++ /dev/null @@ -1,61 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type for the patch. - */ -public final class PatchType extends ExpandableStringEnum { - /** - * Static value FrameworkSecurity for PatchType. - */ - public static final PatchType FRAMEWORK_SECURITY = fromString("FrameworkSecurity"); - - /** - * Static value OSSecurity for PatchType. - */ - public static final PatchType OSSECURITY = fromString("OSSecurity"); - - /** - * Static value FrameworkAndOSSecurity for PatchType. - */ - public static final PatchType FRAMEWORK_AND_OSSECURITY = fromString("FrameworkAndOSSecurity"); - - /** - * Static value Other for PatchType. - */ - public static final PatchType OTHER = fromString("Other"); - - /** - * Creates a new instance of PatchType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PatchType() { - } - - /** - * Creates or finds a PatchType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PatchType. - */ - public static PatchType fromString(String name) { - return fromString(name, PatchType.class); - } - - /** - * Gets known PatchType values. - * - * @return known PatchType values. - */ - public static Collection values() { - return values(PatchType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java deleted file mode 100644 index f2f90e3e0956..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java +++ /dev/null @@ -1,58 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic - * mode will automatically apply available patches. Manual mode will require the user to manually apply patches. - * Disabled mode will stop patch detection and auto patching. - */ -public final class PatchingMode extends ExpandableStringEnum { - /** - * Static value Automatic for PatchingMode. - */ - public static final PatchingMode AUTOMATIC = fromString("Automatic"); - - /** - * Static value Manual for PatchingMode. - */ - public static final PatchingMode MANUAL = fromString("Manual"); - - /** - * Static value Disabled for PatchingMode. - */ - public static final PatchingMode DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PatchingMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PatchingMode() { - } - - /** - * Creates or finds a PatchingMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding PatchingMode. - */ - public static PatchingMode fromString(String name) { - return fromString(name, PatchingMode.class); - } - - /** - * Gets known PatchingMode values. - * - * @return known PatchingMode values. - */ - public static Collection values() { - return values(PatchingMode.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java deleted file mode 100644 index cfc480dae4f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java +++ /dev/null @@ -1,154 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Model representing a pre-build step. - */ -@Fluent -public final class PreBuildStep implements JsonSerializable { - /* - * Description of the pre-build step. - */ - private String description; - - /* - * List of custom commands to run. - */ - private List scripts; - - /* - * Http get request to send before the build. - */ - private HttpGet httpGet; - - /** - * Creates an instance of PreBuildStep class. - */ - public PreBuildStep() { - } - - /** - * Get the description property: Description of the pre-build step. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the pre-build step. - * - * @param description the description value to set. - * @return the PreBuildStep object itself. - */ - public PreBuildStep withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the scripts property: List of custom commands to run. - * - * @return the scripts value. - */ - public List scripts() { - return this.scripts; - } - - /** - * Set the scripts property: List of custom commands to run. - * - * @param scripts the scripts value to set. - * @return the PreBuildStep object itself. - */ - public PreBuildStep withScripts(List scripts) { - this.scripts = scripts; - return this; - } - - /** - * Get the httpGet property: Http get request to send before the build. - * - * @return the httpGet value. - */ - public HttpGet httpGet() { - return this.httpGet; - } - - /** - * Set the httpGet property: Http get request to send before the build. - * - * @param httpGet the httpGet value to set. - * @return the PreBuildStep object itself. - */ - public PreBuildStep withHttpGet(HttpGet httpGet) { - this.httpGet = httpGet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpGet() != null) { - httpGet().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("scripts", this.scripts, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("httpGet", this.httpGet); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PreBuildStep from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PreBuildStep 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 PreBuildStep. - */ - public static PreBuildStep fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PreBuildStep deserializedPreBuildStep = new PreBuildStep(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedPreBuildStep.description = reader.getString(); - } else if ("scripts".equals(fieldName)) { - List scripts = reader.readArray(reader1 -> reader1.getString()); - deserializedPreBuildStep.scripts = scripts; - } else if ("httpGet".equals(fieldName)) { - deserializedPreBuildStep.httpGet = HttpGet.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPreBuildStep; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java deleted file mode 100644 index 93625e4abf73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java +++ /dev/null @@ -1,81 +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.appcontainers.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; - -/** - * The Private Endpoint resource. - */ -@Immutable -public final class PrivateEndpoint implements JsonSerializable { - /* - * The ARM identifier for Private Endpoint - */ - private String id; - - /** - * Creates an instance of PrivateEndpoint class. - */ - public PrivateEndpoint() { - } - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * 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(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpoint 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 PrivateEndpoint. - */ - public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpoint.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpoint; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java deleted file mode 100644 index d0cd177423c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,245 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import java.util.List; - -/** - * An immutable client-side representation of PrivateEndpointConnection. - */ -public interface PrivateEndpointConnection { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the groupIds property: The group ids for the private endpoint resource. - * - * @return the groupIds value. - */ - List groupIds(); - - /** - * Gets the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - PrivateEndpoint privateEndpoint(); - - /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); - - /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - PrivateEndpointConnectionProvisioningState provisioningState(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner object. - * - * @return the inner object. - */ - PrivateEndpointConnectionInner innerModel(); - - /** - * The entirety of the PrivateEndpointConnection definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The PrivateEndpointConnection definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the PrivateEndpointConnection definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - - /** - * The stage of the PrivateEndpointConnection 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.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateEndpointConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateEndpointConnection create(Context context); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. - */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - WithCreate withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - - /** - * Begins update for the PrivateEndpointConnection resource. - * - * @return the stage of resource update. - */ - PrivateEndpointConnection.Update update(); - - /** - * The template for PrivateEndpointConnection update. - */ - interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateEndpointConnection apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateEndpointConnection apply(Context context); - } - - /** - * The PrivateEndpointConnection update stages. - */ - interface UpdateStages { - /** - * The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. - */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - - /** - * The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - Update withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateEndpointConnection refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java deleted file mode 100644 index 75d88ee3d0b9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java +++ /dev/null @@ -1,118 +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.appcontainers.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.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.util.List; - -/** - * List of private endpoint connection associated with the specified resource. - */ -@Fluent -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { - /* - * Array of private endpoint connections - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of PrivateEndpointConnectionListResult class. - */ - public PrivateEndpointConnectionListResult() { - } - - /** - * Get the value property: Array of private endpoint connections. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult 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). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult 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 PrivateEndpointConnectionListResult. - */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionListResult; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java deleted file mode 100644 index 8f010fe26dd4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java +++ /dev/null @@ -1,77 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The current provisioning state. - */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** - * Static value Succeeded for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Waiting for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState WAITING = fromString("Waiting"); - - /** - * Static value Updating for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value Pending for PrivateEndpointConnectionProvisioningState. - */ - public static final PrivateEndpointConnectionProvisioningState PENDING = fromString("Pending"); - - /** - * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointConnectionProvisioningState() { - } - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - public static PrivateEndpointConnectionProvisioningState fromString(String name) { - return fromString(name, PrivateEndpointConnectionProvisioningState.class); - } - - /** - * Gets known PrivateEndpointConnectionProvisioningState values. - * - * @return known PrivateEndpointConnectionProvisioningState values. - */ - public static Collection values() { - return values(PrivateEndpointConnectionProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index b56460c10ee8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java +++ /dev/null @@ -1,62 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The private endpoint connection status. - */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** - * Static value Pending for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** - * Static value Approved for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** - * Static value Rejected for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Static value Disconnected for PrivateEndpointServiceConnectionStatus. - */ - public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** - * Gets known PrivateEndpointServiceConnectionStatus values. - * - * @return known PrivateEndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java deleted file mode 100644 index 43ea727b07d3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java +++ /dev/null @@ -1,70 +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.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import java.util.List; - -/** - * An immutable client-side representation of PrivateLinkResource. - */ -public interface PrivateLinkResource { - /** - * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - String groupId(); - - /** - * Gets the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - List requiredMembers(); - - /** - * Gets the requiredZoneNames property: The private link resource private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - List requiredZoneNames(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner object. - * - * @return the inner object. - */ - PrivateLinkResourceInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java deleted file mode 100644 index c6e6c7160c7c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java +++ /dev/null @@ -1,117 +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.appcontainers.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.appcontainers.fluent.models.PrivateLinkResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Fluent -public final class PrivateLinkResourceListResult implements JsonSerializable { - /* - * Array of private link resources - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - private String nextLink; - - /** - * Creates an instance of PrivateLinkResourceListResult class. - */ - public PrivateLinkResourceListResult() { - } - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResult object itself. - */ - public PrivateLinkResourceListResult 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). - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResult 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 PrivateLinkResourceListResult. - */ - public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult - = new PrivateLinkResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedPrivateLinkResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResult; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index 0c31b2ae3d9c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,155 +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.appcontainers.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 java.io.IOException; - -/** - * A collection of information about the state of the connection between service consumer and provider. - */ -@Fluent -public final class PrivateLinkServiceConnectionState implements JsonSerializable { - /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - */ - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - private String description; - - /* - * A message indicating if changes on the service provider require any updates on the consumer. - */ - private String actionsRequired; - - /** - * Creates an instance of PrivateLinkServiceConnectionState class. - */ - public PrivateLinkServiceConnectionState() { - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The reason for approval/rejection of the connection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - 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("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("actionsRequired", this.actionsRequired); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkServiceConnectionState 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 PrivateLinkServiceConnectionState. - */ - public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState - = new PrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkServiceConnectionState; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java deleted file mode 100644 index 0dacf1daad39..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java +++ /dev/null @@ -1,51 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. - */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java index 28823652940e..7e6a12306caa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java @@ -61,11 +61,6 @@ public final class ReplicaContainer implements JsonSerializable { - /* - * Replica Name. - */ - private String name; - - /* - * Containers in the execution replica - */ - private List containers; - - /** - * Creates an instance of ReplicaExecutionStatus class. - */ - public ReplicaExecutionStatus() { - } - - /** - * Get the name property: Replica Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Replica Name. - * - * @param name the name value to set. - * @return the ReplicaExecutionStatus object itself. - */ - public ReplicaExecutionStatus withName(String name) { - this.name = name; - return this; - } - - /** - * Get the containers property: Containers in the execution replica. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: Containers in the execution replica. - * - * @param containers the containers value to set. - * @return the ReplicaExecutionStatus object itself. - */ - public ReplicaExecutionStatus withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicaExecutionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicaExecutionStatus 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 ReplicaExecutionStatus. - */ - public static ReplicaExecutionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicaExecutionStatus deserializedReplicaExecutionStatus = new ReplicaExecutionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedReplicaExecutionStatus.name = reader.getString(); - } else if ("containers".equals(fieldName)) { - List containers - = reader.readArray(reader1 -> ContainerExecutionStatus.fromJson(reader1)); - deserializedReplicaExecutionStatus.containers = containers; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicaExecutionStatus; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java index 22dc30e0dfea..dcbadf50b1cf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java @@ -21,11 +21,6 @@ public final class Runtime implements JsonSerializable { */ private RuntimeJava java; - /* - * .NET app configuration - */ - private RuntimeDotnet dotnet; - /** * Creates an instance of Runtime class. */ @@ -52,26 +47,6 @@ public Runtime withJava(RuntimeJava java) { return this; } - /** - * Get the dotnet property: .NET app configuration. - * - * @return the dotnet value. - */ - public RuntimeDotnet dotnet() { - return this.dotnet; - } - - /** - * Set the dotnet property: .NET app configuration. - * - * @param dotnet the dotnet value to set. - * @return the Runtime object itself. - */ - public Runtime withDotnet(RuntimeDotnet dotnet) { - this.dotnet = dotnet; - return this; - } - /** * Validates the instance. * @@ -81,9 +56,6 @@ public void validate() { if (java() != null) { java().validate(); } - if (dotnet() != null) { - dotnet().validate(); - } } /** @@ -93,7 +65,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("java", this.java); - jsonWriter.writeJsonField("dotnet", this.dotnet); return jsonWriter.writeEndObject(); } @@ -114,8 +85,6 @@ public static Runtime fromJson(JsonReader jsonReader) throws IOException { if ("java".equals(fieldName)) { deserializedRuntime.java = RuntimeJava.fromJson(reader); - } else if ("dotnet".equals(fieldName)) { - deserializedRuntime.dotnet = RuntimeDotnet.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java deleted file mode 100644 index 7014ac13eed6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java +++ /dev/null @@ -1,93 +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.appcontainers.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 java.io.IOException; - -/** - * .NET app configuration. - */ -@Fluent -public final class RuntimeDotnet implements JsonSerializable { - /* - * Auto configure the ASP.NET Core Data Protection feature - */ - private Boolean autoConfigureDataProtection; - - /** - * Creates an instance of RuntimeDotnet class. - */ - public RuntimeDotnet() { - } - - /** - * Get the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. - * - * @return the autoConfigureDataProtection value. - */ - public Boolean autoConfigureDataProtection() { - return this.autoConfigureDataProtection; - } - - /** - * Set the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. - * - * @param autoConfigureDataProtection the autoConfigureDataProtection value to set. - * @return the RuntimeDotnet object itself. - */ - public RuntimeDotnet withAutoConfigureDataProtection(Boolean autoConfigureDataProtection) { - this.autoConfigureDataProtection = autoConfigureDataProtection; - 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.writeBooleanField("autoConfigureDataProtection", this.autoConfigureDataProtection); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeDotnet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeDotnet 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 RuntimeDotnet. - */ - public static RuntimeDotnet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeDotnet deserializedRuntimeDotnet = new RuntimeDotnet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("autoConfigureDataProtection".equals(fieldName)) { - deserializedRuntimeDotnet.autoConfigureDataProtection = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeDotnet; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java index 93e9e6efbbd2..46d95eea9b05 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java @@ -21,11 +21,6 @@ public final class RuntimeJava implements JsonSerializable { */ private Boolean enableMetrics; - /* - * Diagnostic capabilities achieved by java agent - */ - private RuntimeJavaAgent javaAgent; - /** * Creates an instance of RuntimeJava class. */ @@ -52,35 +47,12 @@ public RuntimeJava withEnableMetrics(Boolean enableMetrics) { return this; } - /** - * Get the javaAgent property: Diagnostic capabilities achieved by java agent. - * - * @return the javaAgent value. - */ - public RuntimeJavaAgent javaAgent() { - return this.javaAgent; - } - - /** - * Set the javaAgent property: Diagnostic capabilities achieved by java agent. - * - * @param javaAgent the javaAgent value to set. - * @return the RuntimeJava object itself. - */ - public RuntimeJava withJavaAgent(RuntimeJavaAgent javaAgent) { - this.javaAgent = javaAgent; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (javaAgent() != null) { - javaAgent().validate(); - } } /** @@ -90,7 +62,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enableMetrics", this.enableMetrics); - jsonWriter.writeJsonField("javaAgent", this.javaAgent); return jsonWriter.writeEndObject(); } @@ -111,8 +82,6 @@ public static RuntimeJava fromJson(JsonReader jsonReader) throws IOException { if ("enableMetrics".equals(fieldName)) { deserializedRuntimeJava.enableMetrics = reader.getNullable(JsonReader::getBoolean); - } else if ("javaAgent".equals(fieldName)) { - deserializedRuntimeJava.javaAgent = RuntimeJavaAgent.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java deleted file mode 100644 index 4287f43e0134..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java +++ /dev/null @@ -1,124 +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.appcontainers.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 java.io.IOException; - -/** - * Diagnostic capabilities achieved by java agent. - */ -@Fluent -public final class RuntimeJavaAgent implements JsonSerializable { - /* - * Enable java agent injection for the java app. - */ - private Boolean enabled; - - /* - * Capabilities on the java logging scenario. - */ - private RuntimeJavaAgentLogging logging; - - /** - * Creates an instance of RuntimeJavaAgent class. - */ - public RuntimeJavaAgent() { - } - - /** - * Get the enabled property: Enable java agent injection for the java app. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Enable java agent injection for the java app. - * - * @param enabled the enabled value to set. - * @return the RuntimeJavaAgent object itself. - */ - public RuntimeJavaAgent withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the logging property: Capabilities on the java logging scenario. - * - * @return the logging value. - */ - public RuntimeJavaAgentLogging logging() { - return this.logging; - } - - /** - * Set the logging property: Capabilities on the java logging scenario. - * - * @param logging the logging value to set. - * @return the RuntimeJavaAgent object itself. - */ - public RuntimeJavaAgent withLogging(RuntimeJavaAgentLogging logging) { - this.logging = logging; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logging() != null) { - logging().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("logging", this.logging); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeJavaAgent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeJavaAgent 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 RuntimeJavaAgent. - */ - public static RuntimeJavaAgent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeJavaAgent deserializedRuntimeJavaAgent = new RuntimeJavaAgent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedRuntimeJavaAgent.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("logging".equals(fieldName)) { - deserializedRuntimeJavaAgent.logging = RuntimeJavaAgentLogging.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeJavaAgent; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java deleted file mode 100644 index eeda05ff1b8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java +++ /dev/null @@ -1,99 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Capabilities on the java logging scenario. - */ -@Fluent -public final class RuntimeJavaAgentLogging implements JsonSerializable { - /* - * Settings of the logger for the java app. - */ - private List loggerSettings; - - /** - * Creates an instance of RuntimeJavaAgentLogging class. - */ - public RuntimeJavaAgentLogging() { - } - - /** - * Get the loggerSettings property: Settings of the logger for the java app. - * - * @return the loggerSettings value. - */ - public List loggerSettings() { - return this.loggerSettings; - } - - /** - * Set the loggerSettings property: Settings of the logger for the java app. - * - * @param loggerSettings the loggerSettings value to set. - * @return the RuntimeJavaAgentLogging object itself. - */ - public RuntimeJavaAgentLogging withLoggerSettings(List loggerSettings) { - this.loggerSettings = loggerSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (loggerSettings() != null) { - loggerSettings().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("loggerSettings", this.loggerSettings, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeJavaAgentLogging from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeJavaAgentLogging 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 RuntimeJavaAgentLogging. - */ - public static RuntimeJavaAgentLogging fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeJavaAgentLogging deserializedRuntimeJavaAgentLogging = new RuntimeJavaAgentLogging(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loggerSettings".equals(fieldName)) { - List loggerSettings = reader.readArray(reader1 -> LoggerSetting.fromJson(reader1)); - deserializedRuntimeJavaAgentLogging.loggerSettings = loggerSettings; - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeJavaAgentLogging; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java index a4dd0926cc51..7340e4e8d0da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java @@ -28,12 +28,12 @@ public final class Scale implements JsonSerializable { private Integer maxReplicas; /* - * Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. + * Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set. */ private Integer cooldownPeriod; /* - * Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. + * Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set. */ private Integer pollingInterval; @@ -89,7 +89,7 @@ public Scale withMaxReplicas(Integer maxReplicas) { } /** - * Get the cooldownPeriod property: Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. + * Get the cooldownPeriod property: Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set. * * @return the cooldownPeriod value. */ @@ -98,7 +98,7 @@ public Integer cooldownPeriod() { } /** - * Set the cooldownPeriod property: Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. + * Set the cooldownPeriod property: Optional. KEDA Cooldown Period in seconds. Defaults to 300 seconds if not set. * * @param cooldownPeriod the cooldownPeriod value to set. * @return the Scale object itself. @@ -109,7 +109,7 @@ public Scale withCooldownPeriod(Integer cooldownPeriod) { } /** - * Get the pollingInterval property: Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. + * Get the pollingInterval property: Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set. * * @return the pollingInterval value. */ @@ -118,7 +118,7 @@ public Integer pollingInterval() { } /** - * Set the pollingInterval property: Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. + * Set the pollingInterval property: Optional. KEDA Polling Interval in seconds. Defaults to 30 seconds if not set. * * @param pollingInterval the pollingInterval value to set. * @return the Scale object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java deleted file mode 100644 index 05dd4be6c060..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java +++ /dev/null @@ -1,218 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Cloud Gateway route definition. - */ -@Fluent -public final class ScgRoute implements JsonSerializable { - /* - * Id of the route - */ - private String id; - - /* - * Uri of the route - */ - private String uri; - - /* - * Predicates of the route - */ - private List predicates; - - /* - * Filters of the route - */ - private List filters; - - /* - * Order of the route - */ - private Long order; - - /** - * Creates an instance of ScgRoute class. - */ - public ScgRoute() { - } - - /** - * Get the id property: Id of the route. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Id of the route. - * - * @param id the id value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withId(String id) { - this.id = id; - return this; - } - - /** - * Get the uri property: Uri of the route. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Uri of the route. - * - * @param uri the uri value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the predicates property: Predicates of the route. - * - * @return the predicates value. - */ - public List predicates() { - return this.predicates; - } - - /** - * Set the predicates property: Predicates of the route. - * - * @param predicates the predicates value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withPredicates(List predicates) { - this.predicates = predicates; - return this; - } - - /** - * Get the filters property: Filters of the route. - * - * @return the filters value. - */ - public List filters() { - return this.filters; - } - - /** - * Set the filters property: Filters of the route. - * - * @param filters the filters value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withFilters(List filters) { - this.filters = filters; - return this; - } - - /** - * Get the order property: Order of the route. - * - * @return the order value. - */ - public Long order() { - return this.order; - } - - /** - * Set the order property: Order of the route. - * - * @param order the order value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withOrder(Long order) { - this.order = order; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property id in model ScgRoute")); - } - if (uri() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property uri in model ScgRoute")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScgRoute.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeArrayField("predicates", this.predicates, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("filters", this.filters, (writer, element) -> writer.writeString(element)); - jsonWriter.writeNumberField("order", this.order); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScgRoute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScgRoute 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 ScgRoute. - */ - public static ScgRoute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScgRoute deserializedScgRoute = new ScgRoute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScgRoute.id = reader.getString(); - } else if ("uri".equals(fieldName)) { - deserializedScgRoute.uri = reader.getString(); - } else if ("predicates".equals(fieldName)) { - List predicates = reader.readArray(reader1 -> reader1.getString()); - deserializedScgRoute.predicates = predicates; - } else if ("filters".equals(fieldName)) { - List filters = reader.readArray(reader1 -> reader1.getString()); - deserializedScgRoute.filters = filters; - } else if ("order".equals(fieldName)) { - deserializedScgRoute.order = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedScgRoute; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java index 07493cbd84d3..0bf6482a7897 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Map; /** * Configuration to bind a ContainerApp to a dev ContainerApp Service. @@ -27,16 +26,6 @@ public final class ServiceBind implements JsonSerializable { */ private String name; - /* - * Type of the client to be used to connect to the service - */ - private String clientType; - - /* - * Customized keys for customizing injected values to the app - */ - private Map customizedKeys; - /** * Creates an instance of ServiceBind class. */ @@ -83,46 +72,6 @@ public ServiceBind withName(String name) { return this; } - /** - * Get the clientType property: Type of the client to be used to connect to the service. - * - * @return the clientType value. - */ - public String clientType() { - return this.clientType; - } - - /** - * Set the clientType property: Type of the client to be used to connect to the service. - * - * @param clientType the clientType value to set. - * @return the ServiceBind object itself. - */ - public ServiceBind withClientType(String clientType) { - this.clientType = clientType; - return this; - } - - /** - * Get the customizedKeys property: Customized keys for customizing injected values to the app. - * - * @return the customizedKeys value. - */ - public Map customizedKeys() { - return this.customizedKeys; - } - - /** - * Set the customizedKeys property: Customized keys for customizing injected values to the app. - * - * @param customizedKeys the customizedKeys value to set. - * @return the ServiceBind object itself. - */ - public ServiceBind withCustomizedKeys(Map customizedKeys) { - this.customizedKeys = customizedKeys; - return this; - } - /** * Validates the instance. * @@ -139,9 +88,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("serviceId", this.serviceId); jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("clientType", this.clientType); - jsonWriter.writeMapField("customizedKeys", this.customizedKeys, - (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -164,11 +110,6 @@ public static ServiceBind fromJson(JsonReader jsonReader) throws IOException { deserializedServiceBind.serviceId = reader.getString(); } else if ("name".equals(fieldName)) { deserializedServiceBind.name = reader.getString(); - } else if ("clientType".equals(fieldName)) { - deserializedServiceBind.clientType = reader.getString(); - } else if ("customizedKeys".equals(fieldName)) { - Map customizedKeys = reader.readMap(reader1 -> reader1.getString()); - deserializedServiceBind.customizedKeys = customizedKeys; } else { reader.skipChildren(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java index 563164248f5c..a471b3513dc2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java @@ -50,6 +50,14 @@ public interface SessionPool { */ Map tags(); + /** + * Gets the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -135,6 +143,14 @@ public interface SessionPool { */ SessionPoolProvisioningState provisioningState(); + /** + * Gets the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned to the + * Session pool. + * + * @return the managedIdentitySettings value. + */ + List managedIdentitySettings(); + /** * Gets the region of the resource. * @@ -219,10 +235,11 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithEnvironmentId, DefinitionStages.WithContainerType, - DefinitionStages.WithPoolManagementType, DefinitionStages.WithScaleConfiguration, - DefinitionStages.WithSecrets, DefinitionStages.WithDynamicPoolConfiguration, - DefinitionStages.WithCustomContainerTemplate, DefinitionStages.WithSessionNetworkConfiguration { + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithEnvironmentId, + DefinitionStages.WithContainerType, DefinitionStages.WithPoolManagementType, + DefinitionStages.WithScaleConfiguration, DefinitionStages.WithSecrets, + DefinitionStages.WithDynamicPoolConfiguration, DefinitionStages.WithCustomContainerTemplate, + DefinitionStages.WithSessionNetworkConfiguration, DefinitionStages.WithManagedIdentitySettings { /** * Executes the create request. * @@ -252,6 +269,21 @@ interface WithTags { WithCreate withTags(Map tags); } + /** + * The stage of the SessionPool definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed identities needed by a session pool to interact with other Azure + * services to not maintain any secrets or credentials in code.. + * + * @param identity Managed identities needed by a session pool to interact with other Azure services to not + * maintain any secrets or credentials in code. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the SessionPool definition allowing to specify environmentId. */ @@ -359,6 +391,21 @@ interface WithSessionNetworkConfiguration { */ WithCreate withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration); } + + /** + * The stage of the SessionPool definition allowing to specify managedIdentitySettings. + */ + interface WithManagedIdentitySettings { + /** + * Specifies the managedIdentitySettings property: Optional settings for a Managed Identity that is assigned + * to the Session pool.. + * + * @param managedIdentitySettings Optional settings for a Managed Identity that is assigned to the Session + * pool. + * @return the next definition stage. + */ + WithCreate withManagedIdentitySettings(List managedIdentitySettings); + } } /** @@ -371,8 +418,8 @@ interface WithSessionNetworkConfiguration { /** * The template for SessionPool update. */ - interface Update extends UpdateStages.WithScaleConfiguration, UpdateStages.WithSecrets, - UpdateStages.WithDynamicPoolConfiguration, UpdateStages.WithCustomContainerTemplate, + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithScaleConfiguration, + UpdateStages.WithSecrets, UpdateStages.WithDynamicPoolConfiguration, UpdateStages.WithCustomContainerTemplate, UpdateStages.WithSessionNetworkConfiguration { /** * Executes the update request. @@ -394,6 +441,34 @@ interface Update extends UpdateStages.WithScaleConfiguration, UpdateStages.WithS * The SessionPool update stages. */ interface UpdateStages { + /** + * The stage of the SessionPool update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the SessionPool update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed identities needed by a session pool to interact with other Azure + * services to not maintain any secrets or credentials in code.. + * + * @param identity Managed identities needed by a session pool to interact with other Azure services to not + * maintain any secrets or credentials in code. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the SessionPool update allowing to specify scaleConfiguration. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java index de08b47b1586..8bf5d7545782 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java @@ -12,12 +12,24 @@ import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolUpdatablePropertiesProperties; import java.io.IOException; import java.util.List; +import java.util.Map; /** * Container App session pool updatable properties. */ @Fluent public final class SessionPoolUpdatableProperties implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or + * credentials in code. + */ + private ManagedServiceIdentity identity; + /* * Session pool resource specific updatable properties. */ @@ -29,6 +41,48 @@ public final class SessionPoolUpdatableProperties implements JsonSerializable tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed identities needed by a session pool to interact with other Azure services to + * not maintain any secrets or credentials in code. + * + * @param identity the identity value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the innerProperties property: Session pool resource specific updatable properties. * @@ -163,6 +217,9 @@ public SessionNetworkConfiguration sessionNetworkConfiguration() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } @@ -174,6 +231,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); return jsonWriter.writeEndObject(); } @@ -194,7 +253,12 @@ public static SessionPoolUpdatableProperties fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("properties".equals(fieldName)) { + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSessionPoolUpdatableProperties.tags = tags; + } else if ("identity".equals(fieldName)) { + deserializedSessionPoolUpdatableProperties.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { deserializedSessionPoolUpdatableProperties.innerProperties = SessionPoolUpdatablePropertiesProperties.fromJson(reader); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java deleted file mode 100644 index c5667f1d4fb2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java +++ /dev/null @@ -1,233 +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.appcontainers.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 java.io.IOException; - -/** - * SMB storage properties. - */ -@Fluent -public final class SmbStorage implements JsonSerializable { - /* - * The host name or IP address of the SMB server. - */ - private String host; - - /* - * The path to the SMB shared folder. - */ - private String shareName; - - /* - * The user to log on to the SMB server. - */ - private String username; - - /* - * The domain name for the user. - */ - private String domain; - - /* - * The password for the user. - */ - private String password; - - /* - * Access mode for storage - */ - private AccessMode accessMode; - - /** - * Creates an instance of SmbStorage class. - */ - public SmbStorage() { - } - - /** - * Get the host property: The host name or IP address of the SMB server. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: The host name or IP address of the SMB server. - * - * @param host the host value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the shareName property: The path to the SMB shared folder. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Set the shareName property: The path to the SMB shared folder. - * - * @param shareName the shareName value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withShareName(String shareName) { - this.shareName = shareName; - return this; - } - - /** - * Get the username property: The user to log on to the SMB server. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The user to log on to the SMB server. - * - * @param username the username value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the domain property: The domain name for the user. - * - * @return the domain value. - */ - public String domain() { - return this.domain; - } - - /** - * Set the domain property: The domain name for the user. - * - * @param domain the domain value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withDomain(String domain) { - this.domain = domain; - return this; - } - - /** - * Get the password property: The password for the user. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password for the user. - * - * @param password the password value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the accessMode property: Access mode for storage. - * - * @return the accessMode value. - */ - public AccessMode accessMode() { - return this.accessMode; - } - - /** - * Set the accessMode property: Access mode for storage. - * - * @param accessMode the accessMode value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withAccessMode(AccessMode accessMode) { - this.accessMode = accessMode; - 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("host", this.host); - jsonWriter.writeStringField("shareName", this.shareName); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("domain", this.domain); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("accessMode", this.accessMode == null ? null : this.accessMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SmbStorage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SmbStorage 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 SmbStorage. - */ - public static SmbStorage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SmbStorage deserializedSmbStorage = new SmbStorage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("host".equals(fieldName)) { - deserializedSmbStorage.host = reader.getString(); - } else if ("shareName".equals(fieldName)) { - deserializedSmbStorage.shareName = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedSmbStorage.username = reader.getString(); - } else if ("domain".equals(fieldName)) { - deserializedSmbStorage.domain = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedSmbStorage.password = reader.getString(); - } else if ("accessMode".equals(fieldName)) { - deserializedSmbStorage.accessMode = AccessMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSmbStorage; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java index bb8d64ff2fbf..14349f87c7ce 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java @@ -120,7 +120,7 @@ interface WithParentResource { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithRepoUrl, DefinitionStages.WithBranch, - DefinitionStages.WithGithubActionConfiguration, DefinitionStages.WithXMsGithubAuxiliary { + DefinitionStages.WithGithubActionConfiguration { /** * Executes the create request. * @@ -180,19 +180,6 @@ interface WithGithubActionConfiguration { */ WithCreate withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); } - - /** - * The stage of the SourceControl definition allowing to specify xMsGithubAuxiliary. - */ - interface WithXMsGithubAuxiliary { - /** - * Specifies the xMsGithubAuxiliary property: Github personal access token used for SourceControl.. - * - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @return the next definition stage. - */ - WithCreate withXMsGithubAuxiliary(String xMsGithubAuxiliary); - } } /** @@ -205,8 +192,8 @@ interface WithXMsGithubAuxiliary { /** * The template for SourceControl update. */ - interface Update extends UpdateStages.WithRepoUrl, UpdateStages.WithBranch, - UpdateStages.WithGithubActionConfiguration, UpdateStages.WithXMsGithubAuxiliary { + interface Update + extends UpdateStages.WithRepoUrl, UpdateStages.WithBranch, UpdateStages.WithGithubActionConfiguration { /** * Executes the update request. * @@ -270,19 +257,6 @@ interface WithGithubActionConfiguration { */ Update withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); } - - /** - * The stage of the SourceControl update allowing to specify xMsGithubAuxiliary. - */ - interface WithXMsGithubAuxiliary { - /** - * Specifies the xMsGithubAuxiliary property: Github personal access token used for SourceControl.. - * - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @return the next definition stage. - */ - Update withXMsGithubAuxiliary(String xMsGithubAuxiliary); - } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java index 061353f4758a..591b167a3b6d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java @@ -26,11 +26,6 @@ public final class SpringBootAdminComponent extends JavaComponentProperties { */ private JavaComponentIngress ingress; - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - /** * Creates an instance of SpringBootAdminComponent class. */ @@ -67,16 +62,6 @@ public SpringBootAdminComponent withIngress(JavaComponentIngress ingress) { return this; } - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -155,8 +140,8 @@ public static SpringBootAdminComponent fromJson(JsonReader jsonReader) throws IO reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedSpringBootAdminComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); + deserializedSpringBootAdminComponent + .withProvisioningState(JavaComponentProvisioningState.fromString(reader.getString())); } else if ("configurations".equals(fieldName)) { List configurations = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java index a4afd4bfc252..70e5e50c9bad 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java @@ -21,11 +21,6 @@ public final class SpringCloudConfigComponent extends JavaComponentProperties { */ private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_CONFIG; - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - /** * Creates an instance of SpringCloudConfigComponent class. */ @@ -42,16 +37,6 @@ public JavaComponentType componentType() { return this.componentType; } - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -126,8 +111,8 @@ public static SpringCloudConfigComponent fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedSpringCloudConfigComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); + deserializedSpringCloudConfigComponent + .withProvisioningState(JavaComponentProvisioningState.fromString(reader.getString())); } else if ("configurations".equals(fieldName)) { List configurations = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java index fe9c7ab1e498..2612b6a770c6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java @@ -26,11 +26,6 @@ public final class SpringCloudEurekaComponent extends JavaComponentProperties { */ private JavaComponentIngress ingress; - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - /** * Creates an instance of SpringCloudEurekaComponent class. */ @@ -67,16 +62,6 @@ public SpringCloudEurekaComponent withIngress(JavaComponentIngress ingress) { return this; } - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -155,8 +140,8 @@ public static SpringCloudEurekaComponent fromJson(JsonReader jsonReader) throws reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedSpringCloudEurekaComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); + deserializedSpringCloudEurekaComponent + .withProvisioningState(JavaComponentProvisioningState.fromString(reader.getString())); } else if ("configurations".equals(fieldName)) { List configurations = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java deleted file mode 100644 index 53a06e6813bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java +++ /dev/null @@ -1,216 +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.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Cloud Gateway properties. - */ -@Fluent -public final class SpringCloudGatewayComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_GATEWAY; - - /* - * Java Component Ingress configurations. - */ - private JavaComponentIngress ingress; - - /* - * Gateway route definition - */ - private List springCloudGatewayRoutes; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * Creates an instance of SpringCloudGatewayComponent class. - */ - public SpringCloudGatewayComponent() { - } - - /** - * Get the componentType property: Type of the Java Component. - * - * @return the componentType value. - */ - @Override - public JavaComponentType componentType() { - return this.componentType; - } - - /** - * Get the ingress property: Java Component Ingress configurations. - * - * @return the ingress value. - */ - public JavaComponentIngress ingress() { - return this.ingress; - } - - /** - * Set the ingress property: Java Component Ingress configurations. - * - * @param ingress the ingress value to set. - * @return the SpringCloudGatewayComponent object itself. - */ - public SpringCloudGatewayComponent withIngress(JavaComponentIngress ingress) { - this.ingress = ingress; - return this; - } - - /** - * Get the springCloudGatewayRoutes property: Gateway route definition. - * - * @return the springCloudGatewayRoutes value. - */ - public List springCloudGatewayRoutes() { - return this.springCloudGatewayRoutes; - } - - /** - * Set the springCloudGatewayRoutes property: Gateway route definition. - * - * @param springCloudGatewayRoutes the springCloudGatewayRoutes value to set. - * @return the SpringCloudGatewayComponent object itself. - */ - public SpringCloudGatewayComponent withSpringCloudGatewayRoutes(List springCloudGatewayRoutes) { - this.springCloudGatewayRoutes = springCloudGatewayRoutes; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudGatewayComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudGatewayComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudGatewayComponent withServiceBinds(List serviceBinds) { - super.withServiceBinds(serviceBinds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (ingress() != null) { - ingress().validate(); - } - if (springCloudGatewayRoutes() != null) { - springCloudGatewayRoutes().forEach(e -> e.validate()); - } - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - jsonWriter.writeArrayField("springCloudGatewayRoutes", this.springCloudGatewayRoutes, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpringCloudGatewayComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpringCloudGatewayComponent 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 SpringCloudGatewayComponent. - */ - public static SpringCloudGatewayComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpringCloudGatewayComponent deserializedSpringCloudGatewayComponent = new SpringCloudGatewayComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedSpringCloudGatewayComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedSpringCloudGatewayComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.componentType - = JavaComponentType.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.ingress = JavaComponentIngress.fromJson(reader); - } else if ("springCloudGatewayRoutes".equals(fieldName)) { - List springCloudGatewayRoutes = reader.readArray(reader1 -> ScgRoute.fromJson(reader1)); - deserializedSpringCloudGatewayComponent.springCloudGatewayRoutes = springCloudGatewayRoutes; - } else { - reader.skipChildren(); - } - } - - return deserializedSpringCloudGatewayComponent; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java index b99a84237d6d..8986844d2c11 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java @@ -31,11 +31,6 @@ public final class StorageType extends ExpandableStringEnum { */ public static final StorageType NFS_AZURE_FILE = fromString("NfsAzureFile"); - /** - * Static value Smb for StorageType. - */ - public static final StorageType SMB = fromString("Smb"); - /** * Creates a new instance of StorageType value. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java deleted file mode 100644 index e99cce94111d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java +++ /dev/null @@ -1,93 +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.appcontainers.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 java.io.IOException; - -/** - * Defines parameters for tcp connection pooling. - */ -@Fluent -public final class TcpConnectionPool implements JsonSerializable { - /* - * Maximum number of tcp connections allowed - */ - private Integer maxConnections; - - /** - * Creates an instance of TcpConnectionPool class. - */ - public TcpConnectionPool() { - } - - /** - * Get the maxConnections property: Maximum number of tcp connections allowed. - * - * @return the maxConnections value. - */ - public Integer maxConnections() { - return this.maxConnections; - } - - /** - * Set the maxConnections property: Maximum number of tcp connections allowed. - * - * @param maxConnections the maxConnections value to set. - * @return the TcpConnectionPool object itself. - */ - public TcpConnectionPool withMaxConnections(Integer maxConnections) { - this.maxConnections = maxConnections; - 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.writeNumberField("maxConnections", this.maxConnections); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TcpConnectionPool from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TcpConnectionPool 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 TcpConnectionPool. - */ - public static TcpConnectionPool fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TcpConnectionPool deserializedTcpConnectionPool = new TcpConnectionPool(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxConnections".equals(fieldName)) { - deserializedTcpConnectionPool.maxConnections = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTcpConnectionPool; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java deleted file mode 100644 index f53b603c908f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java +++ /dev/null @@ -1,93 +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.appcontainers.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 java.io.IOException; - -/** - * Policy that defines tcp request retry conditions. - */ -@Fluent -public final class TcpRetryPolicy implements JsonSerializable { - /* - * Maximum number of attempts to connect to the tcp service - */ - private Integer maxConnectAttempts; - - /** - * Creates an instance of TcpRetryPolicy class. - */ - public TcpRetryPolicy() { - } - - /** - * Get the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service. - * - * @return the maxConnectAttempts value. - */ - public Integer maxConnectAttempts() { - return this.maxConnectAttempts; - } - - /** - * Set the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service. - * - * @param maxConnectAttempts the maxConnectAttempts value to set. - * @return the TcpRetryPolicy object itself. - */ - public TcpRetryPolicy withMaxConnectAttempts(Integer maxConnectAttempts) { - this.maxConnectAttempts = maxConnectAttempts; - 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.writeNumberField("maxConnectAttempts", this.maxConnectAttempts); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TcpRetryPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TcpRetryPolicy 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 TcpRetryPolicy. - */ - public static TcpRetryPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TcpRetryPolicy deserializedTcpRetryPolicy = new TcpRetryPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxConnectAttempts".equals(fieldName)) { - deserializedTcpRetryPolicy.maxConnectAttempts = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTcpRetryPolicy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TimeoutPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TimeoutPolicy.java deleted file mode 100644 index 4f5f3f4a792c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TimeoutPolicy.java +++ /dev/null @@ -1,121 +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.appcontainers.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 java.io.IOException; - -/** - * Policy to set request timeouts. - */ -@Fluent -public final class TimeoutPolicy implements JsonSerializable { - /* - * Timeout, in seconds, for a request to respond - */ - private Integer responseTimeoutInSeconds; - - /* - * Timeout, in seconds, for a request to initiate a connection - */ - private Integer connectionTimeoutInSeconds; - - /** - * Creates an instance of TimeoutPolicy class. - */ - public TimeoutPolicy() { - } - - /** - * Get the responseTimeoutInSeconds property: Timeout, in seconds, for a request to respond. - * - * @return the responseTimeoutInSeconds value. - */ - public Integer responseTimeoutInSeconds() { - return this.responseTimeoutInSeconds; - } - - /** - * Set the responseTimeoutInSeconds property: Timeout, in seconds, for a request to respond. - * - * @param responseTimeoutInSeconds the responseTimeoutInSeconds value to set. - * @return the TimeoutPolicy object itself. - */ - public TimeoutPolicy withResponseTimeoutInSeconds(Integer responseTimeoutInSeconds) { - this.responseTimeoutInSeconds = responseTimeoutInSeconds; - return this; - } - - /** - * Get the connectionTimeoutInSeconds property: Timeout, in seconds, for a request to initiate a connection. - * - * @return the connectionTimeoutInSeconds value. - */ - public Integer connectionTimeoutInSeconds() { - return this.connectionTimeoutInSeconds; - } - - /** - * Set the connectionTimeoutInSeconds property: Timeout, in seconds, for a request to initiate a connection. - * - * @param connectionTimeoutInSeconds the connectionTimeoutInSeconds value to set. - * @return the TimeoutPolicy object itself. - */ - public TimeoutPolicy withConnectionTimeoutInSeconds(Integer connectionTimeoutInSeconds) { - this.connectionTimeoutInSeconds = connectionTimeoutInSeconds; - 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.writeNumberField("responseTimeoutInSeconds", this.responseTimeoutInSeconds); - jsonWriter.writeNumberField("connectionTimeoutInSeconds", this.connectionTimeoutInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TimeoutPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TimeoutPolicy 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 TimeoutPolicy. - */ - public static TimeoutPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TimeoutPolicy deserializedTimeoutPolicy = new TimeoutPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("responseTimeoutInSeconds".equals(fieldName)) { - deserializedTimeoutPolicy.responseTimeoutInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("connectionTimeoutInSeconds".equals(fieldName)) { - deserializedTimeoutPolicy.connectionTimeoutInSeconds = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTimeoutPolicy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java deleted file mode 100644 index b5dc7a72acb8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java +++ /dev/null @@ -1,123 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry traces. - */ -@Fluent -public final class TracesConfiguration implements JsonSerializable { - /* - * Boolean indicating if including dapr traces - */ - private Boolean includeDapr; - - /* - * Open telemetry traces destinations - */ - private List destinations; - - /** - * Creates an instance of TracesConfiguration class. - */ - public TracesConfiguration() { - } - - /** - * Get the includeDapr property: Boolean indicating if including dapr traces. - * - * @return the includeDapr value. - */ - public Boolean includeDapr() { - return this.includeDapr; - } - - /** - * Set the includeDapr property: Boolean indicating if including dapr traces. - * - * @param includeDapr the includeDapr value to set. - * @return the TracesConfiguration object itself. - */ - public TracesConfiguration withIncludeDapr(Boolean includeDapr) { - this.includeDapr = includeDapr; - return this; - } - - /** - * Get the destinations property: Open telemetry traces destinations. - * - * @return the destinations value. - */ - public List destinations() { - return this.destinations; - } - - /** - * Set the destinations property: Open telemetry traces destinations. - * - * @param destinations the destinations value to set. - * @return the TracesConfiguration object itself. - */ - public TracesConfiguration withDestinations(List destinations) { - this.destinations = destinations; - 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.writeBooleanField("includeDapr", this.includeDapr); - jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TracesConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TracesConfiguration 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 TracesConfiguration. - */ - public static TracesConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TracesConfiguration deserializedTracesConfiguration = new TracesConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("includeDapr".equals(fieldName)) { - deserializedTracesConfiguration.includeDapr = reader.getNullable(JsonReader::getBoolean); - } else if ("destinations".equals(fieldName)) { - List destinations = reader.readArray(reader1 -> reader1.getString()); - deserializedTracesConfiguration.destinations = destinations; - } else { - reader.skipChildren(); - } - } - - return deserializedTracesConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowArtifacts.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowArtifacts.java deleted file mode 100644 index 9c7938f32a4b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowArtifacts.java +++ /dev/null @@ -1,152 +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.appcontainers.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 java.io.IOException; -import java.util.List; - -/** - * The workflow filter. - */ -@Fluent -public final class WorkflowArtifacts implements JsonSerializable { - /* - * Application settings of the workflow. - */ - private Object appSettings; - - /* - * Files of the app. - */ - private Object files; - - /* - * Files of the app to delete. - */ - private List filesToDelete; - - /** - * Creates an instance of WorkflowArtifacts class. - */ - public WorkflowArtifacts() { - } - - /** - * Get the appSettings property: Application settings of the workflow. - * - * @return the appSettings value. - */ - public Object appSettings() { - return this.appSettings; - } - - /** - * Set the appSettings property: Application settings of the workflow. - * - * @param appSettings the appSettings value to set. - * @return the WorkflowArtifacts object itself. - */ - public WorkflowArtifacts withAppSettings(Object appSettings) { - this.appSettings = appSettings; - return this; - } - - /** - * Get the files property: Files of the app. - * - * @return the files value. - */ - public Object files() { - return this.files; - } - - /** - * Set the files property: Files of the app. - * - * @param files the files value to set. - * @return the WorkflowArtifacts object itself. - */ - public WorkflowArtifacts withFiles(Object files) { - this.files = files; - return this; - } - - /** - * Get the filesToDelete property: Files of the app to delete. - * - * @return the filesToDelete value. - */ - public List filesToDelete() { - return this.filesToDelete; - } - - /** - * Set the filesToDelete property: Files of the app to delete. - * - * @param filesToDelete the filesToDelete value to set. - * @return the WorkflowArtifacts object itself. - */ - public WorkflowArtifacts withFilesToDelete(List filesToDelete) { - this.filesToDelete = filesToDelete; - 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.writeUntypedField("appSettings", this.appSettings); - jsonWriter.writeUntypedField("files", this.files); - jsonWriter.writeArrayField("filesToDelete", this.filesToDelete, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkflowArtifacts from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkflowArtifacts 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 WorkflowArtifacts. - */ - public static WorkflowArtifacts fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkflowArtifacts deserializedWorkflowArtifacts = new WorkflowArtifacts(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("appSettings".equals(fieldName)) { - deserializedWorkflowArtifacts.appSettings = reader.readUntyped(); - } else if ("files".equals(fieldName)) { - deserializedWorkflowArtifacts.files = reader.readUntyped(); - } else if ("filesToDelete".equals(fieldName)) { - List filesToDelete = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkflowArtifacts.filesToDelete = filesToDelete; - } else { - reader.skipChildren(); - } - } - - return deserializedWorkflowArtifacts; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelope.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelope.java deleted file mode 100644 index a336b2e04a27..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelope.java +++ /dev/null @@ -1,61 +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.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; - -/** - * An immutable client-side representation of WorkflowEnvelope. - */ -public interface WorkflowEnvelope { - /** - * Gets the id property: The resource id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: Gets the resource name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: Gets the resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the kind property: The resource kind. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the location property: The resource location. - * - * @return the location value. - */ - String location(); - - /** - * Gets the properties property: Additional workflow properties. - * - * @return the properties value. - */ - WorkflowEnvelopeProperties properties(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner object. - * - * @return the inner object. - */ - WorkflowEnvelopeInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeCollection.java deleted file mode 100644 index 0486c23645b5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeCollection.java +++ /dev/null @@ -1,124 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of workflow information elements. - */ -@Fluent -public final class WorkflowEnvelopeCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of WorkflowEnvelopeCollection class. - */ - public WorkflowEnvelopeCollection() { - } - - /** - * Get the value property: Collection of resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of resources. - * - * @param value the value value to set. - * @return the WorkflowEnvelopeCollection object itself. - */ - public WorkflowEnvelopeCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model WorkflowEnvelopeCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkflowEnvelopeCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkflowEnvelopeCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkflowEnvelopeCollection 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 WorkflowEnvelopeCollection. - */ - public static WorkflowEnvelopeCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkflowEnvelopeCollection deserializedWorkflowEnvelopeCollection = new WorkflowEnvelopeCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> WorkflowEnvelopeInner.fromJson(reader1)); - deserializedWorkflowEnvelopeCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWorkflowEnvelopeCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkflowEnvelopeCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeProperties.java deleted file mode 100644 index 0b02ca1d55b6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeProperties.java +++ /dev/null @@ -1,152 +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.appcontainers.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 java.io.IOException; - -/** - * Additional workflow properties. - */ -@Fluent -public final class WorkflowEnvelopeProperties implements JsonSerializable { - /* - * Gets or sets the files. - */ - private Object files; - - /* - * Gets or sets the state of the workflow. - */ - private WorkflowState flowState; - - /* - * Gets or sets workflow health. - */ - private WorkflowHealth health; - - /** - * Creates an instance of WorkflowEnvelopeProperties class. - */ - public WorkflowEnvelopeProperties() { - } - - /** - * Get the files property: Gets or sets the files. - * - * @return the files value. - */ - public Object files() { - return this.files; - } - - /** - * Set the files property: Gets or sets the files. - * - * @param files the files value to set. - * @return the WorkflowEnvelopeProperties object itself. - */ - public WorkflowEnvelopeProperties withFiles(Object files) { - this.files = files; - return this; - } - - /** - * Get the flowState property: Gets or sets the state of the workflow. - * - * @return the flowState value. - */ - public WorkflowState flowState() { - return this.flowState; - } - - /** - * Set the flowState property: Gets or sets the state of the workflow. - * - * @param flowState the flowState value to set. - * @return the WorkflowEnvelopeProperties object itself. - */ - public WorkflowEnvelopeProperties withFlowState(WorkflowState flowState) { - this.flowState = flowState; - return this; - } - - /** - * Get the health property: Gets or sets workflow health. - * - * @return the health value. - */ - public WorkflowHealth health() { - return this.health; - } - - /** - * Set the health property: Gets or sets workflow health. - * - * @param health the health value to set. - * @return the WorkflowEnvelopeProperties object itself. - */ - public WorkflowEnvelopeProperties withHealth(WorkflowHealth health) { - this.health = health; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (health() != null) { - health().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("files", this.files); - jsonWriter.writeStringField("flowState", this.flowState == null ? null : this.flowState.toString()); - jsonWriter.writeJsonField("health", this.health); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkflowEnvelopeProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkflowEnvelopeProperties 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 WorkflowEnvelopeProperties. - */ - public static WorkflowEnvelopeProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkflowEnvelopeProperties deserializedWorkflowEnvelopeProperties = new WorkflowEnvelopeProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("files".equals(fieldName)) { - deserializedWorkflowEnvelopeProperties.files = reader.readUntyped(); - } else if ("flowState".equals(fieldName)) { - deserializedWorkflowEnvelopeProperties.flowState = WorkflowState.fromString(reader.getString()); - } else if ("health".equals(fieldName)) { - deserializedWorkflowEnvelopeProperties.health = WorkflowHealth.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkflowEnvelopeProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealth.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealth.java deleted file mode 100644 index f141ff4b75d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealth.java +++ /dev/null @@ -1,132 +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.appcontainers.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; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Represents the workflow health. - */ -@Fluent -public final class WorkflowHealth implements JsonSerializable { - /* - * Gets or sets the workflow health state. - */ - private WorkflowHealthState state; - - /* - * Gets or sets the workflow error. - */ - private ErrorEntity error; - - /** - * Creates an instance of WorkflowHealth class. - */ - public WorkflowHealth() { - } - - /** - * Get the state property: Gets or sets the workflow health state. - * - * @return the state value. - */ - public WorkflowHealthState state() { - return this.state; - } - - /** - * Set the state property: Gets or sets the workflow health state. - * - * @param state the state value to set. - * @return the WorkflowHealth object itself. - */ - public WorkflowHealth withState(WorkflowHealthState state) { - this.state = state; - return this; - } - - /** - * Get the error property: Gets or sets the workflow error. - * - * @return the error value. - */ - public ErrorEntity error() { - return this.error; - } - - /** - * Set the error property: Gets or sets the workflow error. - * - * @param error the error value to set. - * @return the WorkflowHealth object itself. - */ - public WorkflowHealth withError(ErrorEntity error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property state in model WorkflowHealth")); - } - if (error() != null) { - error().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WorkflowHealth.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeJsonField("error", this.error); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkflowHealth from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkflowHealth 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 WorkflowHealth. - */ - public static WorkflowHealth fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkflowHealth deserializedWorkflowHealth = new WorkflowHealth(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("state".equals(fieldName)) { - deserializedWorkflowHealth.state = WorkflowHealthState.fromString(reader.getString()); - } else if ("error".equals(fieldName)) { - deserializedWorkflowHealth.error = ErrorEntity.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkflowHealth; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealthState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealthState.java deleted file mode 100644 index ef6bef9d0752..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealthState.java +++ /dev/null @@ -1,66 +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.appcontainers.models; - -/** - * Gets or sets the workflow health state. - */ -public enum WorkflowHealthState { - /** - * Enum value NotSpecified. - */ - NOT_SPECIFIED("NotSpecified"), - - /** - * Enum value Healthy. - */ - HEALTHY("Healthy"), - - /** - * Enum value Unhealthy. - */ - UNHEALTHY("Unhealthy"), - - /** - * Enum value Unknown. - */ - UNKNOWN("Unknown"); - - /** - * The actual serialized value for a WorkflowHealthState instance. - */ - private final String value; - - WorkflowHealthState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a WorkflowHealthState instance. - * - * @param value the serialized value to parse. - * @return the parsed WorkflowHealthState object, or null if unable to parse. - */ - public static WorkflowHealthState fromString(String value) { - if (value == null) { - return null; - } - WorkflowHealthState[] items = WorkflowHealthState.values(); - for (WorkflowHealthState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowState.java deleted file mode 100644 index 9a6ebb3f9680..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowState.java +++ /dev/null @@ -1,71 +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.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The workflow state. - */ -public final class WorkflowState extends ExpandableStringEnum { - /** - * Static value NotSpecified for WorkflowState. - */ - public static final WorkflowState NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Static value Completed for WorkflowState. - */ - public static final WorkflowState COMPLETED = fromString("Completed"); - - /** - * Static value Enabled for WorkflowState. - */ - public static final WorkflowState ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for WorkflowState. - */ - public static final WorkflowState DISABLED = fromString("Disabled"); - - /** - * Static value Deleted for WorkflowState. - */ - public static final WorkflowState DELETED = fromString("Deleted"); - - /** - * Static value Suspended for WorkflowState. - */ - public static final WorkflowState SUSPENDED = fromString("Suspended"); - - /** - * Creates a new instance of WorkflowState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkflowState() { - } - - /** - * Creates or finds a WorkflowState from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkflowState. - */ - public static WorkflowState fromString(String name) { - return fromString(name, WorkflowState.class); - } - - /** - * Gets known WorkflowState values. - * - * @return known WorkflowState values. - */ - public static Collection values() { - return values(WorkflowState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java index 27110830fd9e..78d195bd398b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java @@ -22,11 +22,6 @@ public final class WorkloadProfile implements JsonSerializable */ private String name; - /* - * Whether to use a FIPS-enabled OS. Supported only for dedicated workload profiles. - */ - private Boolean enableFips; - /* * Workload profile type for the workloads to run on. */ @@ -68,26 +63,6 @@ public WorkloadProfile withName(String name) { return this; } - /** - * Get the enableFips property: Whether to use a FIPS-enabled OS. Supported only for dedicated workload profiles. - * - * @return the enableFips value. - */ - public Boolean enableFips() { - return this.enableFips; - } - - /** - * Set the enableFips property: Whether to use a FIPS-enabled OS. Supported only for dedicated workload profiles. - * - * @param enableFips the enableFips value to set. - * @return the WorkloadProfile object itself. - */ - public WorkloadProfile withEnableFips(Boolean enableFips) { - this.enableFips = enableFips; - return this; - } - /** * Get the workloadProfileType property: Workload profile type for the workloads to run on. * @@ -175,7 +150,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("workloadProfileType", this.workloadProfileType); - jsonWriter.writeBooleanField("enableFips", this.enableFips); jsonWriter.writeNumberField("minimumCount", this.minimumCount); jsonWriter.writeNumberField("maximumCount", this.maximumCount); return jsonWriter.writeEndObject(); @@ -201,8 +175,6 @@ public static WorkloadProfile fromJson(JsonReader jsonReader) throws IOException deserializedWorkloadProfile.name = reader.getString(); } else if ("workloadProfileType".equals(fieldName)) { deserializedWorkloadProfile.workloadProfileType = reader.getString(); - } else if ("enableFips".equals(fieldName)) { - deserializedWorkloadProfile.enableFips = reader.getNullable(JsonReader::getBoolean); } else if ("minimumCount".equals(fieldName)) { deserializedWorkloadProfile.minimumCount = reader.getNullable(JsonReader::getInt); } else if ("maximumCount".equals(fieldName)) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java index c0b9d82b3bd0..a5d836af42d9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java @@ -4,8 +4,6 @@ /** * Package containing the data models for ContainerAppsApiClient. - * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the - * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions - * extension resource. + * null. */ package com.azure.resourcemanager.appcontainers.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java index 5e8cbf3c1591..82dc538e0b9f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java @@ -4,8 +4,6 @@ /** * Package containing the classes for ContainerAppsApiClient. - * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the - * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions - * extension resource. + * null. */ package com.azure.resourcemanager.appcontainers; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json index 6f609874b907..56d229dab3cb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.appcontainers.implementation.AppResilienciesClientImpl$AppResilienciesService"],["com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService"],["com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService"],["com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensClientImpl$BuildAuthTokensService"],["com.azure.resourcemanager.appcontainers.implementation.BuildersClientImpl$BuildersService"],["com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesClientImpl$BuildsByBuilderResourcesService"],["com.azure.resourcemanager.appcontainers.implementation.BuildsClientImpl$BuildsService"],["com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsByContainerAppsClientImpl$ContainerAppsBuildsByContainerAppsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsClientImpl$ContainerAppsBuildsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesClientImpl$ContainerAppsPatchesService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSessionPoolsClientImpl$ContainerAppsSessionPoolsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService"],["com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesClientImpl$DaprComponentResiliencyPoliciesService"],["com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsClientImpl$DaprSubscriptionsService"],["com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsClientImpl$DotNetComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsClientImpl$FunctionsExtensionsService"],["com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService"],["com.azure.resourcemanager.appcontainers.implementation.LogicAppsClientImpl$LogicAppsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateEndpointConnectionsClientImpl$ManagedEnvironmentPrivateEndpointConnectionsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateLinkResourcesClientImpl$ManagedEnvironmentPrivateLinkResourcesService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService"],["com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService"],["com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService"]] \ No newline at end of file +[["com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService"],["com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService"],["com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSessionPoolsClientImpl$ContainerAppsSessionPoolsService"],["com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService"],["com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService"],["com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService"],["com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService"],["com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService"],["com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService"]] \ No newline at end of file diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/azure-resourcemanager-appcontainers.properties b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/azure-resourcemanager-appcontainers.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/azure-resourcemanager-appcontainers.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java deleted file mode 100644 index a655e3e64ef7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java +++ /dev/null @@ -1,54 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HeaderMatch; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import java.util.Arrays; - -/** - * Samples for AppResiliency CreateOrUpdate. - */ -public final class AppResiliencyCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_CreateOrUpdate - * .json - */ - /** - * Sample code: Create or Update App Resiliency. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies() - .define("resiliency-policy-1") - .withExistingContainerApp("rg", "testcontainerApp0") - .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(15).withConnectionTimeoutInSeconds(5)) - .withHttpRetryPolicy( - new HttpRetryPolicy().withMaxRetries(5) - .withInitialDelayInMilliseconds(1000L) - .withMaxIntervalInMilliseconds(10000L) - .withHeaders( - Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) - .withHttpStatusCodes(Arrays.asList(502, 503)) - .withErrors(Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", - "retriable-status-codes"))) - .withTcpRetryPolicy(new TcpRetryPolicy().withMaxConnectAttempts(3)) - .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5) - .withIntervalInSeconds(10) - .withMaxEjectionPercent(50)) - .withHttpConnectionPool( - new HttpConnectionPool().withHttp1MaxPendingRequests(1024).withHttp2MaxRequests(1024)) - .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java deleted file mode 100644 index 5f243cf60b93..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for AppResiliency Delete. - */ -public final class AppResiliencyDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Delete.json - */ - /** - * Sample code: Delete App Resiliency. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies() - .deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java deleted file mode 100644 index 670ab6692386..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for AppResiliency Get. - */ -public final class AppResiliencyGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Get.json - */ - /** - * Sample code: Get App Resiliency. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies() - .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java deleted file mode 100644 index 022fbc84dd4b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for AppResiliency List. - */ -public final class AppResiliencyListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_List.json - */ - /** - * Sample code: List App Resiliency. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().list("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java deleted file mode 100644 index 8c2670f7cc53..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.AppResiliency; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; - -/** - * Samples for AppResiliency Update. - */ -public final class AppResiliencyUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Patch.json - */ - /** - * Sample code: Update App Resiliency. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void updateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - AppResiliency resource = manager.appResiliencies() - .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(30).withConnectionTimeoutInSeconds(40)) - .apply(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java index a12d7a7123a3..646765e46f81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java @@ -9,8 +9,8 @@ */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * AvailableWorkloadProfiles_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java index 1e5e9c0983c0..c0404119cf43 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java @@ -10,7 +10,7 @@ public final class BillingMetersGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/BillingMeters_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java deleted file mode 100644 index 45d362c81aa8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for BuildAuthToken List. - */ -public final class BuildAuthTokenListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListAuthToken.json - */ - /** - * Sample code: Get Build Auth Token. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getBuildAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.buildAuthTokens().listWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java deleted file mode 100644 index e9e8a6ba2f2e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java +++ /dev/null @@ -1,63 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Builders CreateOrUpdate. - */ -public final class BuildersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_CreateOrUpdate.json - */ - /** - * Sample code: Builders_CreateOrUpdate_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildersCreateOrUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders() - .define("testBuilder") - .withRegion("eastus") - .withExistingResourceGroup("rg") - .withTags(mapOf("company", "Microsoft")) - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", - new UserAssignedIdentity()))) - .withEnvironmentId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv") - .withContainerRegistries(Arrays.asList(new ContainerRegistry() - .withContainerRegistryServer("test.azurecr.io") - .withIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), - new ContainerRegistry().withContainerRegistryServer("test2.azurecr.io") - .withIdentityResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) - .create(); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java deleted file mode 100644 index 607a1d8c3eb0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for Builders Delete. - */ -public final class BuildersDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Delete.json - */ - /** - * Sample code: Builders_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildersDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().delete("rg", "testBuilder", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java deleted file mode 100644 index 8d647b3858e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for Builders GetByResourceGroup. - */ -public final class BuildersGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Get.json - */ - /** - * Sample code: Builders_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildersGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java deleted file mode 100644 index 0364f5cb3260..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for Builders ListByResourceGroup. - */ -public final class BuildersListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListByResourceGroup - * .json - */ - /** - * Sample code: Builders_ListByResourceGroup_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildersListByResourceGroup0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().listByResourceGroup("rg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java deleted file mode 100644 index e9c08445ff52..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for Builders List. - */ -public final class BuildersListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListBySubscription. - * json - */ - /** - * Sample code: Builders_ListBySubscription_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildersListBySubscription0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java deleted file mode 100644 index c1058b7caa3d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Builders Update. - */ -public final class BuildersUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Update.json - */ - /** - * Sample code: Builders_Update_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - BuilderResource resource = manager.builders() - .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java deleted file mode 100644 index 47c677bbd637..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for BuildsByBuilderResource List. - */ -public final class BuildsByBuilderResourceListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListByBuilderResource - * .json - */ - /** - * Sample code: Builds_ListByBuilderResource_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildsListByBuilderResource0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.buildsByBuilderResources().list("rg", "testBuilder", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java deleted file mode 100644 index 888b6b413aff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java +++ /dev/null @@ -1,66 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; - -/** - * Samples for Builds CreateOrUpdate. - */ -public final class BuildsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_CreateOrUpdate.json - */ - /** - * Sample code: Builds_CreateOrUpdate_WithConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildsCreateOrUpdateWithConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds() - .define("testBuild-123456789az") - .withExistingBuilder("rg", "testBuilder") - .withDestinationContainerRegistry(new ContainerRegistryWithCustomImage().withServer("test.azurecr.io") - .withImage("test.azurecr.io/repo:tag")) - .withConfiguration(new BuildConfiguration().withBaseOs("DebianBullseye") - .withPlatform("dotnetcore") - .withPlatformVersion("7.0") - .withEnvironmentVariables(Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), - new EnvironmentVariable().withName("foo2").withValue("bar2"))) - .withPreBuildSteps(Arrays.asList( - new PreBuildStep().withDescription("First pre build step.") - .withScripts(Arrays.asList("echo 'hello'", "echo 'world'")) - .withHttpGet(new HttpGet().withUrl("https://microsoft.com") - .withFileName("output.txt") - .withHeaders(Arrays.asList("foo", "bar"))), - new PreBuildStep().withDescription("Second pre build step.") - .withScripts(Arrays.asList("echo 'hello'", "echo 'again'")) - .withHttpGet(new HttpGet().withUrl("https://microsoft.com") - .withFileName("output.txt") - .withHeaders(Arrays.asList("foo")))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Builds_CreateOrUpdate_NoConfig.json - */ - /** - * Sample code: Builds_CreateOrUpdate_NoConfig. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - buildsCreateOrUpdateNoConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().define("testBuild").withExistingBuilder("rg", "testBuilder").create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java deleted file mode 100644 index 389843972d58..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for Builds Delete. - */ -public final class BuildsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Delete.json - */ - /** - * Sample code: Builds_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().delete("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java deleted file mode 100644 index 790eea4af08d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for Builds Get. - */ -public final class BuildsGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Get.json - */ - /** - * Sample code: Builds_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void buildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().getWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index d48c5b3b5427..7b6ce9891ca8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java @@ -7,14 +7,13 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateKeyVaultProperties; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -import com.azure.resourcemanager.appcontainers.models.CertificateType; /** * Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * Certificate_CreateOrUpdate_FromKeyVault.json */ /** @@ -30,15 +29,13 @@ public static void createOrUpdateCertificateUsingManagedIdentity( .withProperties(new CertificateProperties() .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") - .withKeyVaultUrl("fakeTokenPlaceholder")) - .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), + .withKeyVaultUrl("fakeTokenPlaceholder"))), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_CreateOrUpdate. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -51,8 +48,7 @@ public static void createOrUpdateCertificateUsingManagedIdentity( .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", new CertificateInner().withLocation("East US") .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes()) - .withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), + .withValue("Y2VydA==".getBytes())), com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java index 08afcdbf2e23..23482bf80490 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java @@ -10,7 +10,7 @@ public final class CertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java index 47a47515f36a..235669b1ad13 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java @@ -10,7 +10,7 @@ public final class CertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java index 8662b17bb6cb..3a25dcc1ea81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java @@ -9,8 +9,9 @@ */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Certificates_ListByManagedEnvironment.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificates_ListByManagedEnvironment + * .json */ /** * Sample code: List Certificates by Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java index 15102202b7c3..1d40cb396039 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java @@ -14,7 +14,7 @@ public final class CertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificates_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java index 0d9f1a91a497..1b3295e77d5c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java index 6306306c35d9..39cf0da01bf6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsCertificate_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java index 8cdb91ea0feb..0393478b5886 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java @@ -9,8 +9,9 @@ */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsCertificate_Get. + * json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java index 71bf1736d13b..df28a7a4bf4a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java index 94a92b8ee117..589bb6c47d7b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsCertificates_Patch.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java index 08100a185f5e..d1328f32c988 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java index b86fb0b7cbb2..cd5f3333ebc9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -11,8 +11,9 @@ */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_CreateOrUpdate. + * json */ /** * Sample code: Create kube environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java index 40144d4aa6a0..42ae6fd9baff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java @@ -4,9 +4,7 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; @@ -15,7 +13,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** @@ -38,10 +36,6 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java index e70ee6e10a3f..5b84129b535a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsDaprComponents_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java index dad57a35024c..32ed45080fb3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsDaprComponents_Get.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java index 6b9cc0f5ae4a..588172a108dd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsDaprComponents_List.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java index 2cd3cc0fb7d9..3028690601a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java index dbd6a8ef2db2..9c28c8fd58d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java @@ -10,8 +10,7 @@ public final class ConnectedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Delete - * .json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java index 4a1513f9a4a7..c51aad9bfc0c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Get. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java index d8eb3c1f3aef..3f03ce758378 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironments_ListByResourceGroup.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java index 3f75a3e3bbbb..509a86a5f300 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironments_ListBySubscription.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java index 6d4af124e1a8..2aa9a58fbad5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java index e1a810979bac..b1c5f92e3bba 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsStorages_Delete. + * json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java index 190191c171c5..78bf0ac03d90 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -9,8 +9,9 @@ */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsStorages_Get. + * json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java index 6e70076ff301..71204ac1faf7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -9,8 +9,9 @@ */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironmentsStorages_List. + * json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java index 6122dc7fdd37..e24e5c33997f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java @@ -10,8 +10,7 @@ public final class ConnectedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Patch. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java index 143d66b9a81c..a18dc97c4e35 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -18,8 +18,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_CreateOrUpdate. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java index a49b07fbfbff..40333542a4d5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index 9417356a6833..640050caf3f4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 143b77f84828..fbd42cfaef24 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java @@ -10,8 +10,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_ListByContainer. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java deleted file mode 100644 index 6686bd6a506e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsBuildsByContainerApp List. - */ -public final class ContainerAppsBuildsByContainerAppListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsBuilds_ListByContainerApp.json - */ - /** - * Sample code: ContainerAppsBuilds_ListByContainerApp_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void containerAppsBuildsListByContainerApp0( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsBuildsByContainerApps().list("rg", "testCapp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java deleted file mode 100644 index d794bce2bd4a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsBuilds Delete. - */ -public final class ContainerAppsBuildsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Delete. - * json - */ - /** - * Sample code: ContainerAppsBuilds_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsBuildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsBuilds().delete("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java deleted file mode 100644 index 02938b7801e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsBuilds Get. - */ -public final class ContainerAppsBuildsGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Get.json - */ - /** - * Sample code: ContainerAppsBuilds_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsBuildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsBuilds().getWithResponse("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 5ba9d5f68cb5..87d8bb24d315 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; @@ -15,17 +14,11 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.IdentitySettings; -import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; -import com.azure.resourcemanager.appcontainers.models.ImageType; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; @@ -33,19 +26,10 @@ import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.Kind; -import com.azure.resourcemanager.appcontainers.models.Level; import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.PatchingMode; import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; import com.azure.resourcemanager.appcontainers.models.Runtime; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -55,7 +39,6 @@ import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.Volume; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.util.Arrays; @@ -66,233 +49,9 @@ * Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_SourceToCloudApp_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update SourceToCloud App. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateSourceToCloudApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileName("My-GP-01") - .withPatchingConfiguration( - new ContainerAppPropertiesPatchingConfiguration().withPatchingMode(PatchingMode.AUTOMATIC)) - .withConfiguration( - new Configuration() - .withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) - .withMaxAge(1234) - .withAllowCredentials(true)) - .withAdditionalPortMappings(Arrays.asList( - new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr().withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis"))) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container() - .withImage("") - .withImageType(ImageType.CLOUD_BUILD) - .withName("testcontainerApp0") - .withVolumeMounts( - Arrays.asList( - new VolumeMount().withVolumeName("azurefile") - .withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount() - .withVolumeName("nfsazurefile") - .withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes( - Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") - .withCustom(new CustomScaleRule().withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) - .withVolumes(Arrays.asList( - new Volume().withName("azurefile") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("storage"), - new Volume().withName("nfsazurefile") - .withStorageType(StorageType.NFS_AZURE_FILE) - .withStorageName("nfsStorage"))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService") - .withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json - */ - /** - * Sample code: Create or Update App On A Connected Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateAppOnAConnectedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration( - new Configuration() - .withIngress(new Ingress().withExternal(true) - .withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) - .withMaxAge(1234) - .withAllowCredentials(true)) - .withAdditionalPortMappings(Arrays.asList( - new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( - new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) - .withMaxInactiveRevisions(10)) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1) - .withMaxReplicas(5) - .withCooldownPeriod(350) - .withPollingInterval(35) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") - .withCustom(new CustomScaleRule().withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) - .create(); - } - /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_CreateOrUpdate - * .json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -302,14 +61,9 @@ public static void createOrUpdateAppOnAConnectedEnvironment( public static void createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps() - .define("testcontainerApp0") + .define("testcontainerapp0") .withRegion("East US") .withExistingResourceGroup("rg") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", - new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withWorkloadProfileName("My-GP-01") @@ -318,7 +72,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withIngress(new Ingress().withExternal(true) .withTargetPort(3000) .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") + .withRevisionName("testcontainerapp0-ab1234") .withWeight(100) .withLabel("production"))) .withCustomDomains(Arrays.asList(new CustomDomain() @@ -355,37 +109,25 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withAdditionalPortMappings(Arrays.asList( new IngressPortMapping().withExternal(true).withTargetPort(1234), new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr() - .withEnabled(true) + .withDapr(new Dapr().withEnabled(true) .withAppProtocol(AppProtocol.HTTP) .withAppPort(3000) .withHttpReadBufferSize(30) .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withRuntime(new Runtime().withJava(new RuntimeJava() - .withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent() - .withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings( - Arrays.asList(new LoggerSetting().withLogger("org.springframework.boot") - .withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true))) .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis")) - .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") - .withLifecycle(IdentitySettingsLifeCycle.ALL), - new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) + .withService(new Service().withType("redis"))) .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerapp0:v4") .withName("testinitcontainerApp0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) .withContainers(Arrays.asList(new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") + .withImage("repo/testcontainerapp0:v1") + .withName("testcontainerapp0") .withVolumeMounts( Arrays.asList( new VolumeMount().withVolumeName("azurefile") @@ -430,15 +172,14 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withStorageName("nfsStorage"))) .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService") - .withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .withName("redisService")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_TcpApp_CreateOrUpdate. + * json */ /** * Sample code: Create or Update Tcp App. @@ -447,7 +188,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( */ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps() - .define("testcontainerAppTcp") + .define("testcontainerapptcp") .withRegion("East US") .withExistingResourceGroup("rg") .withEnvironmentId( @@ -458,10 +199,10 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. .withExposedPort(4000) .withTransport(IngressTransportMethod.TCP) .withTraffic(Arrays - .asList(new TrafficWeight().withRevisionName("testcontainerAppTcp-ab1234").withWeight(100))))) + .asList(new TrafficWeight().withRevisionName("testcontainerapptcp-ab1234").withWeight(100))))) .withTemplate(new Template() - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppTcp:v1") - .withName("testcontainerAppTcp") + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerapptcp:v1") + .withName("testcontainerapptcp") .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) .withPeriodSeconds(3) .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) @@ -476,37 +217,7 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_Kind_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update App Kind. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps() - .define("testcontainerAppKind") - .withRegion("East Us") - .withExistingResourceGroup("rg") - .withManagedBy( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind") - .withKind(Kind.WORKFLOWAPP) - .withManagedEnvironmentId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3") - .withConfiguration(new Configuration().withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withIngress(new Ingress().withExternal(true).withTargetPort(80).withAllowInsecure(true))) - .withTemplate(new Template() - .withContainers(Arrays.asList(new Container().withImage("default/logicapps-base:latest") - .withName("logicapps-container") - .withResources(new ContainerResources().withCpu(1.0D).withMemory("2.0Gi")))) - .withScale( - new Scale().withMinReplicas(1).withMaxReplicas(30).withCooldownPeriod(350).withPollingInterval(35))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** @@ -517,7 +228,7 @@ public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers public static void createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps() - .define("testcontainerAppManagedBy") + .define("testcontainerappmanagedby") .withRegion("East US") .withExistingResourceGroup("rg") .withManagedBy( @@ -529,10 +240,10 @@ public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers .withExposedPort(4000) .withTransport(IngressTransportMethod.TCP) .withTraffic(Arrays - .asList(new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234").withWeight(100))))) + .asList(new TrafficWeight().withRevisionName("testcontainerappmanagedby-ab1234").withWeight(100))))) .withTemplate(new Template() - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppManagedBy:v1") - .withName("testcontainerAppManagedBy") + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerappmanagedby:v1") + .withName("testcontainerappmanagedby") .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) .withPeriodSeconds(3) .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java index 5f50dd46a323..976a6cd5f5af 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -18,6 +18,6 @@ public final class ContainerAppsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().delete("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + manager.containerApps().delete("rg", "testworkerapp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java index fc000bd6d75a..8ead05ef1e60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -10,8 +10,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsDiagnostics_Get - * .json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java index ffd1f44ea7c2..f841b4cab8da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java index 342aa2656f01..ec7650425805 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -19,6 +19,6 @@ public final class ContainerAppsDiagnosticsGetRootSamples { */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerAppsDiagnostics() - .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + .getRootWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java index 21aada039a25..94a13a9b82df 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -9,8 +9,8 @@ */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsDiagnostics_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java index aa49ec68ee76..0b13201a3683 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java index d94b7d783319..69c565f8228c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java @@ -10,8 +10,7 @@ public final class ContainerAppsGetAuthTokenSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_GetAuthToken. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -20,6 +19,6 @@ public final class ContainerAppsGetAuthTokenSamples { */ public static void getContainerAppAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java index 6fb147906e9f..072aa505d597 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -19,6 +19,6 @@ public final class ContainerAppsGetByResourceGroupSamples { */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + .getByResourceGroupWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java index 7a69c21389d2..33b4fd8a2365 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -9,8 +9,9 @@ */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_ListByResourceGroup.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_ListByResourceGroup. + * json */ /** * Sample code: List Container Apps by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java index b47fb8cf7ebe..93050f3189a7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ContainerApps_ListCustomHostNameAnalysis.json */ /** @@ -19,7 +19,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { */ public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps() - .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", + .listCustomHostnameAnalysisWithResponse("rg", "testcontainerapp0", "my.name.corp", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index 30c03a3b94d8..b68686607dd0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -9,8 +9,8 @@ */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_ListBySubscription.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java index 7808b22c206f..f010b67b0167 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java @@ -10,8 +10,7 @@ public final class ContainerAppsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListSecrets. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -20,6 +19,6 @@ public final class ContainerAppsListSecretsSamples { */ public static void listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + manager.containerApps().listSecretsWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java deleted file mode 100644 index 37a65cb09de8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsPatches Apply. - */ -public final class ContainerAppsPatchesApplySamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Apply. - * json - */ - /** - * Sample code: ContainerAppsPatches_Apply_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches().apply("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java deleted file mode 100644 index 23aaaa9b0663..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsPatches Delete. - */ -public final class ContainerAppsPatchesDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Delete. - * json - */ - /** - * Sample code: ContainerAppsPatches_Delete_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches().delete("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java deleted file mode 100644 index f0bf66130555..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsPatches Get. - */ -public final class ContainerAppsPatchesGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Get. - * json - */ - /** - * Sample code: ContainerAppsPatches_Get_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches() - .getWithResponse("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java deleted file mode 100644 index 89b38226f431..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for ContainerAppsPatches ListByContainerApp. - */ -public final class ContainerAppsPatchesListByContainerAppSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsPatches_ListByContainerApp.json - */ - /** - * Sample code: ContainerAppsPatches_ListByContainerApp_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void containerAppsPatchesListByContainerApp0( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches().listByContainerApp("rg", "test-app", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java deleted file mode 100644 index 2ea4c1b7b00b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; - -/** - * Samples for ContainerAppsPatches SkipConfigure. - */ -public final class ContainerAppsPatchesSkipConfigureSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerAppsPatches_Skip_Configure.json - */ - /** - * Sample code: ContainerAppsPatches_Skip_Configure_0. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - containerAppsPatchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsPatches() - .skipConfigure("rg", "test-app", "testPatch-25fe4b", new PatchSkipConfig().withSkip(true), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index be0a59dc733c..02346844d642 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index 32236a3fd144..17b1d4e8c4e6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index fa1b1328e52e..9d0a21db96fe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Activate.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index 18268907227c..9ae39325805c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Deactivate.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index 66a0df2e7322..1f4b463c98b9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 86254c2f2c3b..f5164398bc2b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index 4ccaba04c1cd..f01a4c2c0e78 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsRestartRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Restart.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java index af9314a90520..19921543f36d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java @@ -7,7 +7,12 @@ import com.azure.resourcemanager.appcontainers.models.ContainerType; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; +import com.azure.resourcemanager.appcontainers.models.LifecycleConfiguration; +import com.azure.resourcemanager.appcontainers.models.LifecycleType; +import com.azure.resourcemanager.appcontainers.models.ManagedIdentitySetting; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.PoolManagementType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionContainer; @@ -15,6 +20,7 @@ import com.azure.resourcemanager.appcontainers.models.SessionIngress; import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionRegistryCredentials; import java.util.Arrays; /** @@ -22,30 +28,34 @@ */ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_CreateOrUpdate. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * SessionPools_LifecycleOnContainerExit_CreateOrUpdate.json */ /** - * Sample code: Create or Update Session Pool. + * Sample code: Create or Update Session Pool with lifecycle OnContainerExit Timed. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - createOrUpdateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void createOrUpdateSessionPoolWithLifecycleOnContainerExitTimed( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerAppsSessionPools() .define("testsessionpool") .withRegion("East US") .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withContainerType(ContainerType.CUSTOM_CONTAINER) .withPoolManagementType(PoolManagementType.DYNAMIC) .withScaleConfiguration( new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) - .withDynamicPoolConfiguration( - new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) + .withDynamicPoolConfiguration(new DynamicPoolConfiguration().withLifecycleConfiguration( + new LifecycleConfiguration().withLifecycleType(LifecycleType.ON_CONTAINER_EXIT) + .withMaxAlivePeriodInSeconds(86400))) .withCustomContainerTemplate(new CustomContainerTemplate() + .withRegistryCredentials(new SessionRegistryCredentials().withServer("test.azurecr.io") + .withIdentity( + "/subscriptions/7a497526-bb8d-4816-9795-db1418a1f977/resourcegroups/test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testSP")) .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") .withName("testinitcontainer") .withCommand(Arrays.asList("/bin/sh")) @@ -54,6 +64,50 @@ public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { .withIngress(new SessionIngress().withTargetPort(80))) .withSessionNetworkConfiguration( new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .withManagedIdentitySettings(Arrays.asList( + new ManagedIdentitySetting().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.MAIN))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ + * SessionPools_LifecycleTimed_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Session Pool with lifecycle type Timed. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateSessionPoolWithLifecycleTypeTimed( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .define("testsessionpool") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withContainerType(ContainerType.CUSTOM_CONTAINER) + .withPoolManagementType(PoolManagementType.DYNAMIC) + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration(new DynamicPoolConfiguration().withLifecycleConfiguration( + new LifecycleConfiguration().withLifecycleType(LifecycleType.ON_CONTAINER_EXIT) + .withMaxAlivePeriodInSeconds(86400))) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withRegistryCredentials(new SessionRegistryCredentials().withServer("test.azurecr.io") + .withIdentity( + "/subscriptions/7a497526-bb8d-4816-9795-db1418a1f977/resourcegroups/test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testSP")) + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .withManagedIdentitySettings(Arrays.asList( + new ManagedIdentitySetting().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.MAIN))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java index 7b9bd5de12ea..5cb1b08ecfee 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSessionPoolsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_Delete.json */ /** * Sample code: Delete Session Pool. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java index c136e056fa44..5b31315c3125 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_Get.json */ /** * Sample code: Get Session Pool. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java index 1677fc7d7798..a42c410c00df 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java @@ -9,8 +9,8 @@ */ public final class ContainerAppsSessionPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SessionPools_ListByResourceGroup.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_ListByResourceGroup.json */ /** * Sample code: List Session Pools by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java index 37ddb684416e..a9e3d2012d47 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java @@ -9,8 +9,8 @@ */ public final class ContainerAppsSessionPoolsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SessionPools_ListBySubscription.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_ListBySubscription.json */ /** * Sample code: List Session Pools by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java index 0fabb3c3e25b..5cef7d1c1188 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; -import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExecutionType; import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; import com.azure.resourcemanager.appcontainers.models.SessionContainer; import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; @@ -22,7 +20,7 @@ public final class ContainerAppsSessionPoolsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SessionPools_Patch.json */ /** * Sample code: Update Session Pool. @@ -36,8 +34,6 @@ public static void updateSessionPool(com.azure.resourcemanager.appcontainers.Con resource.update() .withScaleConfiguration( new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) - .withDynamicPoolConfiguration( - new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) .withCustomContainerTemplate(new CustomContainerTemplate() .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") .withName("testinitcontainer") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index 6fb517b9f8e3..113e83bb7126 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -5,18 +5,16 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.AzureCredentials; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; import com.azure.resourcemanager.appcontainers.models.RegistryInfo; -import java.util.Arrays; /** * Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SourceControls_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -39,13 +37,8 @@ public static void createOrUpdateContainerAppSourceControl( .withTenantId("") .withKind("feaderated")) .withContextPath("./") - .withDockerfilePath("./Dockerfile") .withGithubPersonalAccessToken("fakeTokenPlaceholder") - .withImage("image/tag") - .withBuildEnvironmentVariables( - Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), - new EnvironmentVariable().withName("foo2").withValue("bar2")))) - .withXMsGithubAuxiliary("githubaccesstoken") + .withImage("image/tag")) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java index 9f430abc6070..cc0205bbf6f3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -20,7 +20,6 @@ public final class ContainerAppsSourceControlsDeleteSamples { public static void deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerAppsSourceControls() - .delete("workerapps-rg-xj", "testcanadacentral", "current", "githubaccesstoken", false, false, - com.azure.core.util.Context.NONE); + .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index c64fd5555ada..4633305f585d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSourceControlsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index d83a9a11534f..19fda8eb4492 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -9,8 +9,8 @@ */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * SourceControls_ListByContainer.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java index 86025c253520..580923c9a58c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Start.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. @@ -18,6 +18,6 @@ public final class ContainerAppsStartSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void startContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().start("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + manager.containerApps().start("rg", "testworkerapp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java index 48f53c7c4906..1a93eb871e02 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsStopSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Stop.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. @@ -18,6 +18,6 @@ public final class ContainerAppsStopSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void stopContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().stop("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + manager.containerApps().stop("rg", "testworkerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index 73cbb75c73b6..adae3d28c4b6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java @@ -22,14 +22,9 @@ import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.Level; import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; import com.azure.resourcemanager.appcontainers.models.Runtime; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -47,7 +42,7 @@ public final class ContainerAppsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -56,7 +51,7 @@ public final class ContainerAppsUpdateSamples { */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { ContainerApp resource = manager.containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rg", "testcontainerapp0", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) @@ -65,7 +60,7 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withIngress(new Ingress().withExternal(true) .withTargetPort(3000) .withTraffic(Arrays.asList(new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") + .withRevisionName("testcontainerapp0-ab1234") .withWeight(100) .withLabel("production"))) .withCustomDomains(Arrays.asList(new CustomDomain() @@ -91,28 +86,23 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withIpAddressRange("192.168.1.1/8") .withAction(Action.ALLOW))) .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) - .withDapr(new Dapr() - .withEnabled(true) + .withDapr(new Dapr().withEnabled(true) .withAppProtocol(AppProtocol.HTTP) .withAppPort(3000) .withHttpReadBufferSize(30) .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( - new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true))) .withMaxInactiveRevisions(10) .withService(new Service().withType("redis"))) .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerapp0:v4") .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) .withContainers(Arrays.asList(new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") + .withImage("repo/testcontainerapp0:v1") + .withName("testcontainerapp0") .withProbes( Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() .withHttpHeaders( @@ -131,9 +121,7 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withMetadata(mapOf("concurrentRequests", "50")))))) .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") - .withName("service") - .withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .withName("service")))) .apply(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index d4b9a794ffc7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,110 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; - -/** - * Samples for DaprComponentResiliencyPolicies CreateOrUpdate. - */ -public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json - */ - /** - * Sample code: Create or update dapr component resiliency policy with outbound policy only. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .define("myresiliencypolicy") - .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100) - .withMaxIntervalInMilliseconds(30000))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) - .withTimeoutInSeconds(20) - .withIntervalInSeconds(60))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json - */ - /** - * Sample code: Create or update dapr component resiliency policy with all options. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .define("myresiliencypolicy") - .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(15) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000) - .withMaxIntervalInMilliseconds(5500))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(30)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(5) - .withTimeoutInSeconds(10) - .withIntervalInSeconds(4))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100) - .withMaxIntervalInMilliseconds(30000))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) - .withTimeoutInSeconds(20) - .withIntervalInSeconds(60))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json - */ - /** - * Sample code: Create or update dapr component resiliency policy with sparse options. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .define("myresiliencypolicy") - .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000) - .withMaxIntervalInMilliseconds(5500))) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) - .withTimeoutInSeconds(20))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration().withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12))) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java deleted file mode 100644 index c3c9cc5c5868..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -/** - * Samples for DaprComponentResiliencyPolicies Delete. - */ -public final class DaprComponentResiliencyPoliciesDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicies_Delete.json - */ - /** - * Sample code: Delete dapr component resiliency policy. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - deleteDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java deleted file mode 100644 index f45ee6c3a9eb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -/** - * Samples for DaprComponentResiliencyPolicies Get. - */ -public final class DaprComponentResiliencyPoliciesGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicies_Get.json - */ - /** - * Sample code: Get Dapr component resiliency policy. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .getWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java deleted file mode 100644 index 550d0ccdd315..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for DaprComponentResiliencyPolicies List. - */ -public final class DaprComponentResiliencyPoliciesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponentResiliencyPolicies_List.json - */ - /** - * Sample code: List Dapr component resiliency policies. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listDaprComponentResiliencyPolicies(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies() - .list("examplerg", "myenvironment", "mydaprcomponent", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java index 362037bead0a..39cc210bef35 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; @@ -16,8 +14,9 @@ */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_CreateOrUpdate_Secrets + * .json */ /** * Sample code: Create or update dapr component with secrets. @@ -37,17 +36,12 @@ public static void createOrUpdateDaprComponentWithSecrets( new DaprMetadata().withName("database").withValue("itemsDB"), new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), + .withScopes(Arrays.asList("container-app-1", "container-app-2")), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** @@ -68,12 +62,7 @@ public static void createOrUpdateDaprComponentWithSecretStoreComponent( new DaprMetadata().withName("database").withValue("itemsDB"), new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") - .withServiceId( - "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") - .withMetadata( - new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), + .withScopes(Arrays.asList("container-app-1", "container-app-2")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index 6a0bd40611f5..eadf0c0b328a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class DaprComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index e1931e12e683..b1e9a21e27ea 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * DaprComponents_Get_SecretStoreComponent.json */ /** @@ -25,8 +25,7 @@ public static void getDaprComponentWithSecretStoreComponent( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_Get_Secrets. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java index ce2805bc3cd4..0e78e6e5bd0f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java @@ -10,7 +10,7 @@ public final class DaprComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index 747f433036c5..0e19f628dc1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java @@ -10,8 +10,7 @@ public final class DaprComponentsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_ListSecrets. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java deleted file mode 100644 index e9752162c894..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,98 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for DaprSubscriptions CreateOrUpdate. - */ -public final class DaprSubscriptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json - */ - /** - * Sample code: Create or update dapr subscription with route rules and metadata. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withPubsubName("mypubsubcomponent") - .withTopic("inventory") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList( - new DaprSubscriptionRouteRule().withMatch("event.type == 'widget'").withPath("/widgets"), - new DaprSubscriptionRouteRule().withMatch("event.type == 'gadget'").withPath("/gadgets"))) - .withDefaultProperty("/products")) - .withMetadata(mapOf("foo", "bar", "hello", "world")) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json - */ - /** - * Sample code: Create or update dapr subscription with default route only. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withPubsubName("mypubsubcomponent") - .withTopic("inventory") - .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json - */ - /** - * Sample code: Create or update dapr subscription with bulk subscribe configuration and scopes. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withPubsubName("mypubsubcomponent") - .withTopic("inventory") - .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) - .withScopes(Arrays.asList("warehouseapp", "customersupportapp")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(123) - .withMaxAwaitDurationMs(500)) - .create(); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java deleted file mode 100644 index b02f4a6eeb4a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for DaprSubscriptions Delete. - */ -public final class DaprSubscriptionsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_Delete. - * json - */ - /** - * Sample code: Delete dapr subscription. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteDaprSubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .deleteWithResponse("examplerg", "myenvironment", "mysubscription", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java deleted file mode 100644 index f1a79e7b214e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java +++ /dev/null @@ -1,55 +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.appcontainers.generated; - -/** - * Samples for DaprSubscriptions Get. - */ -public final class DaprSubscriptionsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_Get_DefaultRoute.json - */ - /** - * Sample code: Get Dapr subscription with bulk subscribe configuration and scopes. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_Get_BulkSubscribeAndScopes.json - */ - /** - * Sample code: Get Dapr subscription with default route only. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprSubscriptionWithDefaultRouteOnly( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DaprSubscriptions_Get_RouteRulesAndMetadata.json - */ - /** - * Sample code: GetDapr subscription with route rules and metadata. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getDaprSubscriptionWithRouteRulesAndMetadata( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions() - .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java deleted file mode 100644 index faa20c8c5279..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for DaprSubscriptions List. - */ -public final class DaprSubscriptionsListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprSubscriptions_List.json - */ - /** - * Sample code: List Dapr subscriptions. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listDaprSubscriptions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java deleted file mode 100644 index 7095a1aa2bc5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,58 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; - -/** - * Samples for DotNetComponents CreateOrUpdate. - */ -public final class DotNetComponentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update .NET Component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createOrUpdateNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .define("mydotnetcomponent") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_CreateOrUpdate_ServiceBind.json - */ - /** - * Sample code: Create or Update .NET Component with ServiceBinds. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateNETComponentWithServiceBinds( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .define("mydotnetcomponent") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") - .withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java deleted file mode 100644 index 72fecd980925..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for DotNetComponents Delete. - */ -public final class DotNetComponentsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Delete.json - */ - /** - * Sample code: Delete .NET Component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .delete("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java deleted file mode 100644 index 3d3fe0a9f2e4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -/** - * Samples for DotNetComponents Get. - */ -public final class DotNetComponentsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_Get_ServiceBind.json - */ - /** - * Sample code: Get .NET Component with ServiceBinds. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Get.json - */ - /** - * Sample code: Get .NET Component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java deleted file mode 100644 index 9e2ec3d64fb1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -/** - * Samples for DotNetComponents List. - */ -public final class DotNetComponentsListSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_List.json - */ - /** - * Sample code: List .NET Components. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listNETComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_List_ServiceBind.json - */ - /** - * Sample code: List .NET Components with ServiceBinds. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - listNETComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java deleted file mode 100644 index 7a8a7b986190..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java +++ /dev/null @@ -1,60 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; - -/** - * Samples for DotNetComponents Update. - */ -public final class DotNetComponentsUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * DotNetComponents_Patch_ServiceBind.json - */ - /** - * Sample code: Patch .NET Component with ServiceBinds. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - patchNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - DotNetComponent resource = manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") - .withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) - .apply(); - } - - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DotNetComponents_Patch.json - */ - /** - * Sample code: Patch .NET Component. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void patchNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - DotNetComponent resource = manager.dotNetComponents() - .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .apply(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java deleted file mode 100644 index d2d152bd8429..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -/** - * Samples for FunctionsExtension InvokeFunctionsHost. - */ -public final class FunctionsExtensionInvokeFunctionsHostSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/FunctionsExtension_Post.json - */ - /** - * Sample code: Invoke Functions host using Functions Extension API. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void invokeFunctionsHostUsingFunctionsExtensionAPI( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.functionsExtensions() - .invokeFunctionsHostWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java index db9afd651540..d4c318384c10 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * JavaComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -41,8 +41,8 @@ public static void createOrUpdateJavaComponentWithServiceBinds( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_CreateOrUpdate.json */ /** * Sample code: Create or Update Java Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java index 9f58ca027577..e97d1d6df7d4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java index 9b84692a24aa..8be24413fcfe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -23,8 +23,8 @@ public static void getJavaComponent(com.azure.resourcemanager.appcontainers.Cont } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_Get_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Get_ServiceBind.json */ /** * Sample code: Get Java Component with ServiceBinds. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java index c44efbdb793f..6d75ed2d4012 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -22,8 +22,8 @@ public static void listJavaComponents(com.azure.resourcemanager.appcontainers.Co } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_List_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_List_ServiceBind.json */ /** * Sample code: List Java Components with ServiceBinds. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java index 6150658c966d..f7d1405debe1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java @@ -17,7 +17,7 @@ public final class JavaComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/JavaComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -39,8 +39,8 @@ public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.Co } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * JavaComponents_Patch_ServiceBind.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/JavaComponents_Patch_ServiceBind.json */ /** * Sample code: Patch Java Component with ServiceBinds. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java index 973b63251022..709902e398ca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java @@ -11,10 +11,6 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.IdentitySettings; -import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; @@ -24,9 +20,11 @@ import com.azure.resourcemanager.appcontainers.models.JobTemplate; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.StorageType; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; +import com.azure.resourcemanager.appcontainers.models.Volume; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; @@ -38,54 +36,8 @@ */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Job_CreateorUpdate_ConnectedEnvironment.json - */ - /** - * Sample code: Create or Update Container Apps Job On A Connected Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") - .withExtendedLocation(new ExtendedLocation().withName( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(5) - .withPeriodSeconds(3) - .withType(Type.LIVENESS)))))) - .create(); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. @@ -95,7 +47,7 @@ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { manager.jobs() - .define("testcontainerAppsJob0") + .define("testcontainerappsjob0") .withRegion("East US") .withExistingResourceGroup("rg") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) @@ -119,19 +71,19 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( .withIdentity( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerappsjob0:v4") .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) .withContainers(Arrays.asList( - new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0")))) + new Container().withImage("repo/testcontainerappsjob0:v1").withName("testcontainerappsjob0")))) .create(); } /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_CreateorUpdate.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -141,50 +93,48 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( public static void createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs() - .define("testcontainerAppsJob0") + .define("testcontainerappsjob0") .withRegion("East US") .withExistingResourceGroup("rg") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", - new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) .withReplicaTimeout(10) .withReplicaRetryLimit(10) .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4)) - .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") - .withLifecycle(IdentitySettingsLifeCycle.ALL), - new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerappsjob0:v4") .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile") - .withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile") - .withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerappsjob0:v1") + .withName("testcontainerappsjob0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount() + .withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() .withHttpHeaders( Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") .withValue("Awesome"))) .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(5) - .withPeriodSeconds(3) - .withType(Type.LIVENESS)))))) + .withPort(8080)).withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile") + .withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage")))) .create(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java index b76e44883372..66e38ce32e78 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. @@ -18,6 +17,6 @@ public final class JobsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().delete("rg", "testWorkerContainerAppsJob0", com.azure.core.util.Context.NONE); + manager.jobs().delete("rg", "testworkercontainerappsjob0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java index 94a4e76b7044..bf43b61935d4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java @@ -10,7 +10,7 @@ public final class JobsExecutionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Executions_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. @@ -19,6 +19,6 @@ public final class JobsExecutionsListSamples { */ public static void getAContainerAppsJobExecutions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobsExecutions().list("rg", "testcontainerAppsJob0", null, com.azure.core.util.Context.NONE); + manager.jobsExecutions().list("rg", "testcontainerappsjob0", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java index a309e5dde176..185cdf5cefb7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java @@ -9,8 +9,7 @@ */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. @@ -18,6 +17,6 @@ public final class JobsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + manager.jobs().getByResourceGroupWithResponse("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java index cca0b1cf282a..fbafaf2f4272 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java @@ -10,7 +10,7 @@ public final class JobsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_GetDetector.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java index 117f74e5aa9c..caaf8073454c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java @@ -10,8 +10,7 @@ public final class JobsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListByResourceGroup. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Jobs_ListByResourceGroup.json */ /** * Sample code: List Container Apps Jobs by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java index c68aecf2608c..61adc7018334 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java @@ -10,7 +10,7 @@ public final class JobsListDetectorsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListDetectors.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java index 67d518d641ac..25e352c20c2e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java @@ -10,7 +10,7 @@ public final class JobsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_ListBySubscription.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java index f19d121d71fa..efdde4103312 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java @@ -10,7 +10,7 @@ public final class JobsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ListSecrets.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. @@ -19,6 +19,6 @@ public final class JobsListSecretsSamples { */ public static void listContainerAppsJobSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().listSecretsWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + manager.jobs().listSecretsWithResponse("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java index db1a83552fba..8ed1678437d9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java @@ -9,8 +9,7 @@ */ public final class JobsProxyGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_ProxyGet.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. @@ -19,6 +18,6 @@ public final class JobsProxyGetSamples { */ public static void getContainerAppJobByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().proxyGetWithResponse("rg", "testcontainerAppsJob0", "rootApi", com.azure.core.util.Context.NONE); + manager.jobs().proxyGetWithResponse("rg", "testcontainerappsjob0", "rootApi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java deleted file mode 100644 index a0d1a9a3d2b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for Jobs Resume. - */ -public final class JobsResumeSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json - */ - /** - * Sample code: Resume Job. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void resumeJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().resume("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java index 93c5a0146c92..d01a1e18e743 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java @@ -14,8 +14,7 @@ */ public final class JobsStartSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -24,15 +23,15 @@ public final class JobsStartSamples { */ public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs() - .start("rg", "testcontainerAppsJob0", new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testcontainerAppsJob0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") + .start("rg", "testcontainerappsjob0", new JobExecutionTemplate() + .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerappsjob0:v4") + .withName("testcontainerappsjob0") + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerappsjob0:v4") .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java index 415fe63c3051..6162e31c2704 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java @@ -10,7 +10,7 @@ public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Execution.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. @@ -19,6 +19,6 @@ public final class JobsStopExecutionSamples { */ public static void terminateAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().stopExecution("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + manager.jobs().stopExecution("rg", "testcontainerappsjob0", "jobExecution1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java index 276f8a8ab0b4..3d8f1eeb8964 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java @@ -10,7 +10,7 @@ public final class JobsStopMultipleExecutionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Stop_Multiple.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -19,6 +19,6 @@ public final class JobsStopMultipleExecutionsSamples { */ public static void terminateMultipleContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().stopMultipleExecutions("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + manager.jobs().stopMultipleExecutions("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java deleted file mode 100644 index ade74a6c222b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -/** - * Samples for Jobs Suspend. - */ -public final class JobsSuspendSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json - */ - /** - * Sample code: Suspend Job. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void suspendJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().suspend("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java index ee301ddb73d9..5a2c63ec1c16 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java @@ -24,8 +24,7 @@ */ public final class JobsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -34,7 +33,7 @@ public final class JobsUpdateSamples { */ public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { Job resource = manager.jobs() - .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("rg", "testcontainerappsjob0", com.azure.core.util.Context.NONE) .getValue(); resource.update() .withProperties(new JobPatchPropertiesProperties() @@ -44,13 +43,13 @@ public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers .withManualTriggerConfig( new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerappsjob0:v4") .withName("testinitcontainerAppsJob0") .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") + .withResources(new ContainerResources().withCpu(0.5D).withMemory("1Gi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerappsjob0:v1") + .withName("testcontainerappsjob0") .withProbes(Arrays.asList(new ContainerAppProbe() .withHttpGet(new ContainerAppProbeHttpGet() .withHttpHeaders(Arrays diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java deleted file mode 100644 index 7059bea17e9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.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.appcontainers.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import java.io.IOException; - -/** - * Samples for LogicApps CreateOrUpdate. - */ -public final class LogicAppsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Create.json - */ - /** - * Sample code: Create logic app extension. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void createLogicAppExtension(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) - throws IOException { - manager.logicApps() - .define("testcontainerApp0") - .withExistingContainerApp("examplerg", "testcontainerApp0") - .withProperties(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) - .create(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java deleted file mode 100644 index 8a6c4e072c79..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -/** - * Samples for LogicApps Delete. - */ -public final class LogicAppsDeleteSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Delete.json - */ - /** - * Sample code: Create logic app extension. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - createLogicAppExtension(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .deleteWithResponse("examplerg", "testcontainerApp0", "testcontainerApp0", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java deleted file mode 100644 index db0a080601c7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java +++ /dev/null @@ -1,57 +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.appcontainers.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import java.io.IOException; -import java.util.Arrays; - -/** - * Samples for LogicApps DeployWorkflowArtifacts. - */ -public final class LogicAppsDeployWorkflowArtifactsSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * LogicApps_PostDeployWorkflowArtifacts.json - */ - /** - * Sample code: Deploys workflow artifacts. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deploysWorkflowArtifacts(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) - throws IOException { - manager.logicApps() - .deployWorkflowArtifactsWithResponse("testrg123", "testapp2", "testapp2", new WorkflowArtifacts() - .withAppSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize( - "{\"eventHub_connectionString\":\"Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=\"}", - Object.class, SerializerEncoding.JSON)) - .withFiles(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize( - "{\"connections.json\":{\"managedApiConnections\":{},\"serviceProviderConnections\":{\"eventHub\":{\"displayName\":\"example1\",\"parameterValues\":{\"connectionString\":\"@appsetting('eventHub_connectionString')\"},\"serviceProvider\":{\"id\":\"/serviceProviders/eventHub\"}}}},\"test1/workflow.json\":{\"definition\":{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"actions\":{},\"contentVersion\":\"1.0.0.0\",\"outputs\":{},\"triggers\":{\"When_events_are_available_in_Event_hub\":{\"type\":\"ServiceProvider\",\"inputs\":{\"parameters\":{\"eventHubName\":\"test123\"},\"serviceProviderConfiguration\":{\"operationId\":\"receiveEvents\",\"connectionName\":\"eventHub\",\"serviceProviderId\":\"/serviceProviders/eventHub\"}},\"splitOn\":\"@triggerOutputs()?['body']\"}}},\"kind\":\"Stateful\"}}", - Object.class, SerializerEncoding.JSON)), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * LogicApps_DeleteDeployWorkflowArtifacts.json - */ - /** - * Sample code: Delete workflow artifacts. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - deleteWorkflowArtifacts(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .deployWorkflowArtifactsWithResponse("testrg123", "testapp2", "testapp2", - new WorkflowArtifacts().withFilesToDelete(Arrays.asList("test/workflow.json", "test/")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java deleted file mode 100644 index a15c4877b3b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for LogicApps Get. - */ -public final class LogicAppsGetSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_Get.json - */ - /** - * Sample code: Get logic app extension by name. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getLogicAppExtensionByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .getWithResponse("examplerg", "testcontainerApp0", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java deleted file mode 100644 index b00e986a4870..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for LogicApps GetWorkflow. - */ -public final class LogicAppsGetWorkflowSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_GetWorkflow.json - */ - /** - * Sample code: GET a workflow. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void gETAWorkflow(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .getWorkflowWithResponse("examplerg", "testcontainerApp0", "testcontainerApp0", "stateful1", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java deleted file mode 100644 index 21d6cbf7adbc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; - -/** - * Samples for LogicApps Invoke. - */ -public final class LogicAppsInvokeSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListCallbackURL. - * json - */ - /** - * Sample code: Get workflow list call back URL. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void - getWorkflowListCallBackURL(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .invokeWithResponse("testrg123", "testapp2", "testapp2", - "/runtime/webhooks/workflow/api/management/workflows/Stateful1/triggers/When_a_HTTP_request_is_received/listCallbackUrl", - LogicAppsProxyMethod.POST, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java deleted file mode 100644 index 966165fb33cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -/** - * Samples for LogicApps ListWorkflowsConnections. - */ -public final class LogicAppsListWorkflowsConnectionsSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListConnections. - * json - */ - /** - * Sample code: List the Workflows Configuration Connections. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listTheWorkflowsConfigurationConnections( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .listWorkflowsConnectionsWithResponse("testrg123", "testapp2", "testapp2", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java deleted file mode 100644 index e89f741ad8f1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -/** - * Samples for LogicApps ListWorkflows. - */ -public final class LogicAppsListWorkflowsSamples { - /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/LogicApps_ListWorkflows.json - */ - /** - * Sample code: List the workflows. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listTheWorkflows(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.logicApps() - .listWorkflows("examplerg", "testcontainerApp0", "testcontainerApp0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java index 48aa7b073730..5f85346df362 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java @@ -12,8 +12,9 @@ */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificate_CreateOrUpdate. + * json */ /** * Sample code: Create or Update Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java index 41fbb11fe73a..692c305d96db 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java @@ -10,8 +10,7 @@ public final class ManagedCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Delete. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java index f7f72aed6b2d..80f64b8598c8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java @@ -10,7 +10,7 @@ public final class ManagedCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificate_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java index 31bcebb6e29c..817e76eae900 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedCertificates_ListByManagedEnvironment.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java index 895c3e3e8511..acecd947187f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java @@ -14,8 +14,7 @@ public final class ManagedCertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedCertificates_Patch. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java index a0c94afac2b8..ba8a8a2dd908 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -9,8 +9,9 @@ */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentDiagnostics_Get. + * json */ /** * Sample code: Get diagnostic data for a managed environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java index c9a294291bc9..34d0634e2ff0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -9,8 +9,9 @@ */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentDiagnostics_List. + * json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index 87843e4e62a1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; - -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections CreateOrUpdate. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json - */ - /** - * Sample code: Update a Private Endpoint Connection by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void updateAPrivateEndpointConnectionByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - PrivateEndpointConnection resource = manager.managedEnvironmentPrivateEndpointConnections() - .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withActionsRequired("None")) - .apply(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index b5d38a2e8e0a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections Delete. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_Delete.json - */ - /** - * Sample code: Delete a Private Endpoint Connection by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void deleteAPrivateEndpointConnectionByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateEndpointConnections() - .delete("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index 721ed9d779f3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections Get. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_Get.json - */ - /** - * Sample code: Get a Private Endpoint Connection by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void getAPrivateEndpointConnectionByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateEndpointConnections() - .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java deleted file mode 100644 index a3aae49c0f53..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ManagedEnvironmentPrivateEndpointConnections List. - */ -public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateEndpointConnections_List.json - */ - /** - * Sample code: List Private Endpoint Connections by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listPrivateEndpointConnectionsByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateEndpointConnections() - .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java deleted file mode 100644 index 3ff930306954..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -/** - * Samples for ManagedEnvironmentPrivateLinkResources List. - */ -public final class ManagedEnvironmentPrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentPrivateLinkResources_List.json - */ - /** - * Sample code: List Private Link Resources by Managed Environment. - * - * @param manager Entry point to ContainerAppsApiManager. - */ - public static void listPrivateLinkResourcesByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentPrivateLinkResources() - .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java index 85e1ddcd9fb8..a61c76dea4e6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java @@ -9,8 +9,8 @@ */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentUsages_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentUsages_List.json */ /** * Sample code: List managed environment usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java index 0313fc040349..587fb0db54b2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java @@ -4,24 +4,15 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.DataDogConfiguration; -import com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration; -import com.azure.resourcemanager.appcontainers.models.Header; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; -import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; import com.azure.resourcemanager.appcontainers.models.Mtls; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.OtlpConfiguration; -import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; @@ -34,7 +25,7 @@ */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** @@ -60,7 +51,6 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( new WorkloadProfile().withName("My-GP-01") - .withEnableFips(true) .withWorkloadProfileType("GeneralPurpose") .withMinimumCount(3) .withMaximumCount(12), @@ -78,8 +68,9 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_CreateOrUpdate. + * json */ /** * Sample code: Create environments. @@ -100,35 +91,14 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) - .withAppLogsConfiguration(new AppLogsConfiguration() - .withLogAnalyticsConfiguration(new LogAnalyticsConfiguration().withCustomerId("string") - .withSharedKey("fakeTokenPlaceholder") - .withDynamicJsonColumns(true))) - .withAppInsightsConfiguration(new AppInsightsConfiguration().withConnectionString( - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/")) - .withOpenTelemetryConfiguration( - new OpenTelemetryConfiguration() - .withDestinationsConfiguration( - new DestinationsConfiguration() - .withDataDogConfiguration( - new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder")) - .withOtlpConfigurations(Arrays.asList(new OtlpConfiguration().withName("dashboard") - .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80") - .withInsecure(true) - .withHeaders(Arrays - .asList(new Header().withKey("fakeTokenPlaceholder").withValue("xxxxxxxxxxx")))))) - .withTracesConfiguration( - new TracesConfiguration().withIncludeDapr(true).withDestinations(Arrays.asList("appInsights"))) - .withLogsConfiguration(new LogsConfiguration().withDestinations(Arrays.asList("appInsights"))) - .withMetricsConfiguration( - new MetricsConfiguration().withIncludeKeda(true).withDestinations(Arrays.asList("dataDog")))) + .withAppLogsConfiguration(new AppLogsConfiguration().withLogAnalyticsConfiguration( + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") .withCertificateValue("Y2VydA==".getBytes()) .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( new WorkloadProfile().withName("My-GP-01") - .withEnableFips(true) .withWorkloadProfileType("GeneralPurpose") .withMinimumCount(3) .withMaximumCount(12), diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java index 29090f9ae420..a46748c3b88f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java @@ -10,8 +10,7 @@ public final class ManagedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Delete. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java index 8e2a2d466ebc..604349695183 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java index da417c5c2e48..5a091b365852 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -9,8 +9,8 @@ */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java index 58263b19bcf3..74ac26f78193 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index bd2c8466caa9..46ac267ffb55 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_ListByResourceGroup.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java index 24c471f99554..4f7bc1467310 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_ListBySubscription.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java index dc3b8052e876..2116abbabb60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironments_ListWorkloadProfileStates.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index 57c64dc2e168..4591ed1b39f5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** @@ -35,7 +35,7 @@ public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java index 96aa482aec40..b27440b4bd4b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -9,8 +9,9 @@ */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentsStorages_Delete. + * json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index 514d0805333e..4a6132d6b29c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -9,8 +9,8 @@ */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage. @@ -24,7 +24,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index bbe5f49947de..f5f83ef5d438 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -9,8 +9,8 @@ */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ManagedEnvironmentsStorages_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java index 562aefc9b79a..9ae4f23bfe33 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java @@ -14,8 +14,7 @@ public final class ManagedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ManagedEnvironments_Patch. - * json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java index 7d2e2239211f..2a67e1fce4ac 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -11,8 +11,9 @@ */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * Certificates_CheckNameAvailability.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Certificates_CheckNameAvailability. + * json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -29,8 +30,9 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ - * ContainerApps_CheckNameAvailability.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ContainerApps_CheckNameAvailability. + * json */ /** * Sample code: ContainerApps_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java index 8ad710ecba76..5c1e8d58885b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Operations_List.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Operations_List.json */ /** * Sample code: List all operations. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java index 5f2c8a16dacc..d5a176aaddd5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/ * Subscriptions_GetCustomDomainVerificationId.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java index 179edce84f52..be86b8628430 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java @@ -10,7 +10,7 @@ public final class ResourceProviderJobExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Job_Execution_Get.json + * specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -19,6 +19,6 @@ public final class ResourceProviderJobExecutionSamples { */ public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.resourceProviders() - .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + .jobExecutionWithResponse("rg", "testcontainerappsjob0", "jobExecution1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java index 69264fa45fa2..928f914eff30 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java @@ -9,8 +9,7 @@ */ public final class UsagesListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Usages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2025-01-01/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 6667610d952a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedAudiencesValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedAudiencesValidation model = BinaryData - .fromString("{\"allowedAudiences\":[\"eojnxqbzvddn\",\"wndeicbtwnp\",\"aoqvuh\",\"hcffcyddglmjthjq\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("eojnxqbzvddn", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model = new AllowedAudiencesValidation() - .withAllowedAudiences(Arrays.asList("eojnxqbzvddn", "wndeicbtwnp", "aoqvuh", "hcffcyddglmjthjq")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("eojnxqbzvddn", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java deleted file mode 100644 index 9c45fcbdebaa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedPrincipalsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedPrincipals model = BinaryData.fromString("{\"groups\":[\"a\",\"tjaodxobnb\"],\"identities\":[\"qp\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("a", model.groups().get(0)); - Assertions.assertEquals("qp", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model - = new AllowedPrincipals().withGroups(Arrays.asList("a", "tjaodxobnb")).withIdentities(Arrays.asList("qp")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("a", model.groups().get(0)); - Assertions.assertEquals("qp", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java deleted file mode 100644 index 7b0e21093f5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AppInsightsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AppInsightsConfiguration model = BinaryData.fromString("{\"connectionString\":\"mvagbwidqlvhuko\"}") - .toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("mvagbwidqlvhuko", model.connectionString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AppInsightsConfiguration model = new AppInsightsConfiguration().withConnectionString("mvagbwidqlvhuko"); - model = BinaryData.fromObject(model).toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("mvagbwidqlvhuko", model.connectionString()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java deleted file mode 100644 index 6951774890b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AppResilienciesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.appResiliencies() - .deleteWithResponse("odlikcdrdaasax", "obsmf", "wiyjvzuko", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 935ab80a5418..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; - -public final class AuthPlatformTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthPlatform model - = BinaryData.fromString("{\"enabled\":false,\"runtimeVersion\":\"ol\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("ol", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(false).withRuntimeVersion("ol"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("ol", model.runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java deleted file mode 100644 index 29084b04ae9c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,58 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableOperationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableOperations model = BinaryData.fromString( - "{\"value\":[{\"name\":\"wex\",\"isDataAction\":true,\"display\":{\"provider\":\"azipbhpwvqsg\",\"resource\":\"yuuzivens\",\"operation\":\"meyyvpkpatlb\",\"description\":\"pzgsk\"},\"origin\":\"fhfv\"},{\"name\":\"mknbnxwcdommpv\",\"isDataAction\":false,\"display\":{\"provider\":\"fgbrtt\",\"resource\":\"aclkiexhajlfnt\",\"operation\":\"qfyuttd\",\"description\":\"gbpvnwswmtxkyct\"},\"origin\":\"gzwx\"}],\"nextLink\":\"mecvogygzyvneeza\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("wex", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("azipbhpwvqsg", model.value().get(0).display().provider()); - Assertions.assertEquals("yuuzivens", model.value().get(0).display().resource()); - Assertions.assertEquals("meyyvpkpatlb", model.value().get(0).display().operation()); - Assertions.assertEquals("pzgsk", model.value().get(0).display().description()); - Assertions.assertEquals("fhfv", model.value().get(0).origin()); - Assertions.assertEquals("mecvogygzyvneeza", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = new AvailableOperations().withValue(Arrays.asList( - new OperationDetailInner().withName("wex") - .withIsDataAction(true) - .withDisplay(new OperationDisplay().withProvider("azipbhpwvqsg") - .withResource("yuuzivens") - .withOperation("meyyvpkpatlb") - .withDescription("pzgsk")) - .withOrigin("fhfv"), - new OperationDetailInner().withName("mknbnxwcdommpv") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("fgbrtt") - .withResource("aclkiexhajlfnt") - .withOperation("qfyuttd") - .withDescription("gbpvnwswmtxkyct")) - .withOrigin("gzwx"))) - .withNextLink("mecvogygzyvneeza"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("wex", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("azipbhpwvqsg", model.value().get(0).display().provider()); - Assertions.assertEquals("yuuzivens", model.value().get(0).display().resource()); - Assertions.assertEquals("meyyvpkpatlb", model.value().get(0).display().operation()); - Assertions.assertEquals("pzgsk", model.value().get(0).display().description()); - Assertions.assertEquals("fhfv", model.value().get(0).origin()); - Assertions.assertEquals("mecvogygzyvneeza", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java deleted file mode 100644 index 61dbb29cd3e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java +++ /dev/null @@ -1,46 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileInner model = BinaryData.fromString( - "{\"location\":\"fhyhltrpmopjmcma\",\"properties\":{\"category\":\"kthfui\",\"applicability\":\"Custom\",\"cores\":1411125802,\"memoryGiB\":2105680522,\"gpus\":1099680690,\"displayName\":\"xodpuozmyzydagfu\"},\"id\":\"bezy\",\"name\":\"uokktwhrdxwz\",\"type\":\"wqsmbsur\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.location()); - Assertions.assertEquals("kthfui", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1411125802, model.properties().cores()); - Assertions.assertEquals(2105680522, model.properties().memoryGiB()); - Assertions.assertEquals(1099680690, model.properties().gpus()); - Assertions.assertEquals("xodpuozmyzydagfu", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = new AvailableWorkloadProfileInner().withLocation("fhyhltrpmopjmcma") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("kthfui") - .withApplicability(Applicability.CUSTOM) - .withCores(1411125802) - .withMemoryGiB(2105680522) - .withGpus(1099680690) - .withDisplayName("xodpuozmyzydagfu")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.location()); - Assertions.assertEquals("kthfui", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1411125802, model.properties().cores()); - Assertions.assertEquals(2105680522, model.properties().memoryGiB()); - Assertions.assertEquals(1099680690, model.properties().gpus()); - Assertions.assertEquals("xodpuozmyzydagfu", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java deleted file mode 100644 index cc339dabfc4e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileProperties model = BinaryData.fromString( - "{\"category\":\"imoryocfsfksym\",\"applicability\":\"LocationDefault\",\"cores\":666664165,\"memoryGiB\":30564685,\"gpus\":741108852,\"displayName\":\"hqyudxorrqnbpoc\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("imoryocfsfksym", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(666664165, model.cores()); - Assertions.assertEquals(30564685, model.memoryGiB()); - Assertions.assertEquals(741108852, model.gpus()); - Assertions.assertEquals("hqyudxorrqnbpoc", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model - = new AvailableWorkloadProfileProperties().withCategory("imoryocfsfksym") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(666664165) - .withMemoryGiB(30564685) - .withGpus(741108852) - .withDisplayName("hqyudxorrqnbpoc"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("imoryocfsfksym", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(666664165, model.cores()); - Assertions.assertEquals(30564685, model.memoryGiB()); - Assertions.assertEquals(741108852, model.gpus()); - Assertions.assertEquals("hqyudxorrqnbpoc", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java deleted file mode 100644 index c0218213201a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,63 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfilesCollection model = BinaryData.fromString( - "{\"value\":[{\"location\":\"wdslfhotwmcy\",\"properties\":{\"category\":\"lbjnpgacftadehx\",\"applicability\":\"Custom\",\"cores\":1099330569,\"memoryGiB\":737203180,\"gpus\":1772029927,\"displayName\":\"suesnzw\"},\"id\":\"jbavorxzdm\",\"name\":\"hctbqvudwxdn\",\"type\":\"nvowgujju\"},{\"location\":\"dkcglhsl\",\"properties\":{\"category\":\"dyggdtjixhbku\",\"applicability\":\"Custom\",\"cores\":194127225,\"memoryGiB\":363488888,\"gpus\":1047075786,\"displayName\":\"n\"},\"id\":\"fyexfwhy\",\"name\":\"cibvyvdcsitynn\",\"type\":\"amdecte\"},{\"location\":\"iqscjeypv\",\"properties\":{\"category\":\"rkgqhcjrefo\",\"applicability\":\"Custom\",\"cores\":668805249,\"memoryGiB\":1422729812,\"gpus\":1834153709,\"displayName\":\"vxyqjpkcattpngjc\"},\"id\":\"czsqpjhvm\",\"name\":\"ajvnysounqe\",\"type\":\"a\"}],\"nextLink\":\"ae\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("wdslfhotwmcy", model.value().get(0).location()); - Assertions.assertEquals("lbjnpgacftadehx", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1099330569, model.value().get(0).properties().cores()); - Assertions.assertEquals(737203180, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(1772029927, model.value().get(0).properties().gpus()); - Assertions.assertEquals("suesnzw", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfilesCollection model = new AvailableWorkloadProfilesCollection().withValue(Arrays.asList( - new AvailableWorkloadProfileInner().withLocation("wdslfhotwmcy") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("lbjnpgacftadehx") - .withApplicability(Applicability.CUSTOM) - .withCores(1099330569) - .withMemoryGiB(737203180) - .withGpus(1772029927) - .withDisplayName("suesnzw")), - new AvailableWorkloadProfileInner().withLocation("dkcglhsl") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("dyggdtjixhbku") - .withApplicability(Applicability.CUSTOM) - .withCores(194127225) - .withMemoryGiB(363488888) - .withGpus(1047075786) - .withDisplayName("n")), - new AvailableWorkloadProfileInner().withLocation("iqscjeypv") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("rkgqhcjrefo") - .withApplicability(Applicability.CUSTOM) - .withCores(668805249) - .withMemoryGiB(1422729812) - .withGpus(1834153709) - .withDisplayName("vxyqjpkcattpngjc")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("wdslfhotwmcy", model.value().get(0).location()); - Assertions.assertEquals("lbjnpgacftadehx", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1099330569, model.value().get(0).properties().cores()); - Assertions.assertEquals(737203180, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(1772029927, model.value().get(0).properties().gpus()); - Assertions.assertEquals("suesnzw", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java deleted file mode 100644 index f689385105e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,46 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -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 AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - String responseStr - = "{\"value\":[{\"location\":\"lbvgwzsf\",\"properties\":{\"category\":\"dousnk\",\"applicability\":\"Custom\",\"cores\":1190539545,\"memoryGiB\":1496708072,\"gpus\":2093151817,\"displayName\":\"gfkbebauzlqbtxx\"},\"id\":\"f\",\"name\":\"njzudr\",\"type\":\"pzkg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.availableWorkloadProfiles().get("btahdeanii", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lbvgwzsf", response.iterator().next().location()); - Assertions.assertEquals("dousnk", response.iterator().next().properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, response.iterator().next().properties().applicability()); - Assertions.assertEquals(1190539545, response.iterator().next().properties().cores()); - Assertions.assertEquals(1496708072, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals(2093151817, response.iterator().next().properties().gpus()); - Assertions.assertEquals("gfkbebauzlqbtxx", response.iterator().next().properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java deleted file mode 100644 index 70f9ec5606ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureActiveDirectoryLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureActiveDirectoryLogin model = BinaryData - .fromString("{\"loginParameters\":[\"dzuhtymwi\",\"dkfthwxmnt\",\"i\"],\"disableWWWAuthenticate\":true}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("dzuhtymwi", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureActiveDirectoryLogin model - = new AzureActiveDirectoryLogin().withLoginParameters(Arrays.asList("dzuhtymwi", "dkfthwxmnt", "i")) - .withDisableWwwAuthenticate(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("dzuhtymwi", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index b1e8e59642c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsRegistrationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebAppsRegistration model - = BinaryData.fromString("{\"clientId\":\"vqdra\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("vqdra", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("vqdra"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("vqdra", model.clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java deleted file mode 100644 index ac919338da7b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebApps model - = BinaryData.fromString("{\"enabled\":true,\"registration\":{\"clientId\":\"gnxkrxdqmidtth\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = new AzureStaticWebApps().withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("gnxkrxdqmidtth")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java deleted file mode 100644 index e847c5141ae2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java +++ /dev/null @@ -1,51 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"id\":\"i\",\"name\":\"rvkdvjsllrm\",\"type\":\"d\",\"location\":\"t\",\"properties\":{\"category\":\"pulexxbczw\",\"meterType\":\"uwiqzb\",\"displayName\":\"vsovmyokac\"}},{\"id\":\"kwlhzdo\",\"name\":\"xjmflbvv\",\"type\":\"hrk\",\"location\":\"wwzjuqkhrsajiwku\",\"properties\":{\"category\":\"skghsauuimj\",\"meterType\":\"xieduugidyjrr\",\"displayName\":\"y\"}},{\"id\":\"svexcsonpclhoco\",\"name\":\"lkevle\",\"type\":\"zfbuhf\",\"location\":\"axkffei\",\"properties\":{\"category\":\"lvmezyvshxmzsbbz\",\"meterType\":\"gigr\",\"displayName\":\"burvjxxjnspy\"}},{\"id\":\"tko\",\"name\":\"kouknvudwtiu\",\"type\":\"ldngkpoci\",\"location\":\"yxoegukgjnp\",\"properties\":{\"category\":\"gygev\",\"meterType\":\"ntypmrbpizcdrqj\",\"displayName\":\"pyd\"}}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("t", model.value().get(0).location()); - Assertions.assertEquals("pulexxbczw", model.value().get(0).properties().category()); - Assertions.assertEquals("uwiqzb", model.value().get(0).properties().meterType()); - Assertions.assertEquals("vsovmyokac", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterCollectionInner model = new BillingMeterCollectionInner().withValue(Arrays.asList( - new BillingMeter().withLocation("t") - .withProperties(new BillingMeterProperties().withCategory("pulexxbczw") - .withMeterType("uwiqzb") - .withDisplayName("vsovmyokac")), - new BillingMeter().withLocation("wwzjuqkhrsajiwku") - .withProperties(new BillingMeterProperties().withCategory("skghsauuimj") - .withMeterType("xieduugidyjrr") - .withDisplayName("y")), - new BillingMeter().withLocation("axkffei") - .withProperties(new BillingMeterProperties().withCategory("lvmezyvshxmzsbbz") - .withMeterType("gigr") - .withDisplayName("burvjxxjnspy")), - new BillingMeter().withLocation("yxoegukgjnp") - .withProperties(new BillingMeterProperties().withCategory("gygev") - .withMeterType("ntypmrbpizcdrqj") - .withDisplayName("pyd")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("t", model.value().get(0).location()); - Assertions.assertEquals("pulexxbczw", model.value().get(0).properties().category()); - Assertions.assertEquals("uwiqzb", model.value().get(0).properties().meterType()); - Assertions.assertEquals("vsovmyokac", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java deleted file mode 100644 index 17919e9f809b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterProperties model = BinaryData - .fromString("{\"category\":\"xlwhzlsicoh\",\"meterType\":\"qnwvlrya\",\"displayName\":\"hheunmmqhgyx\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("xlwhzlsicoh", model.category()); - Assertions.assertEquals("qnwvlrya", model.meterType()); - Assertions.assertEquals("hheunmmqhgyx", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = new BillingMeterProperties().withCategory("xlwhzlsicoh") - .withMeterType("qnwvlrya") - .withDisplayName("hheunmmqhgyx"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("xlwhzlsicoh", model.category()); - Assertions.assertEquals("qnwvlrya", model.meterType()); - Assertions.assertEquals("hheunmmqhgyx", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java deleted file mode 100644 index ca547a5da703..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java +++ /dev/null @@ -1,36 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeter model = BinaryData.fromString( - "{\"id\":\"yhxdeoejzicwi\",\"name\":\"jttgzf\",\"type\":\"shcbkhajdeyeamdp\",\"location\":\"alpbuxwgipwhon\",\"properties\":{\"category\":\"gshwankixz\",\"meterType\":\"njeputtmrywn\",\"displayName\":\"oqftiyqzrnkcq\"}}") - .toObject(BillingMeter.class); - Assertions.assertEquals("alpbuxwgipwhon", model.location()); - Assertions.assertEquals("gshwankixz", model.properties().category()); - Assertions.assertEquals("njeputtmrywn", model.properties().meterType()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model = new BillingMeter().withLocation("alpbuxwgipwhon") - .withProperties(new BillingMeterProperties().withCategory("gshwankixz") - .withMeterType("njeputtmrywn") - .withDisplayName("oqftiyqzrnkcq")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("alpbuxwgipwhon", model.location()); - Assertions.assertEquals("gshwankixz", model.properties().category()); - Assertions.assertEquals("njeputtmrywn", model.properties().meterType()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java deleted file mode 100644 index d717b2f6c02b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -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 BillingMetersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"be\",\"name\":\"gis\",\"type\":\"wnykdidjchlrmpw\",\"location\":\"fldseacdhz\",\"properties\":{\"category\":\"brfgdrwji\",\"meterType\":\"whfjsrwqrxe\",\"displayName\":\"gcwvrrmdqntycna\"}},{\"id\":\"hvmaxgnuyeamcmhu\",\"name\":\"jecehokwc\",\"type\":\"twloesqr\",\"location\":\"rbnyrukoilacidu\",\"properties\":{\"category\":\"e\",\"meterType\":\"jlhwyxpzruzyt\",\"displayName\":\"kkwhbgxvellvulnx\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BillingMeterCollection response - = manager.billingMeters().getWithResponse("eboywhczzqrhm", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("fldseacdhz", response.value().get(0).location()); - Assertions.assertEquals("brfgdrwji", response.value().get(0).properties().category()); - Assertions.assertEquals("whfjsrwqrxe", response.value().get(0).properties().meterType()); - Assertions.assertEquals("gcwvrrmdqntycna", response.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java deleted file mode 100644 index 2a153852a41b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BlobStorageTokenStore; -import org.junit.jupiter.api.Assertions; - -public final class BlobStorageTokenStoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BlobStorageTokenStore model - = BinaryData.fromString("{\"sasUrlSettingName\":\"gtzxdpn\"}").toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("gtzxdpn", model.sasUrlSettingName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BlobStorageTokenStore model = new BlobStorageTokenStore().withSasUrlSettingName("gtzxdpn"); - model = BinaryData.fromObject(model).toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("gtzxdpn", model.sasUrlSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java deleted file mode 100644 index 8175c424fad9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java +++ /dev/null @@ -1,71 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuildConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildConfiguration model = BinaryData.fromString( - "{\"baseOs\":\"krvrns\",\"platform\":\"hqjohxcrsbfova\",\"platformVersion\":\"ruvw\",\"environmentVariables\":[{\"name\":\"qfsubcgjbirx\",\"value\":\"pybsrfbjfdtw\"},{\"name\":\"sotftpvj\",\"value\":\"bexilzznfqqnv\"},{\"name\":\"pmqtaru\",\"value\":\"ujmkcjhwqy\"},{\"name\":\"jrybnwjewgdrjer\",\"value\":\"naenqpehindo\"}],\"preBuildSteps\":[{\"description\":\"fthnzdn\",\"scripts\":[\"gnayqigynduh\"],\"httpGet\":{\"url\":\"hqlkthumaqo\",\"fileName\":\"gycdu\",\"headers\":[\"tgccymvaolpss\"]}},{\"description\":\"lfmmdnbbglzpswi\",\"scripts\":[\"cwyhzdxssa\",\"bzmnvdfznud\",\"od\",\"xzb\"],\"httpGet\":{\"url\":\"blylpstdbh\",\"fileName\":\"srzdzucerscdn\",\"headers\":[\"vfiwjmygtdss\",\"s\",\"tmweriofzpyq\"]}},{\"description\":\"mwabnetshhszhedp\",\"scripts\":[\"iwubmwmbesldnk\",\"wtppjflcxogaoko\"],\"httpGet\":{\"url\":\"m\",\"fileName\":\"ikvmkqzeqqk\",\"headers\":[\"fzxmhhvhgureodkw\"]}}]}") - .toObject(BuildConfiguration.class); - Assertions.assertEquals("krvrns", model.baseOs()); - Assertions.assertEquals("hqjohxcrsbfova", model.platform()); - Assertions.assertEquals("ruvw", model.platformVersion()); - Assertions.assertEquals("qfsubcgjbirx", model.environmentVariables().get(0).name()); - Assertions.assertEquals("pybsrfbjfdtw", model.environmentVariables().get(0).value()); - Assertions.assertEquals("fthnzdn", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("gnayqigynduh", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("hqlkthumaqo", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("gycdu", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("tgccymvaolpss", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildConfiguration model = new BuildConfiguration().withBaseOs("krvrns") - .withPlatform("hqjohxcrsbfova") - .withPlatformVersion("ruvw") - .withEnvironmentVariables( - Arrays.asList(new EnvironmentVariable().withName("qfsubcgjbirx").withValue("pybsrfbjfdtw"), - new EnvironmentVariable().withName("sotftpvj").withValue("bexilzznfqqnv"), - new EnvironmentVariable().withName("pmqtaru").withValue("ujmkcjhwqy"), - new EnvironmentVariable().withName("jrybnwjewgdrjer").withValue("naenqpehindo"))) - .withPreBuildSteps(Arrays.asList( - new PreBuildStep().withDescription("fthnzdn") - .withScripts(Arrays.asList("gnayqigynduh")) - .withHttpGet(new HttpGet().withUrl("hqlkthumaqo") - .withFileName("gycdu") - .withHeaders(Arrays.asList("tgccymvaolpss"))), - new PreBuildStep().withDescription("lfmmdnbbglzpswi") - .withScripts(Arrays.asList("cwyhzdxssa", "bzmnvdfznud", "od", "xzb")) - .withHttpGet(new HttpGet().withUrl("blylpstdbh") - .withFileName("srzdzucerscdn") - .withHeaders(Arrays.asList("vfiwjmygtdss", "s", "tmweriofzpyq"))), - new PreBuildStep().withDescription("mwabnetshhszhedp") - .withScripts(Arrays.asList("iwubmwmbesldnk", "wtppjflcxogaoko")) - .withHttpGet(new HttpGet().withUrl("m") - .withFileName("ikvmkqzeqqk") - .withHeaders(Arrays.asList("fzxmhhvhgureodkw"))))); - model = BinaryData.fromObject(model).toObject(BuildConfiguration.class); - Assertions.assertEquals("krvrns", model.baseOs()); - Assertions.assertEquals("hqjohxcrsbfova", model.platform()); - Assertions.assertEquals("ruvw", model.platformVersion()); - Assertions.assertEquals("qfsubcgjbirx", model.environmentVariables().get(0).name()); - Assertions.assertEquals("pybsrfbjfdtw", model.environmentVariables().get(0).value()); - Assertions.assertEquals("fthnzdn", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("gnayqigynduh", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("hqlkthumaqo", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("gycdu", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("tgccymvaolpss", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java deleted file mode 100644 index 9207783c5a36..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java +++ /dev/null @@ -1,87 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderCollection; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"cukoklyaxuconu\",\"containerRegistries\":[{\"containerRegistryServer\":\"fkbey\",\"identityResourceId\":\"ewrmjmwvvjektc\"}]},\"identity\":{\"principalId\":\"b502ae21-f589-4fa0-a7ba-00ae0449adc1\",\"tenantId\":\"f2a103f0-b442-484b-a6e3-d0b70eabeeea\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ffrzpwvlqdqgbiqy\":{\"principalId\":\"99322b52-b2f5-472e-b94e-7aba4c2b7596\",\"clientId\":\"64929267-ab5e-41c2-84a0-16f27737d69a\"}}},\"location\":\"hkaetcktvfc\",\"tags\":{\"jf\":\"snkymuctq\",\"fuwutttxf\":\"ebrjcxe\",\"hfnljkyq\":\"jrbirphxepcyv\"},\"id\":\"j\",\"name\":\"uujqgidokgjljyo\",\"type\":\"gvcl\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"ncghkje\",\"containerRegistries\":[{\"containerRegistryServer\":\"hbijhtxfvgxb\",\"identityResourceId\":\"smx\"},{\"containerRegistryServer\":\"eh\",\"identityResourceId\":\"pvecxgodeb\"},{\"containerRegistryServer\":\"qkkrb\",\"identityResourceId\":\"pukgriwflzlfb\"}]},\"identity\":{\"principalId\":\"f8d71d1d-c123-4c06-b5b0-4a2c6c063865\",\"tenantId\":\"dc9135c6-0982-4390-97db-74dbd091bc85\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pnq\":{\"principalId\":\"d2909f3b-343a-4172-893e-8c6ceaaa9759\",\"clientId\":\"5d679b82-70fd-4f62-9b14-b6aede729213\"},\"mgkbrpyydhibn\":{\"principalId\":\"11873bb2-b0a4-40ec-9604-c0687d42610b\",\"clientId\":\"2171c563-d1fa-4ee8-9bed-4ec971ba4fbf\"},\"kpikadrgvt\":{\"principalId\":\"4ec29524-beca-4dad-9b3f-6ca45829aec8\",\"clientId\":\"22f5410d-e367-444b-865b-44e3344602d7\"},\"n\":{\"principalId\":\"89e804e7-9156-4621-bf2f-ea15b6df8bd5\",\"clientId\":\"681a5331-9f9e-4614-937e-4615869b14dd\"}}},\"location\":\"ynhijggme\",\"tags\":{\"zmhjrunmp\":\"iarbutrcvpna\",\"nkxmyskpbhenbtk\":\"ttdbhrbnl\",\"yxczfclh\":\"xywnytnrsynlqidy\"},\"id\":\"axdbabph\",\"name\":\"wrqlfktsthsuco\",\"type\":\"mnyyazt\"}],\"nextLink\":\"twwrqp\"}") - .toObject(BuilderCollection.class); - Assertions.assertEquals("hkaetcktvfc", model.value().get(0).location()); - Assertions.assertEquals("snkymuctq", model.value().get(0).tags().get("jf")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("cukoklyaxuconu", model.value().get(0).environmentId()); - Assertions.assertEquals("fkbey", model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ewrmjmwvvjektc", - model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("twwrqp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderCollection model - = new BuilderCollection() - .withValue(Arrays.asList( - new BuilderResourceInner().withLocation("hkaetcktvfc") - .withTags(mapOf("jf", "snkymuctq", "fuwutttxf", "ebrjcxe", "hfnljkyq", "jrbirphxepcyv")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ffrzpwvlqdqgbiqy", new UserAssignedIdentity()))) - .withEnvironmentId("cukoklyaxuconu") - .withContainerRegistries( - Arrays.asList(new ContainerRegistry().withContainerRegistryServer("fkbey") - .withIdentityResourceId("ewrmjmwvvjektc"))), - new BuilderResourceInner().withLocation("ynhijggme") - .withTags(mapOf("zmhjrunmp", "iarbutrcvpna", "nkxmyskpbhenbtk", "ttdbhrbnl", "yxczfclh", - "xywnytnrsynlqidy")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("pnq", new UserAssignedIdentity(), "mgkbrpyydhibn", - new UserAssignedIdentity(), "kpikadrgvt", new UserAssignedIdentity(), "n", - new UserAssignedIdentity()))) - .withEnvironmentId("ncghkje") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("hbijhtxfvgxb") - .withIdentityResourceId("smx"), - new ContainerRegistry().withContainerRegistryServer("eh") - .withIdentityResourceId("pvecxgodeb"), - new ContainerRegistry().withContainerRegistryServer("qkkrb") - .withIdentityResourceId("pukgriwflzlfb"))))) - .withNextLink("twwrqp"); - model = BinaryData.fromObject(model).toObject(BuilderCollection.class); - Assertions.assertEquals("hkaetcktvfc", model.value().get(0).location()); - Assertions.assertEquals("snkymuctq", model.value().get(0).tags().get("jf")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("cukoklyaxuconu", model.value().get(0).environmentId()); - Assertions.assertEquals("fkbey", model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ewrmjmwvvjektc", - model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("twwrqp", 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java deleted file mode 100644 index 1aad5781596c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderProperties; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuilderPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Updating\",\"environmentId\":\"lxotogtwrupq\",\"containerRegistries\":[{\"containerRegistryServer\":\"nmic\",\"identityResourceId\":\"kvceoveilovnotyf\"}]}") - .toObject(BuilderProperties.class); - Assertions.assertEquals("lxotogtwrupq", model.environmentId()); - Assertions.assertEquals("nmic", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("kvceoveilovnotyf", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderProperties model = new BuilderProperties().withEnvironmentId("lxotogtwrupq") - .withContainerRegistries(Arrays.asList(new ContainerRegistry().withContainerRegistryServer("nmic") - .withIdentityResourceId("kvceoveilovnotyf"))); - model = BinaryData.fromObject(model).toObject(BuilderProperties.class); - Assertions.assertEquals("lxotogtwrupq", model.environmentId()); - Assertions.assertEquals("nmic", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("kvceoveilovnotyf", model.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java deleted file mode 100644 index bafd3958d069..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java +++ /dev/null @@ -1,68 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"kzywbiex\",\"containerRegistries\":[{\"containerRegistryServer\":\"yueaxibxujwb\",\"identityResourceId\":\"qwalmuzyoxaepd\"},{\"containerRegistryServer\":\"zjancuxr\",\"identityResourceId\":\"d\"},{\"containerRegistryServer\":\"bavxbniwdjswzt\",\"identityResourceId\":\"dbpgnxytxhp\"},{\"containerRegistryServer\":\"xbzpfzab\",\"identityResourceId\":\"lcuhxwtctyqiklb\"}]},\"identity\":{\"principalId\":\"11ce5dd3-3355-4e01-85d7-15a3c0b48a12\",\"tenantId\":\"1e44fa63-3b4a-4982-a729-ace3958efcd9\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vgyuguos\":{\"principalId\":\"0839b9ff-81ac-4ede-8dee-f067587ffa69\",\"clientId\":\"fc6edf30-08b3-46ab-8b85-bd6c0c615cd2\"},\"fssxqukkfplg\":{\"principalId\":\"eac29657-46e0-4b6a-a431-86ef2bea7454\",\"clientId\":\"622149a9-aab8-48a8-b91c-2a89f293d4fb\"},\"xnkjzkdesl\":{\"principalId\":\"7d34e1be-1f20-4fee-b691-c14f4c4bfeff\",\"clientId\":\"381584d8-2454-49e3-849e-8ed084a14f8d\"}}},\"location\":\"lopwiyig\",\"tags\":{\"upedeojnabckhs\":\"kdwzbaiuebbaumny\",\"ie\":\"txp\"},\"id\":\"tfhvpesapskrdqmh\",\"name\":\"jdhtldwkyzxu\",\"type\":\"tkncwsc\"}") - .toObject(BuilderResourceInner.class); - Assertions.assertEquals("lopwiyig", model.location()); - Assertions.assertEquals("kdwzbaiuebbaumny", model.tags().get("upedeojnabckhs")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("kzywbiex", model.environmentId()); - Assertions.assertEquals("yueaxibxujwb", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("qwalmuzyoxaepd", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceInner model = new BuilderResourceInner().withLocation("lopwiyig") - .withTags(mapOf("upedeojnabckhs", "kdwzbaiuebbaumny", "ie", "txp")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("vgyuguos", new UserAssignedIdentity(), "fssxqukkfplg", - new UserAssignedIdentity(), "xnkjzkdesl", new UserAssignedIdentity()))) - .withEnvironmentId("kzywbiex") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("yueaxibxujwb") - .withIdentityResourceId("qwalmuzyoxaepd"), - new ContainerRegistry().withContainerRegistryServer("zjancuxr").withIdentityResourceId("d"), - new ContainerRegistry().withContainerRegistryServer("bavxbniwdjswzt") - .withIdentityResourceId("dbpgnxytxhp"), - new ContainerRegistry().withContainerRegistryServer("xbzpfzab") - .withIdentityResourceId("lcuhxwtctyqiklb"))); - model = BinaryData.fromObject(model).toObject(BuilderResourceInner.class); - Assertions.assertEquals("lopwiyig", model.location()); - Assertions.assertEquals("kdwzbaiuebbaumny", model.tags().get("upedeojnabckhs")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("kzywbiex", model.environmentId()); - Assertions.assertEquals("yueaxibxujwb", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("qwalmuzyoxaepd", model.containerRegistries().get(0).identityResourceId()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java deleted file mode 100644 index 7410f4e047e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdateProperties model = BinaryData.fromString("{\"environmentId\":\"suyonobglaocq\"}") - .toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("suyonobglaocq", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdateProperties model - = new BuilderResourceUpdateProperties().withEnvironmentId("suyonobglaocq"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("suyonobglaocq", model.environmentId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java deleted file mode 100644 index e29086d35f2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java +++ /dev/null @@ -1,52 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"b4104829-5349-4778-88a0-75a1d17d0f27\",\"tenantId\":\"c7c8ed8f-6676-43e1-946b-eba852da6263\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"hoxus\":{\"principalId\":\"5c89f141-3aad-45b9-b682-eda412c10ec9\",\"clientId\":\"9b79cffa-f8c2-41d0-af24-09054047b57c\"},\"abgy\":{\"principalId\":\"eca30c6f-90e0-4c72-ab6b-abf0d0b9e132\",\"clientId\":\"91424844-23c7-479e-a878-f29a05571ed5\"}}},\"tags\":{\"ef\":\"bjtazqugxywpmu\"},\"properties\":{\"environmentId\":\"fqkquj\"}}") - .toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bjtazqugxywpmu", model.tags().get("ef")); - Assertions.assertEquals("fqkquj", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdate model = new BuilderResourceUpdate() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("hoxus", new UserAssignedIdentity(), "abgy", new UserAssignedIdentity()))) - .withTags(mapOf("ef", "bjtazqugxywpmu")) - .withEnvironmentId("fqkquj"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("bjtazqugxywpmu", model.tags().get("ef")); - Assertions.assertEquals("fqkquj", model.environmentId()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java deleted file mode 100644 index f2d2580e27c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,71 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BuildersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"bffljfiimreoag\",\"containerRegistries\":[{\"containerRegistryServer\":\"aadusrexxfa\",\"identityResourceId\":\"sqwudohzilfmnli\"},{\"containerRegistryServer\":\"psimsf\",\"identityResourceId\":\"ypofqpmbhyqgs\"}]},\"identity\":{\"principalId\":\"dbeb826f-5966-47e8-a0ea-9ce1156e63cf\",\"tenantId\":\"afbc9f5c-7a57-43c7-aab5-b8a782238c6d\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"phgerhsmvgoh\":{\"principalId\":\"3bcc308f-00e3-40eb-8f8e-98e89cc157cf\",\"clientId\":\"5dd3f164-da66-46c2-bffc-e1c034fa15f8\"},\"mqilrixysfnimsqy\":{\"principalId\":\"8ede5bf3-3767-4ed2-a7a1-c4b20bc12dbb\",\"clientId\":\"ee130c3f-aa00-4094-abd1-4df2dc549960\"}}},\"location\":\"wmhkruwaedrympml\",\"tags\":{\"ewihapfji\":\"nhzd\"},\"id\":\"knjdiqfliejhp\",\"name\":\"lbiedfsbw\",\"type\":\"eivbvz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BuilderResource response = manager.builders() - .define("llpquevhamfo") - .withRegion("msfe") - .withExistingResourceGroup("xlaj") - .withTags(mapOf("dagrhrdicxdw", "ihpq", "vcxjsgbipcukdvek", "jfowxwy", "scrdp", "buhoduchv")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("sztekxby", new UserAssignedIdentity()))) - .withEnvironmentId("tmk") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("pkzwa").withIdentityResourceId("xofqovchi"))) - .create(); - - Assertions.assertEquals("wmhkruwaedrympml", response.location()); - Assertions.assertEquals("nhzd", response.tags().get("ewihapfji")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("bffljfiimreoag", response.environmentId()); - Assertions.assertEquals("aadusrexxfa", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("sqwudohzilfmnli", response.containerRegistries().get(0).identityResourceId()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index cb2addf56ce1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,45 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"environmentId\":\"fkmkrokz\",\"containerRegistries\":[{\"containerRegistryServer\":\"qetwpqrtvaozn\",\"identityResourceId\":\"ni\"}]},\"identity\":{\"principalId\":\"ba6e51e4-1ee4-4d69-a120-9a42ea39d20a\",\"tenantId\":\"8d6d8289-77c8-4de7-a16a-e474749730b2\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"eituugedhfpjs\":{\"principalId\":\"4d427c5b-8daa-4f9a-8d35-9f6281dd12b9\",\"clientId\":\"180ae505-e3b6-4262-a17f-ed8d26ef472e\"},\"mbl\":{\"principalId\":\"939cb210-b1d7-4bb0-a3d2-aeff21f61c14\",\"clientId\":\"7bc239a6-8301-4ce6-83fe-6c20a25c91e5\"},\"deolctaebfs\":{\"principalId\":\"6e994a96-436b-4e8f-9b1b-6e92e3358bce\",\"clientId\":\"a6fe1d89-d8e6-4bc8-9af1-a803ee589397\"},\"edjc\":{\"principalId\":\"6a9bb5ea-c9d8-4143-92dc-6c0177bb2466\",\"clientId\":\"80878c0f-d388-4d56-a8ff-f71cb5db3025\"}}},\"location\":\"tb\",\"tags\":{\"vsgeafgf\":\"igdx\",\"kkwa\":\"sehxlzsxezp\"},\"id\":\"es\",\"name\":\"yfjlpzeqto\",\"type\":\"rpl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BuilderResource response = manager.builders() - .getByResourceGroupWithResponse("wp", "gmfalkzazmgoked", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tb", response.location()); - Assertions.assertEquals("igdx", response.tags().get("vsgeafgf")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("fkmkrokz", response.environmentId()); - Assertions.assertEquals("qetwpqrtvaozn", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ni", response.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java deleted file mode 100644 index 89a207816814..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java +++ /dev/null @@ -1,47 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"umljcirvpef\",\"containerRegistries\":[{\"containerRegistryServer\":\"veitit\",\"identityResourceId\":\"nsxzajlns\"}]},\"identity\":{\"principalId\":\"82ee0be0-090e-4ccc-818f-81f37399dca8\",\"tenantId\":\"e06e5929-004b-4bc5-85f0-b7255f9c8376\",\"type\":\"None\",\"userAssignedIdentities\":{\"xqvmvuay\":{\"principalId\":\"ebdb161f-384c-40a8-8c97-1ade775ffd9c\",\"clientId\":\"28b5e898-e0fa-4cc9-9d87-8d3f196899ba\"},\"dxk\":{\"principalId\":\"829c9a90-8bc7-479a-899e-a6db4e80e245\",\"clientId\":\"f2bc9f76-b941-4611-9c17-3c102575ee8b\"}}},\"location\":\"qbwpntghyk\",\"tags\":{\"vlzladl\":\"cdrnxsl\",\"pbqhvfdqqjwkr\":\"x\",\"atuztjct\":\"wzdanojisgglmvo\",\"wakwseivmakxhys\":\"bpvbkaehxsmzygd\"},\"id\":\"wljuxlkbectvt\",\"name\":\"j\",\"type\":\"skdchmaiubavl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.builders().listByResourceGroup("ipowza", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qbwpntghyk", response.iterator().next().location()); - Assertions.assertEquals("cdrnxsl", response.iterator().next().tags().get("vlzladl")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("umljcirvpef", response.iterator().next().environmentId()); - Assertions.assertEquals("veitit", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("nsxzajlns", - response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java deleted file mode 100644 index 908c8ec4cec3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java +++ /dev/null @@ -1,47 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"tmujdtvmc\",\"containerRegistries\":[{\"containerRegistryServer\":\"mffhmjpddnyxfzuv\",\"identityResourceId\":\"zmzqmzjqrb\"},{\"containerRegistryServer\":\"pv\",\"identityResourceId\":\"mdyfoebojtj\"},{\"containerRegistryServer\":\"pglaoh\",\"identityResourceId\":\"qk\"},{\"containerRegistryServer\":\"jtnqjil\",\"identityResourceId\":\"ywkdcwmqsy\"}]},\"identity\":{\"principalId\":\"a6c4dba2-7077-46c7-a447-22dfdb374749\",\"tenantId\":\"f2b99858-5986-4633-b851-3c9ec92b6cc5\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"olfylnkk\":{\"principalId\":\"596b75fa-9014-4fc6-b75a-6c5e936eb1c0\",\"clientId\":\"7a73b4fb-49aa-4b27-abd6-d00f8c1657ad\"},\"jvlywl\":{\"principalId\":\"6ad6ea75-0980-4e32-b8a3-b2f780cad67a\",\"clientId\":\"ce40fed6-f1e0-4839-9b38-d55f4e1a1d12\"},\"wob\":{\"principalId\":\"1c971f5b-1ac9-4c6e-a61c-463113d7fb8b\",\"clientId\":\"2c199dfe-7ccd-4b28-9911-babc45923327\"}}},\"location\":\"whlwy\",\"tags\":{\"zgczeu\":\"qzocr\",\"iekoif\":\"tgxdncaqt\",\"gyrihlgm\":\"vnyttzgi\"},\"id\":\"behlqtxnr\",\"name\":\"lkndrndpgfjodh\",\"type\":\"aqotwfhipxwgsabv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.builders().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("whlwy", response.iterator().next().location()); - Assertions.assertEquals("qzocr", response.iterator().next().tags().get("zgczeu")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("tmujdtvmc", response.iterator().next().environmentId()); - Assertions.assertEquals("mffhmjpddnyxfzuv", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("zmzqmzjqrb", - response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java deleted file mode 100644 index ae06599597a7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java +++ /dev/null @@ -1,41 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificatePatch model = BinaryData - .fromString("{\"tags\":{\"hykojoxafnndlpic\":\"btkuwhh\",\"h\":\"koymkcd\",\"reqnovvqfov\":\"pkkpw\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("btkuwhh", model.tags().get("hykojoxafnndlpic")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = new CertificatePatch() - .withTags(mapOf("hykojoxafnndlpic", "btkuwhh", "h", "koymkcd", "reqnovvqfov", "pkkpw")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("btkuwhh", model.tags().get("hykojoxafnndlpic")); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index c753e51e63f9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.certificates() - .deleteWithResponse("gyqvpbfjpoqzuc", "zluczdq", "urbormvh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 84965423a916..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"dqrhzoymib\",\"type\":\"qyib\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("dqrhzoymib", model.name()); - Assertions.assertEquals("qyib", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("dqrhzoymib").withType("qyib"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("dqrhzoymib", model.name()); - Assertions.assertEquals("qyib", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 01966c42400f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model = BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"szdtmhrkwof\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("szdtmhrkwof", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = new CheckNameAvailabilityResponseInner().withNameAvailable(false) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("szdtmhrkwof"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("szdtmhrkwof", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java deleted file mode 100644 index bc782075a14c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import org.junit.jupiter.api.Assertions; - -public final class CircuitBreakerPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CircuitBreakerPolicy model = BinaryData - .fromString( - "{\"consecutiveErrors\":1722437661,\"intervalInSeconds\":1946289710,\"maxEjectionPercent\":158340850}") - .toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CircuitBreakerPolicy model = new CircuitBreakerPolicy().withConsecutiveErrors(1722437661) - .withIntervalInSeconds(1946289710) - .withMaxEjectionPercent(158340850); - model = BinaryData.fromObject(model).toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index f8733d4fc9e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironmentsCertificates() - .deleteWithResponse("ftksd", "gdnk", "fgmwd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 8e0eae441a5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -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 ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"jxlehzlx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = manager.connectedEnvironments() - .checkNameAvailabilityWithResponse("hpqatiwkkvyanxk", "vcsemsvuvdj", - new CheckNameAvailabilityRequest().withName("xetqmm").withType("vrjjxnw"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("jxlehzlx", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index 4fa6e43b8c9b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironmentsDaprComponents() - .deleteWithResponse("nwpiwxeiicrm", "e", "kldmaxxijv", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index a712f1e0a4bc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"oqar\",\"value\":\"yxqicladv\"},{\"name\":\"davuqmcbyms\",\"value\":\"bjlquv\"},{\"name\":\"zcjumvpsimioyoig\",\"value\":\"miqwnnrac\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = manager.connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("kwsdgkj", "yacwrasekwefc", "o", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 14512788ddea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironments().delete("wsxnsrqor", "genmvceb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index ea94c52d4cc7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironmentsStorages() - .deleteWithResponse("n", "pgb", "offbkkwvdxaexqok", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java deleted file mode 100644 index ee7a881e8575..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java +++ /dev/null @@ -1,83 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.ReplicaExecutionStatus; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppJobExecutionsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppJobExecutionsInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"mt\",\"id\":\"iwenazero\",\"type\":\"rs\",\"properties\":{\"status\":\"Succeeded\",\"startTime\":\"2020-12-24T05:18:03Z\",\"endTime\":\"2021-09-29T20:04:11Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{},{}]},\"detailedStatus\":{\"replicas\":[{},{}]}}},{\"name\":\"cve\",\"id\":\"mzhhkuuipldqqc\",\"type\":\"kva\",\"properties\":{\"status\":\"Running\",\"startTime\":\"2021-01-01T12:19:53Z\",\"endTime\":\"2021-08-04T07:59:56Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{}]},\"detailedStatus\":{\"replicas\":[{}]}}},{\"name\":\"mxhzzysevus\",\"id\":\"vzrrryveimi\",\"type\":\"kdyzatvfuzk\",\"properties\":{\"status\":\"Unknown\",\"startTime\":\"2021-03-25T16:42:15Z\",\"endTime\":\"2021-09-01T14:42:15Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{}]},\"detailedStatus\":{\"replicas\":[{}]}}},{\"name\":\"qdsmjtg\",\"id\":\"gdgkki\",\"type\":\"plkcsm\",\"properties\":{\"status\":\"Running\",\"startTime\":\"2021-01-22T21:03:21Z\",\"endTime\":\"2021-01-01T04:41:03Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{}]},\"detailedStatus\":{\"replicas\":[{},{},{}]}}}],\"nextLink\":\"loyg\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("mt", model.value().get(0).name()); - Assertions.assertEquals("iwenazero", model.value().get(0).id()); - Assertions.assertEquals("rs", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T05:18:03Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T20:04:11Z"), model.value().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppJobExecutionsInner model = new ContainerAppJobExecutionsInner().withValue(Arrays.asList( - new JobExecutionInner().withName("mt") - .withId("iwenazero") - .withType("rs") - .withStartTime(OffsetDateTime.parse("2020-12-24T05:18:03Z")) - .withEndTime(OffsetDateTime.parse("2021-09-29T20:04:11Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus() - .withReplicas(Arrays.asList(new ReplicaExecutionStatus(), new ReplicaExecutionStatus()))), - new JobExecutionInner().withName("cve") - .withId("mzhhkuuipldqqc") - .withType("kva") - .withStartTime(OffsetDateTime.parse("2021-01-01T12:19:53Z")) - .withEndTime(OffsetDateTime.parse("2021-08-04T07:59:56Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList(new ReplicaExecutionStatus()))), - new JobExecutionInner().withName("mxhzzysevus") - .withId("vzrrryveimi") - .withType("kdyzatvfuzk") - .withStartTime(OffsetDateTime.parse("2021-03-25T16:42:15Z")) - .withEndTime(OffsetDateTime.parse("2021-09-01T14:42:15Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList(new ReplicaExecutionStatus()))), - new JobExecutionInner().withName("qdsmjtg") - .withId("gdgkki") - .withType("plkcsm") - .withStartTime(OffsetDateTime.parse("2021-01-22T21:03:21Z")) - .withEndTime(OffsetDateTime.parse("2021-01-01T04:41:03Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList(new ReplicaExecutionStatus(), - new ReplicaExecutionStatus(), new ReplicaExecutionStatus()))))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("mt", model.value().get(0).name()); - Assertions.assertEquals("iwenazero", model.value().get(0).id()); - Assertions.assertEquals("rs", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T05:18:03Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-29T20:04:11Z"), model.value().get(0).endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java deleted file mode 100644 index 360fd724fe38..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = BinaryData.fromString("{\"name\":\"zlwfffiakp\",\"value\":\"pqqmted\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("zlwfffiakp", model.name()); - Assertions.assertEquals("pqqmted", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = new ContainerAppProbeHttpGetHttpHeadersItem().withName("zlwfffiakp").withValue("pqqmted"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("zlwfffiakp", model.name()); - Assertions.assertEquals("pqqmted", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java deleted file mode 100644 index 616d90b5b19b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java +++ /dev/null @@ -1,45 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGet model = BinaryData.fromString( - "{\"host\":\"qkagfhsxt\",\"httpHeaders\":[{\"name\":\"gzxnfaazpxdtnk\",\"value\":\"mkqjj\"},{\"name\":\"wuenvr\",\"value\":\"pyouaibrebqaays\"}],\"path\":\"ixqtn\",\"port\":1555595528,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("qkagfhsxt", model.host()); - Assertions.assertEquals("gzxnfaazpxdtnk", model.httpHeaders().get(0).name()); - Assertions.assertEquals("mkqjj", model.httpHeaders().get(0).value()); - Assertions.assertEquals("ixqtn", model.path()); - Assertions.assertEquals(1555595528, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model = new ContainerAppProbeHttpGet().withHost("qkagfhsxt") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("gzxnfaazpxdtnk").withValue("mkqjj"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("wuenvr").withValue("pyouaibrebqaays"))) - .withPath("ixqtn") - .withPort(1555595528) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("qkagfhsxt", model.host()); - Assertions.assertEquals("gzxnfaazpxdtnk", model.httpHeaders().get(0).name()); - Assertions.assertEquals("mkqjj", model.httpHeaders().get(0).value()); - Assertions.assertEquals("ixqtn", model.path()); - Assertions.assertEquals(1555595528, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java deleted file mode 100644 index dd4e94e4c427..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTcpSocketTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeTcpSocket model = BinaryData.fromString("{\"host\":\"mmji\",\"port\":1755412090}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mmji", model.host()); - Assertions.assertEquals(1755412090, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model = new ContainerAppProbeTcpSocket().withHost("mmji").withPort(1755412090); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mmji", model.host()); - Assertions.assertEquals(1755412090, model.port()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java deleted file mode 100644 index 787c58fb6e91..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,74 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbe model = BinaryData.fromString( - "{\"failureThreshold\":884290238,\"httpGet\":{\"host\":\"mcwaekrrjr\",\"httpHeaders\":[{\"name\":\"xt\",\"value\":\"gumhjglikkxws\"},{\"name\":\"olbq\",\"value\":\"vuzlm\"}],\"path\":\"elfk\",\"port\":2091794134,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":556961865,\"periodSeconds\":763625934,\"successThreshold\":1477595722,\"tcpSocket\":{\"host\":\"noigbrnjwmwk\",\"port\":1312335759},\"terminationGracePeriodSeconds\":2791971078148352021,\"timeoutSeconds\":1740415327,\"type\":\"Readiness\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(884290238, model.failureThreshold()); - Assertions.assertEquals("mcwaekrrjr", model.httpGet().host()); - Assertions.assertEquals("xt", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("gumhjglikkxws", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("elfk", model.httpGet().path()); - Assertions.assertEquals(2091794134, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(556961865, model.initialDelaySeconds()); - Assertions.assertEquals(763625934, model.periodSeconds()); - Assertions.assertEquals(1477595722, model.successThreshold()); - Assertions.assertEquals("noigbrnjwmwk", model.tcpSocket().host()); - Assertions.assertEquals(1312335759, model.tcpSocket().port()); - Assertions.assertEquals(2791971078148352021L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(1740415327, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = new ContainerAppProbe().withFailureThreshold(884290238) - .withHttpGet(new ContainerAppProbeHttpGet().withHost("mcwaekrrjr") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("xt").withValue("gumhjglikkxws"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("olbq").withValue("vuzlm"))) - .withPath("elfk") - .withPort(2091794134) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(556961865) - .withPeriodSeconds(763625934) - .withSuccessThreshold(1477595722) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("noigbrnjwmwk").withPort(1312335759)) - .withTerminationGracePeriodSeconds(2791971078148352021L) - .withTimeoutSeconds(1740415327) - .withType(Type.READINESS); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(884290238, model.failureThreshold()); - Assertions.assertEquals("mcwaekrrjr", model.httpGet().host()); - Assertions.assertEquals("xt", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("gumhjglikkxws", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("elfk", model.httpGet().path()); - Assertions.assertEquals(2091794134, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(556961865, model.initialDelaySeconds()); - Assertions.assertEquals(763625934, model.periodSeconds()); - Assertions.assertEquals(1477595722, model.successThreshold()); - Assertions.assertEquals("noigbrnjwmwk", model.tcpSocket().host()); - Assertions.assertEquals(1312335759, model.tcpSocket().port()); - Assertions.assertEquals(2791971078148352021L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(1740415327, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesPatchingConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesPatchingConfigurationTests.java deleted file mode 100644 index cd8986918d3a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesPatchingConfigurationTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; -import com.azure.resourcemanager.appcontainers.models.PatchingMode; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppPropertiesPatchingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppPropertiesPatchingConfiguration model = BinaryData.fromString("{\"patchingMode\":\"Automatic\"}") - .toObject(ContainerAppPropertiesPatchingConfiguration.class); - Assertions.assertEquals(PatchingMode.AUTOMATIC, model.patchingMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppPropertiesPatchingConfiguration model - = new ContainerAppPropertiesPatchingConfiguration().withPatchingMode(PatchingMode.AUTOMATIC); - model = BinaryData.fromObject(model).toObject(ContainerAppPropertiesPatchingConfiguration.class); - Assertions.assertEquals(PatchingMode.AUTOMATIC, model.patchingMode()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java deleted file mode 100644 index 1948b239a7f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsAuthConfigs() - .deleteWithResponse("vidmytzl", "glxpnovyoanfbcsw", "agyw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildCollectionTests.java deleted file mode 100644 index a0559076850b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildCollectionTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppsBuildCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"xcv\",\"image\":\"rhnj\"},\"configuration\":{\"baseOs\":\"lvtno\",\"platform\":\"fzg\",\"platformVersion\":\"jdftuljltd\",\"environmentVariables\":[{\"name\":\"amtmcz\",\"value\":\"o\"},{\"name\":\"ejwcwwqiok\",\"value\":\"ssxmojms\"}],\"preBuildSteps\":[{},{}]},\"logStreamEndpoint\":\"prvkwcfzqljyxgtc\"},\"id\":\"eydbsd\",\"name\":\"hmkxmaehvbb\",\"type\":\"uripltfnhtba\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"buildStatus\":\"Canceled\",\"destinationContainerRegistry\":{\"server\":\"ckpyklyhplu\",\"image\":\"pvruudlg\"},\"configuration\":{\"baseOs\":\"thost\",\"platform\":\"tstvdxeclzedq\",\"platformVersion\":\"vh\",\"environmentVariables\":[{\"name\":\"plodqkdlwwqfbu\",\"value\":\"lkxt\"}],\"preBuildSteps\":[{},{},{},{}]},\"logStreamEndpoint\":\"smlmbtxhwgfwsrta\"},\"id\":\"oezbrhubsk\",\"name\":\"udygooo\",\"type\":\"kqfqjbvl\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"iqtqzfavyvnq\",\"image\":\"bar\"},\"configuration\":{\"baseOs\":\"ayjkqa\",\"platform\":\"gzslesjcbhernnti\",\"platformVersion\":\"djc\",\"environmentVariables\":[{\"name\":\"uwrbehwagoh\",\"value\":\"uffkmrqemvvh\"},{\"name\":\"xtdr\",\"value\":\"futacoebjvewzc\"},{\"name\":\"znmwcp\",\"value\":\"guaadraufactkahz\"}],\"preBuildSteps\":[{},{},{},{}]},\"logStreamEndpoint\":\"j\"},\"id\":\"uxxpshne\",\"name\":\"kulfg\",\"type\":\"lqubkwdlen\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"bazpjuohmi\",\"image\":\"flnorwmduvwp\"},\"configuration\":{\"baseOs\":\"xwmygdxpgpqc\",\"platform\":\"sze\",\"platformVersion\":\"nb\",\"environmentVariables\":[{\"name\":\"xgibbda\",\"value\":\"confozauors\"},{\"name\":\"kokwbqplhlvnu\",\"value\":\"epzl\"}],\"preBuildSteps\":[{}]},\"logStreamEndpoint\":\"zsoldwey\"},\"id\":\"dunvmnnrwrbiorkt\",\"name\":\"lywjhh\",\"type\":\"dnhxmsi\"}],\"nextLink\":\"omi\"}") - .toObject(ContainerAppsBuildCollection.class); - Assertions.assertEquals("omi", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildCollection model = new ContainerAppsBuildCollection() - .withValue(Arrays.asList(new ContainerAppsBuildResourceInner(), new ContainerAppsBuildResourceInner(), - new ContainerAppsBuildResourceInner(), new ContainerAppsBuildResourceInner())) - .withNextLink("omi"); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildCollection.class); - Assertions.assertEquals("omi", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.java deleted file mode 100644 index 75dbd97dee39..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; - -public final class ContainerAppsBuildConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildConfiguration model = BinaryData.fromString( - "{\"baseOs\":\"qyikvy\",\"platform\":\"uyav\",\"platformVersion\":\"wmn\",\"environmentVariables\":[{\"name\":\"tijfybvp\",\"value\":\"ekrsgs\"},{\"name\":\"b\",\"value\":\"huzqgn\"},{\"name\":\"dgkynscliqhzvhxn\",\"value\":\"omtkub\"},{\"name\":\"tppn\",\"value\":\"dxzxhi\"}],\"preBuildSteps\":[{\"description\":\"b\",\"scripts\":[\"qagt\",\"tdhlfkqo\",\"py\"],\"httpGet\":{\"url\":\"gtrd\",\"fileName\":\"ifmzzsd\",\"headers\":[\"rnysux\"]}},{\"description\":\"rafwgckhocxvdf\",\"scripts\":[\"afqr\",\"udaspavehh\"],\"httpGet\":{\"url\":\"kbunzoz\",\"fileName\":\"hcxgkmoyx\",\"headers\":[\"uibhmfdnbzydvfv\",\"cjnaeoisrvhmgor\"]}}]}") - .toObject(ContainerAppsBuildConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildConfiguration model = new ContainerAppsBuildConfiguration(); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.java deleted file mode 100644 index 2c8b1be30ae8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildProperties; - -public final class ContainerAppsBuildPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"wsmystuluqypf\",\"image\":\"lerchpq\"},\"configuration\":{\"baseOs\":\"pjbabwidfc\",\"platform\":\"spuunnoxyhkxgq\",\"platformVersion\":\"rihpfhoq\",\"environmentVariables\":[{\"name\":\"ewda\",\"value\":\"mdjvlpj\"}],\"preBuildSteps\":[{\"description\":\"brm\",\"scripts\":[\"ivsiy\",\"zkdnc\",\"dxonbzoggculap\"],\"httpGet\":{\"url\":\"y\",\"fileName\":\"gogtqxepnylbf\",\"headers\":[\"lyjt\",\"vofqzhvfc\",\"byfmowuxr\"]}},{\"description\":\"pvdwxf\",\"scripts\":[\"ivwzjbhyzs\",\"jrkambtrnegvmnv\",\"q\",\"qvldspastjbkkd\"],\"httpGet\":{\"url\":\"lves\",\"fileName\":\"jlxr\",\"headers\":[\"ozapeew\",\"hpxlktwkuziycs\",\"evufuztck\",\"yhjtqedcgzu\"]}},{\"description\":\"mmrqz\",\"scripts\":[\"jvpglydzgk\",\"vqeevtoep\",\"yutnwytpzdmov\",\"vf\"],\"httpGet\":{\"url\":\"awzqadfl\",\"fileName\":\"ur\",\"headers\":[\"aecxndtic\",\"kpvzmlq\",\"mldgxobfirc\"]}},{\"description\":\"pkc\",\"scripts\":[\"zriykhy\",\"wf\"],\"httpGet\":{\"url\":\"lboxqvkjl\",\"fileName\":\"ho\",\"headers\":[\"nhdwdigumbnra\",\"uzzptjazysdz\",\"ezwwv\"]}}]},\"logStreamEndpoint\":\"qyuvvfonkp\"}") - .toObject(ContainerAppsBuildProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildProperties model = new ContainerAppsBuildProperties(); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildProperties.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.java deleted file mode 100644 index 72392beab621..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; - -public final class ContainerAppsBuildResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsBuildResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"buildStatus\":\"InProgress\",\"destinationContainerRegistry\":{\"server\":\"fi\",\"image\":\"dieuzaofj\"},\"configuration\":{\"baseOs\":\"cyyysfgdot\",\"platform\":\"biipuip\",\"platformVersion\":\"qonmacj\",\"environmentVariables\":[{\"name\":\"izsh\",\"value\":\"vcimpev\"},{\"name\":\"gmblrri\",\"value\":\"bywdxsmicc\"},{\"name\":\"rwfscjfnynszquj\",\"value\":\"zdvoqytibyowbb\"}],\"preBuildSteps\":[{\"description\":\"vutpthjoxo\",\"scripts\":[\"sks\",\"pi\"],\"httpGet\":{\"url\":\"qolj\",\"fileName\":\"cgxxlxs\",\"headers\":[\"cvizqzdwlvw\",\"youpfgfbkj\",\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"]}},{\"description\":\"gzukxitmm\",\"scripts\":[\"qqqxhrnxrx\",\"pjui\"],\"httpGet\":{\"url\":\"vokqdzfv\",\"fileName\":\"ivjlfrqttbajlka\",\"headers\":[\"xyiopidkqqfku\",\"s\",\"xkdmligo\"]}},{\"description\":\"brxk\",\"scripts\":[\"oaz\",\"ruocbgo\",\"rb\",\"eoybfhjxakvvjgs\"],\"httpGet\":{\"url\":\"r\",\"fileName\":\"lmywwtkgkxnyed\",\"headers\":[\"yvudtjuewbci\",\"xuuwhcj\",\"xccybvpa\"]}},{\"description\":\"kkudzp\",\"scripts\":[\"jplmagstcy\",\"hpfkyrkdbdgi\"],\"httpGet\":{\"url\":\"sjkmnwqj\",\"fileName\":\"baiyhddviaceg\",\"headers\":[\"ntfpmvmemfnc\"]}}]},\"logStreamEndpoint\":\"wvvb\"},\"id\":\"xlllchp\",\"name\":\"db\",\"type\":\"evwrdnhfuk\"}") - .toObject(ContainerAppsBuildResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsBuildResourceInner model = new ContainerAppsBuildResourceInner(); - model = BinaryData.fromObject(model).toObject(ContainerAppsBuildResourceInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.java deleted file mode 100644 index 7f83903ed163..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsBuildsByContainerAppsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"buildStatus\":\"NotStarted\",\"destinationContainerRegistry\":{\"server\":\"lrupjovmo\",\"image\":\"ayeb\"},\"configuration\":{\"baseOs\":\"wzlpzbtz\",\"platform\":\"kykipfsdyepfnoc\",\"platformVersion\":\"ezacfpztga\",\"environmentVariables\":[{\"name\":\"qejg\",\"value\":\"aokctgkp\"},{\"name\":\"gkqzkcyzmffngdyf\",\"value\":\"ixrhl\"}],\"preBuildSteps\":[{\"description\":\"oejgoiutgwrmkah\",\"scripts\":[\"azyntacihncogm\",\"pnmliq\",\"v\",\"bhikeaqgr\"],\"httpGet\":{\"url\":\"pomxpu\"}},{\"description\":\"tsdfjyieso\",\"scripts\":[\"qb\",\"outmp\"],\"httpGet\":{\"url\":\"gleofjsbgbw\"}}]},\"logStreamEndpoint\":\"vdajfwn\"},\"id\":\"fmaciqgjjrlhiq\",\"name\":\"wixvtbouguxtndop\",\"type\":\"jtt\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.containerAppsBuildsByContainerApps() - .list("ieuscplhyvdgx", "yzkxitds", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.java deleted file mode 100644 index f93ed6b5c386..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsBuildsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"buildStatus\":\"Canceled\",\"destinationContainerRegistry\":{\"server\":\"spugzfeuzjljmph\",\"image\":\"yezolgjzmicu\"},\"configuration\":{\"baseOs\":\"ccn\",\"platform\":\"hanzbuiad\",\"platformVersion\":\"atecaa\",\"environmentVariables\":[{\"name\":\"o\",\"value\":\"zn\"},{\"name\":\"ucbdaom\",\"value\":\"wiinjdllw\"},{\"name\":\"tlepowavvqxua\",\"value\":\"g\"},{\"name\":\"qwulynkgfcfdru\",\"value\":\"si\"}],\"preBuildSteps\":[{\"description\":\"clhuulriqbyokv\",\"scripts\":[\"zsxebr\",\"lttfyhc\",\"jwsuoardnag\",\"tpufpbpgnrholhu\"],\"httpGet\":{\"url\":\"fwxi\"}},{\"description\":\"kysolsyjprxs\",\"scripts\":[\"dmcvhtbbz\",\"hfvhuwzbxpcqz\"],\"httpGet\":{\"url\":\"hotjec\"}},{\"description\":\"mx\",\"scripts\":[\"rrskapbxwieexuy\",\"derltfokyksyim\"],\"httpGet\":{\"url\":\"cgrvkcxzznnuifer\"}},{\"description\":\"jegprk\",\"scripts\":[\"wrjmwv\"],\"httpGet\":{\"url\":\"tu\"}}]},\"logStreamEndpoint\":\"xximwgxq\"},\"id\":\"ekotjgxi\",\"name\":\"qfkyfhiwvjaqu\",\"type\":\"by\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppsBuildResource response = manager.containerAppsBuilds() - .getWithResponse("asualapdlndbea", "bkixvvlwyn", "bb", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java deleted file mode 100644 index a904ea0c0568..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerApps().delete("idoyzl", "giomqo", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 199ec636d58b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,50 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -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 ContainerAppsDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"metadata\":{\"id\":\"xxcrqmipfjwfoy\",\"name\":\"zms\",\"description\":\"xbaizab\",\"author\":\"nvgskjtoxjd\",\"category\":\"sjznvhx\",\"supportTopicList\":[{\"id\":\"i\",\"pesId\":\"y\"},{\"id\":\"fn\",\"pesId\":\"c\"},{\"id\":\"tfshksnyzm\",\"pesId\":\"amwbwmbnlslcef\"}],\"analysisTypes\":[\"ktwtk\"],\"type\":\"hlpfliw\",\"score\":61.39023},\"dataset\":[{\"table\":{\"tableName\":\"hwvladpc\",\"columns\":[{}],\"rows\":[\"datausybke\"]},\"renderingProperties\":{\"type\":1019694129,\"title\":\"ztsilscvq\",\"description\":\"eiihfymko\",\"isVisible\":false}},{\"table\":{\"tableName\":\"seuugcig\",\"columns\":[{},{},{}],\"rows\":[\"datamgbvmtdwrqbe\"]},\"renderingProperties\":{\"type\":642467230,\"title\":\"eglabtvkbiwznhtf\",\"description\":\"icudyhizpa\",\"isVisible\":true}}],\"status\":{\"message\":\"bcakzn\",\"statusId\":1389422036},\"dataProviderMetadata\":{\"providerName\":\"itwhrjsdmmazdnck\",\"propertyBag\":[{\"name\":\"pglhzqp\",\"value\":\"bawkikcdg\"}]}},\"id\":\"bssdpjeyoqxd\",\"name\":\"decfiwhagxsure\",\"type\":\"qrshzzbgullcxiq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = manager.containerAppsDiagnostics() - .getDetectorWithResponse("toqcahfsgbjm", "reesrfwsszvl", "wliso", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ktwtk", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("hwvladpc", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1019694129, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("ztsilscvq", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("eiihfymko", - response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("bcakzn", response.properties().status().message()); - Assertions.assertEquals(1389422036, response.properties().status().statusId()); - Assertions.assertEquals("itwhrjsdmmazdnck", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("pglhzqp", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("bawkikcdg", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index b4414d752572..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java +++ /dev/null @@ -1,56 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -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 ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"oxpdxq\",\"name\":\"r\",\"description\":\"qownkiuajewnahw\",\"author\":\"jjmztnlmsoodtmv\",\"category\":\"dhdyswcrptveaj\",\"supportTopicList\":[{\"id\":\"lgsrgkrfizrpywlp\",\"pesId\":\"uqhrlmcskykp\"}],\"analysisTypes\":[\"fixcnpcfykkpy\"],\"type\":\"pawmpjprdp\",\"score\":39.779915},\"dataset\":[{\"table\":{\"tableName\":\"fjfw\",\"columns\":[{},{}],\"rows\":[\"datawk\",\"datayep\"]},\"renderingProperties\":{\"type\":206009156,\"title\":\"nidmdiaw\",\"description\":\"xkzrn\",\"isVisible\":false}},{\"table\":{\"tableName\":\"dhuosgwqpsqa\",\"columns\":[{},{}],\"rows\":[\"datadvqgcnbhcbmjkz\",\"dataibniynts\",\"datajmfmeftvhkm\",\"dataogjrhskbwgm\"]},\"renderingProperties\":{\"type\":165219531,\"title\":\"cfogxhcxnwjt\",\"description\":\"dzxcouzfwo\",\"isVisible\":false}}],\"status\":{\"message\":\"kzkdtzxsoednlwg\",\"statusId\":2125278836},\"dataProviderMetadata\":{\"providerName\":\"o\",\"propertyBag\":[{\"name\":\"qgisnionetbzdrd\",\"value\":\"enx\"}]}},\"id\":\"tlzlmtrlxcznnhz\",\"name\":\"bnbmxlxm\",\"type\":\"tygeqzus\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.containerAppsDiagnostics() - .listDetectors("ffbbcngkegxcypxb", "fetwi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fixcnpcfykkpy", - response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("fjfw", response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(206009156, - response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("nidmdiaw", - response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xkzrn", - response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, - response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("kzkdtzxsoednlwg", response.iterator().next().properties().status().message()); - Assertions.assertEquals(2125278836, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("o", response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("qgisnionetbzdrd", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("enx", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchResourceInnerTests.java deleted file mode 100644 index bca42c6b7bc5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchResourceInnerTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; - -public final class ContainerAppsPatchResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppsPatchResourceInner model = BinaryData.fromString( - "{\"properties\":{\"targetEnvironmentId\":\"cqusr\",\"targetContainerAppId\":\"etnwsdtutnw\",\"targetRevisionId\":\"uycvuzhyrmewip\",\"patchApplyStatus\":\"ManuallySkipped\",\"createdAt\":\"2021-11-09T10:02:58Z\",\"lastModifiedAt\":\"2021-05-05T15:12:47Z\",\"patchDetails\":[{\"targetContainerName\":\"qgsjjxun\",\"targetImage\":\"xgketwz\",\"lastDetectionTime\":\"2021-11-18T05:28:11Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"hfjmhvv\",\"newLayer\":{\"name\":\"gpmuneqsxvmhfbuz\",\"frameworkAndVersion\":\"ihsasb\",\"osAndVersion\":\"dyp\"},\"oldLayer\":{\"name\":\"uemsly\",\"frameworkAndVersion\":\"qyrp\",\"osAndVersion\":\"obrltt\"},\"patchType\":\"Other\"},{\"targetContainerName\":\"jnygq\",\"targetImage\":\"nfwqzdzgtilaxhn\",\"lastDetectionTime\":\"2021-04-20T12:15:53Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"yvi\",\"newLayer\":{\"name\":\"wivkxo\",\"frameworkAndVersion\":\"un\",\"osAndVersion\":\"xxrtikvc\"},\"oldLayer\":{\"name\":\"gclrci\",\"frameworkAndVersion\":\"soxfrken\",\"osAndVersion\":\"m\"},\"patchType\":\"FrameworkSecurity\"}]},\"id\":\"rpmpdnqqskaw\",\"name\":\"oqvm\",\"type\":\"bnpqfrtqlkzme\"}") - .toObject(ContainerAppsPatchResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppsPatchResourceInner model = new ContainerAppsPatchResourceInner(); - model = BinaryData.fromObject(model).toObject(ContainerAppsPatchResourceInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.java deleted file mode 100644 index e0125a5ecf43..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.java +++ /dev/null @@ -1,36 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsPatchesApplyMockTests { - @Test - public void testApply() throws Exception { - String responseStr - = "{\"properties\":{\"targetEnvironmentId\":\"tfjikffffgkuh\",\"targetContainerAppId\":\"whvuldbkk\",\"targetRevisionId\":\"jkjigawgaz\",\"patchApplyStatus\":\"RebaseFailed\",\"createdAt\":\"2021-07-17T19:23:56Z\",\"lastModifiedAt\":\"2021-03-12T04:48:13Z\",\"patchDetails\":[{\"targetContainerName\":\"jsbcml\",\"targetImage\":\"aahzbhuroolkol\",\"lastDetectionTime\":\"2021-03-29T10:52:42Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"mojusuz\",\"newLayer\":{\"name\":\"zcvaaxoialahfxwc\",\"frameworkAndVersion\":\"kdxkuk\",\"osAndVersion\":\"c\"},\"oldLayer\":{\"name\":\"uhhoqeqshavlj\",\"frameworkAndVersion\":\"xyrqo\",\"osAndVersion\":\"thbb\"},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"zukwdrnzkj\",\"targetImage\":\"hfceyjncjm\",\"lastDetectionTime\":\"2021-12-08T19:24:03Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"fjbpfiddhlrufzcq\",\"newLayer\":{\"name\":\"qrfuiocusel\",\"frameworkAndVersion\":\"rsazrhxud\",\"osAndVersion\":\"mdtff\"},\"oldLayer\":{\"name\":\"mrkkhmwd\",\"frameworkAndVersion\":\"lgyqixokw\",\"osAndVersion\":\"awhva\"},\"patchType\":\"Other\"},{\"targetContainerName\":\"fqqdl\",\"targetImage\":\"vmyolcaym\",\"lastDetectionTime\":\"2021-04-25T03:05:01Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"vsnvlaq\",\"newLayer\":{\"name\":\"yzawatu\",\"frameworkAndVersion\":\"kokb\",\"osAndVersion\":\"othymgobl\"},\"oldLayer\":{\"name\":\"nwgwimaanea\",\"frameworkAndVersion\":\"t\",\"osAndVersion\":\"obcyanrfvqtvk\"},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"oog\",\"targetImage\":\"kfnaoaqymhc\",\"lastDetectionTime\":\"2021-08-22T04:15:50Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"uowyrnskbyhqu\",\"newLayer\":{\"name\":\"ygxvha\",\"frameworkAndVersion\":\"xecxqnwh\",\"osAndVersion\":\"ozawmvgxsmpk\"},\"oldLayer\":{\"name\":\"irfljf\",\"frameworkAndVersion\":\"xqou\",\"osAndVersion\":\"ud\"},\"patchType\":\"Other\"}]},\"id\":\"aprhknqiijgencdg\",\"name\":\"oqueqihkkyowltj\",\"type\":\"uwhldxwhieproqks\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppsPatchResource response = manager.containerAppsPatches() - .apply("akt", "jktzboimyfpq", "owkppnwyytf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.java deleted file mode 100644 index b11649d07310..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsPatchesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"targetEnvironmentId\":\"coybaj\",\"targetContainerAppId\":\"qubfajcyw\",\"targetRevisionId\":\"qwmchqohtfxc\",\"patchApplyStatus\":\"Canceled\",\"createdAt\":\"2021-11-23T12:25:12Z\",\"lastModifiedAt\":\"2021-01-03T15:25:04Z\",\"patchDetails\":[{\"targetContainerName\":\"zpwdlvwtiwsmo\",\"targetImage\":\"aonhqnamppul\",\"lastDetectionTime\":\"2021-11-30T08:03:43Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"aekewnazea\",\"newLayer\":{\"name\":\"aj\",\"frameworkAndVersion\":\"yizyddcvxodk\",\"osAndVersion\":\"fsxxby\"},\"oldLayer\":{\"name\":\"qlvge\",\"frameworkAndVersion\":\"wgoljtzx\",\"osAndVersion\":\"xsdobygoogxqapjx\"},\"patchType\":\"OSSecurity\"}]},\"id\":\"jfucsaodjnosdkv\",\"name\":\"bfas\",\"type\":\"matrnzpducd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppsPatchResource response = manager.containerAppsPatches() - .getWithResponse("qontwhymxymulw", "vqtow", "h", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.java deleted file mode 100644 index b3f0b03a0353..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsPatchesListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"targetEnvironmentId\":\"bccwkqmtxapeqi\",\"targetContainerAppId\":\"rpilgftrqrejdaah\",\"targetRevisionId\":\"imldahlfxlmu\",\"patchApplyStatus\":\"ManuallySkipped\",\"createdAt\":\"2021-01-23T23:04:38Z\",\"lastModifiedAt\":\"2021-02-11T10:09:19Z\",\"patchDetails\":[{\"targetContainerName\":\"snc\",\"targetImage\":\"kiioshj\",\"lastDetectionTime\":\"2020-12-28T23:46:20Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"tybnxgztlcgctj\",\"newLayer\":{\"name\":\"j\",\"frameworkAndVersion\":\"ywjzebecuvlbefvw\",\"osAndVersion\":\"jkxpylrwoxzgwpsy\"},\"oldLayer\":{\"name\":\"jeypdvrbkerdk\",\"frameworkAndVersion\":\"gaw\",\"osAndVersion\":\"jxildfkcef\"},\"patchType\":\"OSSecurity\"}]},\"id\":\"q\",\"name\":\"jo\",\"type\":\"sfmnaybdjnxumen\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.containerAppsPatches() - .listByContainerApp("nvskpaj", "mgeu", "exmj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java deleted file mode 100644 index 19ae1756b762..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java +++ /dev/null @@ -1,48 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Replica; -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 ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests { - @Test - public void testGetReplicaWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"createdTime\":\"2021-02-18T03:30:55Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"nbg\",\"containers\":[{\"name\":\"dorgmynltw\",\"containerId\":\"ftmfoeajogsy\",\"ready\":true,\"started\":false,\"restartCount\":1917204796,\"runningState\":\"Running\",\"runningStateDetails\":\"vlkpzwb\",\"logStreamEndpoint\":\"recchdidrmu\",\"execEndpoint\":\"ahmjedbiu\",\"debugEndpoint\":\"khhwmj\"}],\"initContainers\":[{\"name\":\"eunxcqrrihufoi\",\"containerId\":\"piybxvgnzuzpbg\",\"ready\":true,\"started\":false,\"restartCount\":1335795506,\"runningState\":\"Waiting\",\"runningStateDetails\":\"kunhdimjuk\",\"logStreamEndpoint\":\"r\",\"execEndpoint\":\"a\",\"debugEndpoint\":\"pucdocf\"},{\"name\":\"lwgofm\",\"containerId\":\"wrjlvzkl\",\"ready\":true,\"started\":true,\"restartCount\":104707977,\"runningState\":\"Running\",\"runningStateDetails\":\"akvlbishj\",\"logStreamEndpoint\":\"zaptuosk\",\"execEndpoint\":\"izjixwfgcd\",\"debugEndpoint\":\"kkcxwnujvqynvav\"}]},\"id\":\"mdmuqoh\",\"name\":\"ihraxqudd\",\"type\":\"wjc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Replica response = manager.containerAppsRevisionReplicas() - .getReplicaWithResponse("hudsmusuaa", "jakx", "jnfczmnniixy", "vqban", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dorgmynltw", response.containers().get(0).name()); - Assertions.assertEquals("ftmfoeajogsy", response.containers().get(0).containerId()); - Assertions.assertEquals(true, response.containers().get(0).ready()); - Assertions.assertEquals(false, response.containers().get(0).started()); - Assertions.assertEquals(1917204796, response.containers().get(0).restartCount()); - Assertions.assertEquals("eunxcqrrihufoi", response.initContainers().get(0).name()); - Assertions.assertEquals("piybxvgnzuzpbg", response.initContainers().get(0).containerId()); - Assertions.assertEquals(true, response.initContainers().get(0).ready()); - Assertions.assertEquals(false, response.initContainers().get(0).started()); - Assertions.assertEquals(1335795506, response.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java deleted file mode 100644 index a6468c939647..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasListReplicasWithResponseMockTests { - @Test - public void testListReplicasWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"createdTime\":\"2021-12-02T01:42:45Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"viqlluk\",\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{},{}]},\"id\":\"gcbv\",\"name\":\"a\",\"type\":\"mqcbpokstsinv\"},{\"properties\":{\"createdTime\":\"2021-11-27T01:48:46Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"d\",\"containers\":[{},{}],\"initContainers\":[{},{}]},\"id\":\"cehqw\",\"name\":\"itxnmxgnmgu\",\"type\":\"buwvorba\"},{\"properties\":{\"createdTime\":\"2021-02-26T19:00:19Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"dhlltqstqkqsyg\",\"containers\":[{},{}],\"initContainers\":[{},{},{},{}]},\"id\":\"ovagzkheuban\",\"name\":\"xunpqcckqiawzlz\",\"type\":\"laslgacizux\"},{\"properties\":{\"createdTime\":\"2021-05-21T14:34:58Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"wsaudoejtighsxj\",\"containers\":[{},{}],\"initContainers\":[{},{}]},\"id\":\"bala\",\"name\":\"ovu\",\"type\":\"wxhmehjnhjiot\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicaCollection response = manager.containerAppsRevisionReplicas() - .listReplicasWithResponse("jbrhlhpvzadbw", "nnin", "fhxrzfr", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java deleted file mode 100644 index 8d70ca8627f0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsActivateRevisionWithResponseMockTests { - @Test - public void testActivateRevisionWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsRevisions() - .activateRevisionWithResponse("edpqlrfbo", "xi", "mlnfyz", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java deleted file mode 100644 index 6820c0c628b5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests { - @Test - public void testDeactivateRevisionWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsRevisions() - .deactivateRevisionWithResponse("vfrbypic", "bkpdjtaqhsmq", "zpdgonjhxshthmgp", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java deleted file mode 100644 index f5a557f27fc2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsRestartRevisionWithResponseMockTests { - @Test - public void testRestartRevisionWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsRevisions() - .restartRevisionWithResponse("zqulptkbv", "pxtzhigqqbtimpk", "blornsih", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 1bbcf5803f39..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerAppsSourceControls() - .delete("hqpoilosja", "mcezevftmhllpok", "yghz", "ms", false, true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java deleted file mode 100644 index b0a3b6d30ace..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistry model - = BinaryData.fromString("{\"containerRegistryServer\":\"fcnj\",\"identityResourceId\":\"k\"}") - .toObject(ContainerRegistry.class); - Assertions.assertEquals("fcnj", model.containerRegistryServer()); - Assertions.assertEquals("k", model.identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistry model - = new ContainerRegistry().withContainerRegistryServer("fcnj").withIdentityResourceId("k"); - model = BinaryData.fromObject(model).toObject(ContainerRegistry.class); - Assertions.assertEquals("fcnj", model.containerRegistryServer()); - Assertions.assertEquals("k", model.identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java deleted file mode 100644 index 0c5dc4ce6151..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryWithCustomImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistryWithCustomImage model - = BinaryData.fromString("{\"server\":\"bhsfxob\",\"image\":\"tkblmpewww\"}") - .toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bhsfxob", model.server()); - Assertions.assertEquals("tkblmpewww", model.image()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistryWithCustomImage model - = new ContainerRegistryWithCustomImage().withServer("bhsfxob").withImage("tkblmpewww"); - model = BinaryData.fromObject(model).toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bhsfxob", model.server()); - Assertions.assertEquals("tkblmpewww", model.image()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index 8d436633849b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResources model - = BinaryData.fromString("{\"cpu\":20.95195509760658,\"memory\":\"wep\",\"ephemeralStorage\":\"pc\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(20.95195509760658D, model.cpu()); - Assertions.assertEquals("wep", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(20.95195509760658D).withMemory("wep"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(20.95195509760658D, model.cpu()); - Assertions.assertEquals("wep", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java deleted file mode 100644 index f4de1b2b0cd2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; - -public final class CookieExpirationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CookieExpiration model - = BinaryData.fromString("{\"convention\":\"FixedTime\",\"timeToExpiration\":\"wxrjfeallnwsub\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("wxrjfeallnwsub", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = new CookieExpiration().withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("wxrjfeallnwsub"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("wxrjfeallnwsub", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java deleted file mode 100644 index 32b7afe02815..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomain model = BinaryData - .fromString( - "{\"name\":\"bminrfdwoyuhhzi\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"ozbhdmsmlmzq\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("bminrfdwoyuhhzi", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("ozbhdmsmlmzq", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = new CustomDomain().withName("bminrfdwoyuhhzi") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("ozbhdmsmlmzq"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("bminrfdwoyuhhzi", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("ozbhdmsmlmzq", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java deleted file mode 100644 index 921d929a84b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java +++ /dev/null @@ -1,88 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPoliciesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":524957188,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1668703834},\"circuitBreakerPolicy\":{\"consecutiveErrors\":2091511430,\"timeoutInSeconds\":653682799,\"intervalInSeconds\":1265921223}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":236199125,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":570901557},\"circuitBreakerPolicy\":{\"consecutiveErrors\":991430794,\"timeoutInSeconds\":1327259513,\"intervalInSeconds\":989850966}}},\"id\":\"rem\",\"name\":\"hllizhceumoq\",\"type\":\"dkadppyibn\"}],\"nextLink\":\"ladywrxwhyd\"}") - .toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(524957188, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1668703834, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(2091511430, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(653682799, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1265921223, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(236199125, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(570901557, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(991430794, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1327259513, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(989850966, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model = new DaprComponentResiliencyPoliciesCollection() - .withValue(Arrays.asList(new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(524957188) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1668703834)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(2091511430) - .withTimeoutInSeconds(653682799) - .withIntervalInSeconds(1265921223))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(236199125) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(570901557)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(991430794) - .withTimeoutInSeconds(1327259513) - .withIntervalInSeconds(989850966))))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(524957188, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1668703834, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(2091511430, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(653682799, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1265921223, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(236199125, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(570901557, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(991430794, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1327259513, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(989850966, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index dda27ca290ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,86 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -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 DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":684721295,\"retryBackOff\":{\"initialDelayInMilliseconds\":1832222772,\"maxIntervalInMilliseconds\":538650932}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1207678234},\"circuitBreakerPolicy\":{\"consecutiveErrors\":215386567,\"timeoutInSeconds\":894709124,\"intervalInSeconds\":1742124939}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1791009241,\"retryBackOff\":{\"initialDelayInMilliseconds\":1119823688,\"maxIntervalInMilliseconds\":1336622134}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1434985054},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1032393727,\"timeoutInSeconds\":1873317873,\"intervalInSeconds\":1609822926}}},\"id\":\"vbbvaqdljnpetl\",\"name\":\"n\",\"type\":\"detawevxehue\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprComponentResiliencyPolicy response = manager.daprComponentResiliencyPolicies() - .define("dror") - .withExistingDaprComponent("qvcml", "exbzbqufpnezsjza", "m") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1314918046) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(34461405) - .withMaxIntervalInMilliseconds(1687575900))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1621039893)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1756639996) - .withTimeoutInSeconds(71262559) - .withIntervalInSeconds(1457823620))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(703393978) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(155050896) - .withMaxIntervalInMilliseconds(1642847010))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(363464701)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1653660645) - .withTimeoutInSeconds(1501466100) - .withIntervalInSeconds(196695741))) - .create(); - - Assertions.assertEquals(684721295, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1832222772, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(538650932, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1207678234, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(215386567, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(894709124, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1742124939, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1791009241, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1119823688, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1336622134, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1434985054, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1032393727, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1873317873, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1609822926, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java deleted file mode 100644 index b32033145bb2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentResiliencyPoliciesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.daprComponentResiliencyPolicies() - .deleteWithResponse("eswyhh", "ifjua", "xwwvcmmpeg", "y", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java deleted file mode 100644 index ad5da05f5fa0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,56 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -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 DaprComponentResiliencyPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1038883334,\"retryBackOff\":{\"initialDelayInMilliseconds\":1700371151,\"maxIntervalInMilliseconds\":1374921710}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1935350563},\"circuitBreakerPolicy\":{\"consecutiveErrors\":154512919,\"timeoutInSeconds\":1158815759,\"intervalInSeconds\":703367024}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":725496177,\"retryBackOff\":{\"initialDelayInMilliseconds\":1579451655,\"maxIntervalInMilliseconds\":1723350346}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":171361564},\"circuitBreakerPolicy\":{\"consecutiveErrors\":896726160,\"timeoutInSeconds\":816302370,\"intervalInSeconds\":1468148143}}},\"id\":\"nrra\",\"name\":\"ovrwwx\",\"type\":\"wpjhspboxhifppsk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprComponentResiliencyPolicy response = manager.daprComponentResiliencyPolicies() - .getWithResponse("hxzubfjzabbw", "gvzua", "xcdckixspsa", "gavkmv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(1038883334, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1700371151, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1374921710, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1935350563, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(154512919, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1158815759, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(703367024, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(725496177, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1579451655, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1723350346, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(171361564, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(896726160, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(816302370, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1468148143, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java deleted file mode 100644 index aa267f4e3d5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java +++ /dev/null @@ -1,64 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -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 DaprComponentResiliencyPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":493987363,\"retryBackOff\":{\"initialDelayInMilliseconds\":1346081832,\"maxIntervalInMilliseconds\":154728040}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":250538513},\"circuitBreakerPolicy\":{\"consecutiveErrors\":385419072,\"timeoutInSeconds\":1897243806,\"intervalInSeconds\":837292963}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1771574336,\"retryBackOff\":{\"initialDelayInMilliseconds\":944136407,\"maxIntervalInMilliseconds\":1918010429}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":534856605},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1442218085,\"timeoutInSeconds\":729154649,\"intervalInSeconds\":1444493325}}},\"id\":\"juf\",\"name\":\"ekiooanduewfhv\",\"type\":\"x\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.daprComponentResiliencyPolicies() - .list("pgayiawohfmhnnzm", "cjjkmqenh", "idzr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(493987363, response.iterator().next().inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1346081832, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(154728040, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(250538513, - response.iterator().next().inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(385419072, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1897243806, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(837292963, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1771574336, response.iterator().next().outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(944136407, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1918010429, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(534856605, - response.iterator().next().outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1442218085, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(729154649, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1444493325, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java deleted file mode 100644 index dffb701eab43..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model = BinaryData - .fromString( - "{\"consecutiveErrors\":865412735,\"timeoutInSeconds\":2077361898,\"intervalInSeconds\":996358381}") - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(865412735, model.consecutiveErrors()); - Assertions.assertEquals(2077361898, model.timeoutInSeconds()); - Assertions.assertEquals(996358381, model.intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model - = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(865412735) - .withTimeoutInSeconds(2077361898) - .withIntervalInSeconds(996358381); - model = BinaryData.fromObject(model) - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(865412735, model.consecutiveErrors()); - Assertions.assertEquals(2077361898, model.timeoutInSeconds()); - Assertions.assertEquals(996358381, model.intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java deleted file mode 100644 index 4bfb688e1928..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java +++ /dev/null @@ -1,53 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = BinaryData.fromString( - "{\"httpRetryPolicy\":{\"maxRetries\":736323206,\"retryBackOff\":{\"initialDelayInMilliseconds\":1434895356,\"maxIntervalInMilliseconds\":264085794}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":63326432},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1334001807,\"timeoutInSeconds\":1126673643,\"intervalInSeconds\":1466151519}}") - .toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(736323206, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1434895356, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(264085794, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(63326432, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1334001807, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1126673643, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1466151519, model.circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(736323206) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1434895356) - .withMaxIntervalInMilliseconds(264085794))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(63326432)) - .withCircuitBreakerPolicy( - new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(1334001807) - .withTimeoutInSeconds(1126673643) - .withIntervalInSeconds(1466151519)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(736323206, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1434895356, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(264085794, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(63326432, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1334001807, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1126673643, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1466151519, model.circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java deleted file mode 100644 index b303ce341882..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model - = BinaryData.fromString("{\"initialDelayInMilliseconds\":431216153,\"maxIntervalInMilliseconds\":63319486}") - .toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(431216153, model.initialDelayInMilliseconds()); - Assertions.assertEquals(63319486, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration().withInitialDelayInMilliseconds(431216153) - .withMaxIntervalInMilliseconds(63319486); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(431216153, model.initialDelayInMilliseconds()); - Assertions.assertEquals(63319486, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java deleted file mode 100644 index b0935e643748..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model = BinaryData.fromString( - "{\"maxRetries\":5260255,\"retryBackOff\":{\"initialDelayInMilliseconds\":1999284303,\"maxIntervalInMilliseconds\":196507131}}") - .toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(5260255, model.maxRetries()); - Assertions.assertEquals(1999284303, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(196507131, model.retryBackOff().maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5260255) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1999284303) - .withMaxIntervalInMilliseconds(196507131)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(5260255, model.maxRetries()); - Assertions.assertEquals(1999284303, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(196507131, model.retryBackOff().maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java deleted file mode 100644 index d129233497f1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java +++ /dev/null @@ -1,89 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1122183962,\"retryBackOff\":{\"initialDelayInMilliseconds\":1501723844,\"maxIntervalInMilliseconds\":1498235259}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1437535025},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1352834601,\"timeoutInSeconds\":658051997,\"intervalInSeconds\":1037982388}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1855050027,\"retryBackOff\":{\"initialDelayInMilliseconds\":1748294835,\"maxIntervalInMilliseconds\":1414324336}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1242671016},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1986212179,\"timeoutInSeconds\":397269197,\"intervalInSeconds\":318100229}}},\"id\":\"kltrfow\",\"name\":\"dvrfm\",\"type\":\"lihcvjdrqcr\"}") - .toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1122183962, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1501723844, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1498235259, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1437535025, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1352834601, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(658051997, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1037982388, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1855050027, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1748294835, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1414324336, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1242671016, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1986212179, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(397269197, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(318100229, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyInner model = new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1122183962) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1501723844) - .withMaxIntervalInMilliseconds(1498235259))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1437535025)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1352834601) - .withTimeoutInSeconds(658051997) - .withIntervalInSeconds(1037982388))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1855050027) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1748294835) - .withMaxIntervalInMilliseconds(1414324336))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1242671016)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1986212179) - .withTimeoutInSeconds(397269197) - .withIntervalInSeconds(318100229))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1122183962, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1501723844, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1498235259, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1437535025, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1352834601, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(658051997, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1037982388, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1855050027, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1748294835, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1414324336, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1242671016, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1986212179, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(397269197, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(318100229, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java deleted file mode 100644 index afeeea60b51a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java +++ /dev/null @@ -1,89 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyProperties; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = BinaryData.fromString( - "{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1635048339,\"retryBackOff\":{\"initialDelayInMilliseconds\":953823508,\"maxIntervalInMilliseconds\":1215207387}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1450803819},\"circuitBreakerPolicy\":{\"consecutiveErrors\":950614024,\"timeoutInSeconds\":836172134,\"intervalInSeconds\":1608999558}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1360910741,\"retryBackOff\":{\"initialDelayInMilliseconds\":1251867390,\"maxIntervalInMilliseconds\":189062113}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1754799205},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1416309389,\"timeoutInSeconds\":2095697533,\"intervalInSeconds\":16556749}}}") - .toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1635048339, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(953823508, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1215207387, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1450803819, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(950614024, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(836172134, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1608999558, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1360910741, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1251867390, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(189062113, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1754799205, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1416309389, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(2095697533, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(16556749, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = new DaprComponentResiliencyPolicyProperties() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1635048339) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(953823508) - .withMaxIntervalInMilliseconds(1215207387))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1450803819)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(950614024) - .withTimeoutInSeconds(836172134) - .withIntervalInSeconds(1608999558))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1360910741) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1251867390) - .withMaxIntervalInMilliseconds(189062113))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1754799205)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1416309389) - .withTimeoutInSeconds(2095697533) - .withIntervalInSeconds(16556749))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1635048339, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(953823508, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1215207387, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1450803819, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(950614024, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(836172134, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1608999558, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1360910741, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1251867390, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(189062113, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1754799205, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1416309389, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(2095697533, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(16556749, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java deleted file mode 100644 index 69cc1fb832ab..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = BinaryData.fromString("{\"responseTimeoutInSeconds\":1552463925}") - .toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(1552463925, model.responseTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(1552463925); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(1552463925, model.responseTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java deleted file mode 100644 index 5924ffbf2c16..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentServiceBindingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentServiceBinding model = BinaryData.fromString( - "{\"name\":\"epxgyqagvr\",\"serviceId\":\"npkukghimdblx\",\"metadata\":{\"name\":\"mfnjh\",\"value\":\"xw\"}}") - .toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("epxgyqagvr", model.name()); - Assertions.assertEquals("npkukghimdblx", model.serviceId()); - Assertions.assertEquals("mfnjh", model.metadata().name()); - Assertions.assertEquals("xw", model.metadata().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentServiceBinding model = new DaprComponentServiceBinding().withName("epxgyqagvr") - .withServiceId("npkukghimdblx") - .withMetadata(new DaprServiceBindMetadata().withName("mfnjh").withValue("xw")); - model = BinaryData.fromObject(model).toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("epxgyqagvr", model.name()); - Assertions.assertEquals("npkukghimdblx", model.serviceId()); - Assertions.assertEquals("mfnjh", model.metadata().name()); - Assertions.assertEquals("xw", model.metadata().value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index a34c2568ed2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.daprComponents() - .deleteWithResponse("hirc", "gcvsvkkjbjolpy", "klkvuznadvh", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index 11e2635b3de7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"tqszzgyksikawanv\",\"value\":\"dvgjqcrbkompnbnf\"},{\"name\":\"weoj\",\"value\":\"pgcmahiwfr\"},{\"name\":\"w\",\"value\":\"hkapitsks\"},{\"name\":\"yfttibjepzwhju\",\"value\":\"dgbggcjxzh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = manager.daprComponents() - .listSecretsWithResponse("lieo", "gowxxbhtp", "yioqe", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java deleted file mode 100644 index 396200b5e7ab..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java +++ /dev/null @@ -1,21 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; - -public final class DaprConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprConfiguration model = BinaryData.fromString("{\"version\":\"c\"}").toObject(DaprConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprConfiguration model = new DaprConfiguration(); - model = BinaryData.fromObject(model).toObject(DaprConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java deleted file mode 100644 index 7d2a9c779fe6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; - -public final class DaprSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecret model - = BinaryData.fromString("{\"name\":\"enwabfatk\",\"value\":\"dxbjhwuaanozj\"}").toObject(DaprSecret.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecret model = new DaprSecret(); - model = BinaryData.fromObject(model).toObject(DaprSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java deleted file mode 100644 index e84d8e161f1f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; -import java.util.Arrays; - -public final class DaprSecretsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecretsCollectionInner model - = BinaryData.fromString("{\"value\":[{\"name\":\"vxwc\",\"value\":\"lpcirelsf\"}]}") - .toObject(DaprSecretsCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecretsCollectionInner model = new DaprSecretsCollectionInner().withValue(Arrays.asList(new DaprSecret())); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java deleted file mode 100644 index e288b39e8e0e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprServiceBindMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprServiceBindMetadata model = BinaryData.fromString("{\"name\":\"zk\",\"value\":\"oqreyfkzikfjawn\"}") - .toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("zk", model.name()); - Assertions.assertEquals("oqreyfkzikfjawn", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprServiceBindMetadata model = new DaprServiceBindMetadata().withName("zk").withValue("oqreyfkzikfjawn"); - model = BinaryData.fromObject(model).toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("zk", model.name()); - Assertions.assertEquals("oqreyfkzikfjawn", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java deleted file mode 100644 index fbb12e267df8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionBulkSubscribeOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = BinaryData - .fromString("{\"enabled\":true,\"maxMessagesCount\":1598918980,\"maxAwaitDurationMs\":655056908}") - .toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1598918980, model.maxMessagesCount()); - Assertions.assertEquals(655056908, model.maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(1598918980) - .withMaxAwaitDurationMs(655056908); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1598918980, model.maxMessagesCount()); - Assertions.assertEquals(655056908, model.maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java deleted file mode 100644 index b002b1e80d2c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java +++ /dev/null @@ -1,75 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"pubsubName\":\"snbagnchjhg\",\"topic\":\"uowakyw\",\"deadLetterTopic\":\"hjym\",\"routes\":{\"rules\":[{\"match\":\"agdrcls\",\"path\":\"ljomevt\"}],\"default\":\"cnlbv\"},\"scopes\":[\"odk\",\"gjiiytssiki\"],\"metadata\":{\"mqso\":\"ufqbvntnr\",\"cpwzv\":\"hcekxgnlykm\",\"qba\":\"doksqdtiwlwxlbon\",\"xbyja\":\"qicqchygt\"},\"bulkSubscribe\":{\"enabled\":true,\"maxMessagesCount\":2100861051,\"maxAwaitDurationMs\":1434725351}},\"id\":\"yqvgxia\",\"name\":\"detv\",\"type\":\"hkxdxuwsaifmc\"}") - .toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("snbagnchjhg", model.pubsubName()); - Assertions.assertEquals("uowakyw", model.topic()); - Assertions.assertEquals("hjym", model.deadLetterTopic()); - Assertions.assertEquals("agdrcls", model.routes().rules().get(0).match()); - Assertions.assertEquals("ljomevt", model.routes().rules().get(0).path()); - Assertions.assertEquals("cnlbv", model.routes().defaultProperty()); - Assertions.assertEquals("odk", model.scopes().get(0)); - Assertions.assertEquals("ufqbvntnr", model.metadata().get("mqso")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2100861051, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1434725351, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionInner model = new DaprSubscriptionInner().withPubsubName("snbagnchjhg") - .withTopic("uowakyw") - .withDeadLetterTopic("hjym") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("agdrcls").withPath("ljomevt"))) - .withDefaultProperty("cnlbv")) - .withScopes(Arrays.asList("odk", "gjiiytssiki")) - .withMetadata( - mapOf("mqso", "ufqbvntnr", "cpwzv", "hcekxgnlykm", "qba", "doksqdtiwlwxlbon", "xbyja", "qicqchygt")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(2100861051) - .withMaxAwaitDurationMs(1434725351)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("snbagnchjhg", model.pubsubName()); - Assertions.assertEquals("uowakyw", model.topic()); - Assertions.assertEquals("hjym", model.deadLetterTopic()); - Assertions.assertEquals("agdrcls", model.routes().rules().get(0).match()); - Assertions.assertEquals("ljomevt", model.routes().rules().get(0).path()); - Assertions.assertEquals("cnlbv", model.routes().defaultProperty()); - Assertions.assertEquals("odk", model.scopes().get(0)); - Assertions.assertEquals("ufqbvntnr", model.metadata().get("mqso")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2100861051, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1434725351, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java deleted file mode 100644 index 3f94222d48d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java +++ /dev/null @@ -1,77 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionProperties; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionProperties model = BinaryData.fromString( - "{\"pubsubName\":\"osbz\",\"topic\":\"hg\",\"deadLetterTopic\":\"kb\",\"routes\":{\"rules\":[{\"match\":\"lgjyyxpvels\",\"path\":\"rqz\"},{\"match\":\"xoqeintxwalj\",\"path\":\"zoblq\"},{\"match\":\"afrqulhm\",\"path\":\"qb\"},{\"match\":\"vafjrqpjiyrqj\",\"path\":\"gaxwmzwdfkbnrzo\"}],\"default\":\"dltb\"},\"scopes\":[\"qjf\",\"xxsaetgz\",\"gvpyigdaqqilzdc\"],\"metadata\":{\"gucaif\":\"joedx\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":505810781,\"maxAwaitDurationMs\":558514412}}") - .toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("osbz", model.pubsubName()); - Assertions.assertEquals("hg", model.topic()); - Assertions.assertEquals("kb", model.deadLetterTopic()); - Assertions.assertEquals("lgjyyxpvels", model.routes().rules().get(0).match()); - Assertions.assertEquals("rqz", model.routes().rules().get(0).path()); - Assertions.assertEquals("dltb", model.routes().defaultProperty()); - Assertions.assertEquals("qjf", model.scopes().get(0)); - Assertions.assertEquals("joedx", model.metadata().get("gucaif")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(505810781, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(558514412, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionProperties model = new DaprSubscriptionProperties().withPubsubName("osbz") - .withTopic("hg") - .withDeadLetterTopic("kb") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("lgjyyxpvels").withPath("rqz"), - new DaprSubscriptionRouteRule().withMatch("xoqeintxwalj").withPath("zoblq"), - new DaprSubscriptionRouteRule().withMatch("afrqulhm").withPath("qb"), - new DaprSubscriptionRouteRule().withMatch("vafjrqpjiyrqj").withPath("gaxwmzwdfkbnrzo"))) - .withDefaultProperty("dltb")) - .withScopes(Arrays.asList("qjf", "xxsaetgz", "gvpyigdaqqilzdc")) - .withMetadata(mapOf("gucaif", "joedx")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(505810781) - .withMaxAwaitDurationMs(558514412)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("osbz", model.pubsubName()); - Assertions.assertEquals("hg", model.topic()); - Assertions.assertEquals("kb", model.deadLetterTopic()); - Assertions.assertEquals("lgjyyxpvels", model.routes().rules().get(0).match()); - Assertions.assertEquals("rqz", model.routes().rules().get(0).path()); - Assertions.assertEquals("dltb", model.routes().defaultProperty()); - Assertions.assertEquals("qjf", model.scopes().get(0)); - Assertions.assertEquals("joedx", model.metadata().get("gucaif")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(505810781, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(558514412, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java deleted file mode 100644 index 0159872f2459..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRouteRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRouteRule model = BinaryData.fromString("{\"match\":\"tuicds\",\"path\":\"dfmmpzhzzwvy\"}") - .toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("tuicds", model.match()); - Assertions.assertEquals("dfmmpzhzzwvy", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRouteRule model = new DaprSubscriptionRouteRule().withMatch("tuicds").withPath("dfmmpzhzzwvy"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("tuicds", model.match()); - Assertions.assertEquals("dfmmpzhzzwvy", model.path()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java deleted file mode 100644 index a7d787d8ab71..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRoutes model = BinaryData - .fromString("{\"rules\":[{\"match\":\"qqa\",\"path\":\"mkxwxdcvjwcyziak\"}],\"default\":\"iqch\"}") - .toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("qqa", model.rules().get(0).match()); - Assertions.assertEquals("mkxwxdcvjwcyziak", model.rules().get(0).path()); - Assertions.assertEquals("iqch", model.defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRoutes model = new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("qqa").withPath("mkxwxdcvjwcyziak"))) - .withDefaultProperty("iqch"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("qqa", model.rules().get(0).match()); - Assertions.assertEquals("mkxwxdcvjwcyziak", model.rules().get(0).path()); - Assertions.assertEquals("iqch", model.defaultProperty()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java deleted file mode 100644 index e1b5edbfc338..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java +++ /dev/null @@ -1,82 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"pubsubName\":\"d\",\"topic\":\"llgryfqiuasigr\",\"deadLetterTopic\":\"socnequygdjboq\",\"routes\":{\"rules\":[{},{},{}],\"default\":\"jkqev\"},\"scopes\":[\"mmwiuawvcmjz\",\"xiid\",\"scz\"],\"metadata\":{\"oqiqazugamx\":\"s\",\"cekuz\":\"krrcoiisbamnpp\",\"zxuizhyhnepkpe\":\"dsbezaxyfu\",\"xdazv\":\"iarxqiubxdukec\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":118970540,\"maxAwaitDurationMs\":439594345}},\"id\":\"zudblnsntrpcaq\",\"name\":\"iofkbtfmh\",\"type\":\"lbnld\"},{\"properties\":{\"pubsubName\":\"bh\",\"topic\":\"zyqu\",\"deadLetterTopic\":\"sqxutr\",\"routes\":{\"rules\":[{}],\"default\":\"yuuatvlmbjwcolbm\"},\"scopes\":[\"nwtpcpahprz\"],\"metadata\":{\"nxzcm\":\"hmtfho\",\"sn\":\"hngxnoqrxtd\",\"hepfwwtjfdoes\":\"evhdlmydid\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1541394704,\"maxAwaitDurationMs\":78837183}},\"id\":\"ky\",\"name\":\"ikxkxhneg\",\"type\":\"njzrbhtmeplvu\"}],\"nextLink\":\"obrl\"}") - .toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("d", model.value().get(0).pubsubName()); - Assertions.assertEquals("llgryfqiuasigr", model.value().get(0).topic()); - Assertions.assertEquals("socnequygdjboq", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("jkqev", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("mmwiuawvcmjz", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("s", model.value().get(0).metadata().get("oqiqazugamx")); - Assertions.assertEquals(false, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(118970540, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(439594345, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionsCollection model = new DaprSubscriptionsCollection().withValue(Arrays.asList( - new DaprSubscriptionInner().withPubsubName("d") - .withTopic("llgryfqiuasigr") - .withDeadLetterTopic("socnequygdjboq") - .withRoutes(new DaprSubscriptionRoutes().withRules(Arrays.asList(new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())).withDefaultProperty("jkqev")) - .withScopes(Arrays.asList("mmwiuawvcmjz", "xiid", "scz")) - .withMetadata(mapOf("oqiqazugamx", "s", "cekuz", "krrcoiisbamnpp", "zxuizhyhnepkpe", "dsbezaxyfu", - "xdazv", "iarxqiubxdukec")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(118970540) - .withMaxAwaitDurationMs(439594345)), - new DaprSubscriptionInner().withPubsubName("bh") - .withTopic("zyqu") - .withDeadLetterTopic("sqxutr") - .withRoutes(new DaprSubscriptionRoutes().withRules(Arrays.asList(new DaprSubscriptionRouteRule())) - .withDefaultProperty("yuuatvlmbjwcolbm")) - .withScopes(Arrays.asList("nwtpcpahprz")) - .withMetadata(mapOf("nxzcm", "hmtfho", "sn", "hngxnoqrxtd", "hepfwwtjfdoes", "evhdlmydid")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(1541394704) - .withMaxAwaitDurationMs(78837183)))); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("d", model.value().get(0).pubsubName()); - Assertions.assertEquals("llgryfqiuasigr", model.value().get(0).topic()); - Assertions.assertEquals("socnequygdjboq", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("jkqev", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("mmwiuawvcmjz", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("s", model.value().get(0).metadata().get("oqiqazugamx")); - Assertions.assertEquals(false, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(118970540, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(439594345, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index bf412157e76c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,82 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprSubscriptionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"pubsubName\":\"dlkhczygpm\",\"topic\":\"jculojhhylx\",\"deadLetterTopic\":\"vfiyymot\",\"routes\":{\"rules\":[{\"match\":\"wjmtftcvelniru\",\"path\":\"qnstpaqpibjg\"},{\"match\":\"swmehfxrttxb\",\"path\":\"ennqfabqca\"},{\"match\":\"lectcxsfmb\",\"path\":\"xmsynbkd\"}],\"default\":\"yufxuzmsvzyq\"},\"scopes\":[\"nxhjtlxfikjk\",\"ara\",\"wwuasnjeglht\",\"xbozpcjcnwjz\"],\"metadata\":{\"i\":\"lxrnwvdsvo\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1110084417,\"maxAwaitDurationMs\":1952109965}},\"id\":\"gfhjxsawoo\",\"name\":\"uffhxf\",\"type\":\"kmwzrdqyoy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSubscription response = manager.daprSubscriptions() - .define("aoy") - .withExistingManagedEnvironment("n", "dv") - .withPubsubName("vg") - .withTopic("zmxynofxlt") - .withDeadLetterTopic("oqxt") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("sjirkrpskcjhmmof").withPath("ivd"), - new DaprSubscriptionRouteRule().withMatch("kykpaxnls").withPath("nyscaccpt"), - new DaprSubscriptionRouteRule().withMatch("et").withPath("gxxiceecv"), - new DaprSubscriptionRouteRule().withMatch("yuveoxmpz").withPath("ahdr"))) - .withDefaultProperty("haz")) - .withScopes(Arrays.asList("bivzfgxmbry")) - .withMetadata(mapOf("iqsykqfdqwdrt", "ibio", "ert", "tfdaglmrcokz")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(1522861626) - .withMaxAwaitDurationMs(1174388584)) - .create(); - - Assertions.assertEquals("dlkhczygpm", response.pubsubName()); - Assertions.assertEquals("jculojhhylx", response.topic()); - Assertions.assertEquals("vfiyymot", response.deadLetterTopic()); - Assertions.assertEquals("wjmtftcvelniru", response.routes().rules().get(0).match()); - Assertions.assertEquals("qnstpaqpibjg", response.routes().rules().get(0).path()); - Assertions.assertEquals("yufxuzmsvzyq", response.routes().defaultProperty()); - Assertions.assertEquals("nxhjtlxfikjk", response.scopes().get(0)); - Assertions.assertEquals("lxrnwvdsvo", response.metadata().get("i")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(1110084417, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1952109965, response.bulkSubscribe().maxAwaitDurationMs()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java deleted file mode 100644 index 8f7112987ded..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DaprSubscriptionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.daprSubscriptions().deleteWithResponse("u", "wvpu", "fddtbfmekjcng", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 05053a0e0109..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java +++ /dev/null @@ -1,49 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -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 DaprSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"pubsubName\":\"gtxdhmfppinmg\",\"topic\":\"esmkwtzgf\",\"deadLetterTopic\":\"gjhxerxl\",\"routes\":{\"rules\":[{\"match\":\"tqhvmmniiqyholhj\",\"path\":\"kb\"},{\"match\":\"icnq\",\"path\":\"ct\"},{\"match\":\"pblxkrkqgvxrkt\",\"path\":\"jigcwtspanb\"}],\"default\":\"asevc\"},\"scopes\":[\"p\"],\"metadata\":{\"ybruhola\":\"d\",\"lonbzaowcahdkmb\":\"mwcgimmrimaabsq\",\"glkvbgukbsv\":\"smihrijezbfsjwfc\",\"ygnbknhjgclxaxwc\":\"wyo\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1452046394,\"maxAwaitDurationMs\":2032469123}},\"id\":\"ucszgh\",\"name\":\"oaqipmnxclfrs\",\"type\":\"zrn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSubscription response = manager.daprSubscriptions() - .getWithResponse("pfixoskkzd", "iv", "ujybsrwz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gtxdhmfppinmg", response.pubsubName()); - Assertions.assertEquals("esmkwtzgf", response.topic()); - Assertions.assertEquals("gjhxerxl", response.deadLetterTopic()); - Assertions.assertEquals("tqhvmmniiqyholhj", response.routes().rules().get(0).match()); - Assertions.assertEquals("kb", response.routes().rules().get(0).path()); - Assertions.assertEquals("asevc", response.routes().defaultProperty()); - Assertions.assertEquals("p", response.scopes().get(0)); - Assertions.assertEquals("d", response.metadata().get("ybruhola")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(1452046394, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(2032469123, response.bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java deleted file mode 100644 index ed393984dc77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java +++ /dev/null @@ -1,49 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -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 DaprSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"pubsubName\":\"gxzduvxdmxe\",\"topic\":\"tmdm\",\"deadLetterTopic\":\"senxoirxyd\",\"routes\":{\"rules\":[{\"match\":\"oi\",\"path\":\"kzsoxz\"},{\"match\":\"twg\",\"path\":\"yohpsapzupzwwytb\"},{\"match\":\"zghximkgfmx\",\"path\":\"kjnpyriwntot\"}],\"default\":\"mmqmtsjkyj\"},\"scopes\":[\"wdonbexftedaubh\",\"eggzgrn\",\"tlfozuumrtgjqgac\",\"ntns\"],\"metadata\":{\"te\":\"xjmkanbclazofmex\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":1407174157,\"maxAwaitDurationMs\":238054598}},\"id\":\"scd\",\"name\":\"xwdpwjcbhaahntof\",\"type\":\"lf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.daprSubscriptions().list("livwehsud", "mymbhdosmbng", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gxzduvxdmxe", response.iterator().next().pubsubName()); - Assertions.assertEquals("tmdm", response.iterator().next().topic()); - Assertions.assertEquals("senxoirxyd", response.iterator().next().deadLetterTopic()); - Assertions.assertEquals("oi", response.iterator().next().routes().rules().get(0).match()); - Assertions.assertEquals("kzsoxz", response.iterator().next().routes().rules().get(0).path()); - Assertions.assertEquals("mmqmtsjkyj", response.iterator().next().routes().defaultProperty()); - Assertions.assertEquals("wdonbexftedaubh", response.iterator().next().scopes().get(0)); - Assertions.assertEquals("xjmkanbclazofmex", response.iterator().next().metadata().get("te")); - Assertions.assertEquals(false, response.iterator().next().bulkSubscribe().enabled()); - Assertions.assertEquals(1407174157, response.iterator().next().bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(238054598, response.iterator().next().bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 1def27ae388c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,49 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; - -public final class DaprTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dapr model = BinaryData.fromString( - "{\"enabled\":true,\"appId\":\"ltiugcxnavv\",\"appProtocol\":\"http\",\"appPort\":1911413053,\"httpReadBufferSize\":1077177476,\"httpMaxRequestSize\":1643458041,\"logLevel\":\"info\",\"enableApiLogging\":false}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ltiugcxnavv", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(1911413053, model.appPort()); - Assertions.assertEquals(1077177476, model.httpReadBufferSize()); - Assertions.assertEquals(1643458041, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = new Dapr().withEnabled(true) - .withAppId("ltiugcxnavv") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(1911413053) - .withHttpReadBufferSize(1077177476) - .withHttpMaxRequestSize(1643458041) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(false); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ltiugcxnavv", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(1911413053, model.appPort()); - Assertions.assertEquals(1077177476, model.httpReadBufferSize()); - Assertions.assertEquals(1643458041, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java deleted file mode 100644 index 4c1a5c07ab92..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultAuthorizationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultAuthorizationPolicy model = BinaryData.fromString( - "{\"allowedPrincipals\":{\"groups\":[\"pbtoqcjmkl\",\"a\",\"bqidtqaj\"],\"identities\":[\"l\",\"kudjkrlkhb\",\"hfepgzgqex\"]},\"allowedApplications\":[\"c\",\"scpai\",\"rhhbcs\",\"l\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("pbtoqcjmkl", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("l", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("c", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model = new DefaultAuthorizationPolicy() - .withAllowedPrincipals(new AllowedPrincipals().withGroups(Arrays.asList("pbtoqcjmkl", "a", "bqidtqaj")) - .withIdentities(Arrays.asList("l", "kudjkrlkhb", "hfepgzgqex"))) - .withAllowedApplications(Arrays.asList("c", "scpai", "rhhbcs", "l")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("pbtoqcjmkl", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("l", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("c", model.allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java deleted file mode 100644 index bf17d8fa17a3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = BinaryData.fromString("{\"name\":\"tnpqmemczjk\",\"value\":\"ykyujxsg\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("tnpqmemczjk", model.name()); - Assertions.assertEquals("ykyujxsg", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = new DiagnosticDataProviderMetadataPropertyBagItem().withName("tnpqmemczjk").withValue("ykyujxsg"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("tnpqmemczjk", model.name()); - Assertions.assertEquals("ykyujxsg", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java deleted file mode 100644 index f437eb11d05a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadata model = BinaryData.fromString( - "{\"providerName\":\"lpjrtwsz\",\"propertyBag\":[{\"name\":\"icphvtrrmhw\",\"value\":\"fdpyflubh\"},{\"name\":\"glrocuy\",\"value\":\"whhmemhooc\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("lpjrtwsz", model.providerName()); - Assertions.assertEquals("icphvtrrmhw", model.propertyBag().get(0).name()); - Assertions.assertEquals("fdpyflubh", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = new DiagnosticDataProviderMetadata().withProviderName("lpjrtwsz") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("icphvtrrmhw").withValue("fdpyflubh"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("glrocuy").withValue("whhmemhooc"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("lpjrtwsz", model.providerName()); - Assertions.assertEquals("icphvtrrmhw", model.propertyBag().get(0).name()); - Assertions.assertEquals("fdpyflubh", model.propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java deleted file mode 100644 index 1c0cef5ce855..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseColumnTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseColumn model - = BinaryData.fromString("{\"columnName\":\"bvopwndyqle\",\"dataType\":\"lklmtkhlo\",\"columnType\":\"x\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("bvopwndyqle", model.columnName()); - Assertions.assertEquals("lklmtkhlo", model.dataType()); - Assertions.assertEquals("x", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = new DiagnosticDataTableResponseColumn().withColumnName("bvopwndyqle") - .withDataType("lklmtkhlo") - .withColumnType("x"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("bvopwndyqle", model.columnName()); - Assertions.assertEquals("lklmtkhlo", model.dataType()); - Assertions.assertEquals("x", model.columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java deleted file mode 100644 index 409c0a133fb3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseObject model = BinaryData.fromString( - "{\"tableName\":\"xuqibsxtkcudf\",\"columns\":[{\"columnName\":\"rfsiowlkjxn\",\"dataType\":\"vwgf\",\"columnType\":\"mhqykizmdksa\"},{\"columnName\":\"fcluqvo\",\"dataType\":\"ycjimryvwgcwwpbm\",\"columnType\":\"w\"}],\"rows\":[\"datadsxwefoh\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xuqibsxtkcudf", model.tableName()); - Assertions.assertEquals("rfsiowlkjxn", model.columns().get(0).columnName()); - Assertions.assertEquals("vwgf", model.columns().get(0).dataType()); - Assertions.assertEquals("mhqykizmdksa", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = new DiagnosticDataTableResponseObject().withTableName("xuqibsxtkcudf") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("rfsiowlkjxn") - .withDataType("vwgf") - .withColumnType("mhqykizmdksa"), - new DiagnosticDataTableResponseColumn().withColumnName("fcluqvo") - .withDataType("ycjimryvwgcwwpbm") - .withColumnType("w"))) - .withRows(Arrays.asList("datadsxwefoh")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xuqibsxtkcudf", model.tableName()); - Assertions.assertEquals("rfsiowlkjxn", model.columns().get(0).columnName()); - Assertions.assertEquals("vwgf", model.columns().get(0).dataType()); - Assertions.assertEquals("mhqykizmdksa", model.columns().get(0).columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java deleted file mode 100644 index 271b099cdd4c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticRenderingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticRendering model = BinaryData - .fromString("{\"type\":1451303679,\"title\":\"rdfjmzsyzfhotl\",\"description\":\"k\",\"isVisible\":true}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(1451303679, model.type()); - Assertions.assertEquals("rdfjmzsyzfhotl", model.title()); - Assertions.assertEquals("k", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = new DiagnosticRendering().withType(1451303679) - .withTitle("rdfjmzsyzfhotl") - .withDescription("k") - .withIsVisible(true); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(1451303679, model.type()); - Assertions.assertEquals("rdfjmzsyzfhotl", model.title()); - Assertions.assertEquals("k", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index 040a7fbc41f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = BinaryData.fromString("{\"id\":\"tfgxqbawpcb\",\"pesId\":\"zqcyknap\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticSupportTopic model = new DiagnosticSupportTopic(); - model = BinaryData.fromObject(model).toObject(DiagnosticSupportTopic.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java deleted file mode 100644 index f8f078f239d8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java +++ /dev/null @@ -1,107 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"kifmjn\",\"name\":\"wtqabpxuckp\",\"description\":\"qoweyirdhl\",\"author\":\"ngwflqqmpizruwn\",\"category\":\"xpxiwfcngjs\",\"supportTopicList\":[{}],\"analysisTypes\":[\"xtmkzjvkviir\",\"gfgrwsdp\",\"ra\",\"zvzbglbyv\"],\"type\":\"tctbrxkjzwrgxffm\",\"score\":41.11345},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"bydpizqaclnapxb\",\"statusId\":504122160},\"dataProviderMetadata\":{\"providerName\":\"gjkn\",\"propertyBag\":[{},{}]}},\"id\":\"cttuxuu\",\"name\":\"i\",\"type\":\"flqo\"},{\"properties\":{\"metadata\":{\"id\":\"rehmr\",\"name\":\"hvsujztc\",\"description\":\"tqjtwhauu\",\"author\":\"prnjletlxsmr\",\"category\":\"do\",\"supportTopicList\":[{}],\"analysisTypes\":[\"owa\",\"iynknlq\",\"zdvpiw\",\"xqszdtmaajquh\"],\"type\":\"ylr\",\"score\":3.5013914},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"p\",\"statusId\":26175151},\"dataProviderMetadata\":{\"providerName\":\"kyjpmspbps\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"pyogtieyuj\",\"name\":\"vczkcnyxrxmunjd\",\"type\":\"vg\"},{\"properties\":{\"metadata\":{\"id\":\"xl\",\"name\":\"aglqivbgkcvkh\",\"description\":\"vuqd\",\"author\":\"voniypfp\",\"category\":\"cpzgpxtiv\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"dibgqjxgpnrhgov\",\"gpikqmh\",\"ao\"],\"type\":\"rmzvupo\",\"score\":95.10622},\"dataset\":[{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"vkfvxcnqmxqpswok\",\"statusId\":1070878319},\"dataProviderMetadata\":{\"providerName\":\"ggdhbemzqkzszuw\",\"propertyBag\":[{},{}]}},\"id\":\"lxxhljfp\",\"name\":\"picrmnzhrgmqgjsx\",\"type\":\"pqcbfrmbodthsq\"},{\"properties\":{\"metadata\":{\"id\":\"iibakcl\",\"name\":\"jfrnxousxauzlwv\",\"description\":\"mwohqfzizvuxmmkj\",\"author\":\"thnwpzte\",\"category\":\"vmribiat\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"cfotangcfhnykzcu\",\"swvxwlmzqwmv\",\"xnjmxm\"],\"type\":\"qudtcvclx\",\"score\":26.504374},\"dataset\":[{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"buiyji\",\"statusId\":850664792},\"dataProviderMetadata\":{\"providerName\":\"dugneiknp\",\"propertyBag\":[{},{}]}},\"id\":\"jiuqhibtozi\",\"name\":\"qw\",\"type\":\"edmurrxxge\"}],\"nextLink\":\"ktvqylkmqpzoy\"}") - .toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("xtmkzjvkviir", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("bydpizqaclnapxb", model.value().get(0).properties().status().message()); - Assertions.assertEquals(504122160, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("gjkn", model.value().get(0).properties().dataProviderMetadata().providerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsCollectionInner model = new DiagnosticsCollectionInner().withValue(Arrays.asList( - new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xtmkzjvkviir", "gfgrwsdp", "ra", "zvzbglbyv"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("bydpizqaclnapxb").withStatusId(504122160)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("gjkn") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("owa", "iynknlq", "zdvpiw", "xqszdtmaajquh"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("p").withStatusId(26175151)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("kyjpmspbps") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("dibgqjxgpnrhgov", "gpikqmh", "ao"))) - .withDataset(Arrays - .asList(new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("vkfvxcnqmxqpswok").withStatusId(1070878319)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata() - .withProviderName("ggdhbemzqkzszuw") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic(), - new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("cfotangcfhnykzcu", "swvxwlmzqwmv", "xnjmxm"))) - .withDataset( - Arrays.asList(new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("buiyji").withStatusId(850664792)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("dugneiknp") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("xtmkzjvkviir", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("bydpizqaclnapxb", model.value().get(0).properties().status().message()); - Assertions.assertEquals(504122160, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("gjkn", model.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index dac0f6e4e67f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,63 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDataApiResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDataApiResponse model = BinaryData.fromString( - "{\"table\":{\"tableName\":\"yuicdhzbdy\",\"columns\":[{\"columnName\":\"bdvibidmhmwffpl\",\"dataType\":\"u\",\"columnType\":\"pckc\"},{\"columnName\":\"rv\",\"dataType\":\"yoxoy\",\"columnType\":\"k\"},{\"columnName\":\"aimmoiroqb\",\"dataType\":\"hbragapyyr\",\"columnType\":\"svbpavbopfppdbwn\"},{\"columnName\":\"gahxkumasjcaa\",\"dataType\":\"dmmcpugmehqep\",\"columnType\":\"fhbzehewhoqhn\"}],\"rows\":[\"datanbldxeaclgschori\",\"datakrsrrmoucs\"]},\"renderingProperties\":{\"type\":1831822639,\"title\":\"uviyfcaabeo\",\"description\":\"bh\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("yuicdhzbdy", model.table().tableName()); - Assertions.assertEquals("bdvibidmhmwffpl", model.table().columns().get(0).columnName()); - Assertions.assertEquals("u", model.table().columns().get(0).dataType()); - Assertions.assertEquals("pckc", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1831822639, model.renderingProperties().type()); - Assertions.assertEquals("uviyfcaabeo", model.renderingProperties().title()); - Assertions.assertEquals("bh", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDataApiResponse model = new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("yuicdhzbdy") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("bdvibidmhmwffpl") - .withDataType("u") - .withColumnType("pckc"), - new DiagnosticDataTableResponseColumn().withColumnName("rv") - .withDataType("yoxoy") - .withColumnType("k"), - new DiagnosticDataTableResponseColumn().withColumnName("aimmoiroqb") - .withDataType("hbragapyyr") - .withColumnType("svbpavbopfppdbwn"), - new DiagnosticDataTableResponseColumn().withColumnName("gahxkumasjcaa") - .withDataType("dmmcpugmehqep") - .withColumnType("fhbzehewhoqhn"))) - .withRows(Arrays.asList("datanbldxeaclgschori", "datakrsrrmoucs"))) - .withRenderingProperties(new DiagnosticRendering().withType(1831822639) - .withTitle("uviyfcaabeo") - .withDescription("bh") - .withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("yuicdhzbdy", model.table().tableName()); - Assertions.assertEquals("bdvibidmhmwffpl", model.table().columns().get(0).columnName()); - Assertions.assertEquals("u", model.table().columns().get(0).dataType()); - Assertions.assertEquals("pckc", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1831822639, model.renderingProperties().type()); - Assertions.assertEquals("uviyfcaabeo", model.renderingProperties().title()); - Assertions.assertEquals("bh", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java deleted file mode 100644 index 46a0442c6671..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDefinition model = BinaryData.fromString( - "{\"id\":\"ddm\",\"name\":\"huytxzvtzn\",\"description\":\"xbannovvoxc\",\"author\":\"tprwnw\",\"category\":\"oevytlyokr\",\"supportTopicList\":[{\"id\":\"uxvnsasbcrymodi\",\"pesId\":\"xkl\"}],\"analysisTypes\":[\"xnazpmkml\"],\"type\":\"evfxzopjhbzxlioh\",\"score\":9.690398}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("xnazpmkml", model.analysisTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDefinition model - = new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xnazpmkml")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("xnazpmkml", model.analysisTypes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java deleted file mode 100644 index ad07a2ee1e17..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,109 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsInner model = BinaryData.fromString( - "{\"properties\":{\"metadata\":{\"id\":\"cgwgcloxoebqinji\",\"name\":\"wjfuj\",\"description\":\"afcba\",\"author\":\"pzpofoiyjw\",\"category\":\"ilkmk\",\"supportTopicList\":[{\"id\":\"vdndviauo\",\"pesId\":\"huartv\"},{\"id\":\"ukyefchnmnahmnxh\",\"pesId\":\"jqirwrw\"}],\"analysisTypes\":[\"xffi\",\"hx\"],\"type\":\"snewmozqvbub\",\"score\":81.654564},\"dataset\":[{\"table\":{\"tableName\":\"cx\",\"columns\":[{}],\"rows\":[\"datazttaboidvmf\",\"datahppubowsepdfgkmt\",\"dataherngb\",\"datac\"]},\"renderingProperties\":{\"type\":812344780,\"title\":\"kqtob\",\"description\":\"uxofshfphwpnulai\",\"isVisible\":true}},{\"table\":{\"tableName\":\"ywhslwkojpllndnp\",\"columns\":[{},{}],\"rows\":[\"dataafgfugsnn\",\"datahyet\",\"datafypococtfjgti\",\"datarjvzuyt\"]},\"renderingProperties\":{\"type\":1360541233,\"title\":\"uowolbauiropi\",\"description\":\"szonwpngajinn\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rtmjfj\",\"columns\":[{},{},{},{}],\"rows\":[\"datalzhcoxovnekh\",\"datanlusfnrd\",\"datajxtxrdc\",\"datatjvidt\"]},\"renderingProperties\":{\"type\":1839935404,\"title\":\"slvyjtcvuwkasi\",\"description\":\"esfuught\",\"isVisible\":true}}],\"status\":{\"message\":\"jxeygtuhxu\",\"statusId\":1045251485},\"dataProviderMetadata\":{\"providerName\":\"wmrswnjlxuzrh\",\"propertyBag\":[{\"name\":\"xjbaqehgpdohzjq\",\"value\":\"ucoig\"},{\"name\":\"xncnwfe\",\"value\":\"nwgfmxjgcgbjbgd\"},{\"name\":\"gtdysnaqu\",\"value\":\"qbctqha\"}]}},\"id\":\"jrwdkqz\",\"name\":\"qy\",\"type\":\"leziunjxdfzant\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("xffi", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("cx", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(812344780, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("kqtob", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("uxofshfphwpnulai", - model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jxeygtuhxu", model.properties().status().message()); - Assertions.assertEquals(1045251485, model.properties().status().statusId()); - Assertions.assertEquals("wmrswnjlxuzrh", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("xjbaqehgpdohzjq", - model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ucoig", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsInner model - = new DiagnosticsInner() - .withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xffi", "hx"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject().withTableName("cx") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datazttaboidvmf", "datahppubowsepdfgkmt", "dataherngb", - "datac"))) - .withRenderingProperties(new DiagnosticRendering() - .withType(812344780) - .withTitle("kqtob") - .withDescription("uxofshfphwpnulai") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("ywhslwkojpllndnp") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows( - Arrays.asList("dataafgfugsnn", "datahyet", "datafypococtfjgti", "datarjvzuyt"))) - .withRenderingProperties( - new DiagnosticRendering().withType(1360541233) - .withTitle("uowolbauiropi") - .withDescription("szonwpngajinn") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("rtmjfj") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows( - Arrays.asList("datalzhcoxovnekh", "datanlusfnrd", "datajxtxrdc", "datatjvidt"))) - .withRenderingProperties(new DiagnosticRendering().withType(1839935404) - .withTitle("slvyjtcvuwkasi") - .withDescription("esfuught") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("jxeygtuhxu").withStatusId(1045251485)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("wmrswnjlxuzrh") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("xjbaqehgpdohzjq") - .withValue("ucoig"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("xncnwfe") - .withValue("nwgfmxjgcgbjbgd"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("gtdysnaqu") - .withValue("qbctqha"))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("xffi", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("cx", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(812344780, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("kqtob", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("uxofshfphwpnulai", - model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jxeygtuhxu", model.properties().status().message()); - Assertions.assertEquals(1045251485, model.properties().status().statusId()); - Assertions.assertEquals("wmrswnjlxuzrh", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("xjbaqehgpdohzjq", - model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ucoig", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index 6b17742f00b9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,109 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsProperties model = BinaryData.fromString( - "{\"metadata\":{\"id\":\"eg\",\"name\":\"mlbnseq\",\"description\":\"jjvpilguooqja\",\"author\":\"d\",\"category\":\"gueiookjbsahrtdt\",\"supportTopicList\":[{\"id\":\"qacsl\",\"pesId\":\"toebnf\"},{\"id\":\"f\",\"pesId\":\"jkgd\"},{\"id\":\"azftxejwabmdujtm\",\"pesId\":\"op\"}],\"analysisTypes\":[\"m\"],\"type\":\"rbuhhlky\",\"score\":71.514824},\"dataset\":[{\"table\":{\"tableName\":\"gtuwkff\",\"columns\":[{\"columnName\":\"sysidfvclglxnf\",\"dataType\":\"jtkbusqogsfika\",\"columnType\":\"ansharujtjiqxfz\"},{\"columnName\":\"qttv\",\"dataType\":\"pqhjpenuygbqeqq\",\"columnType\":\"ewvnqvcdlgu\"},{\"columnName\":\"cmfdjwnlax\",\"dataType\":\"njqikcz\",\"columnType\":\"itacgxmfcsserx\"},{\"columnName\":\"vs\",\"dataType\":\"hlwntsjgq\",\"columnType\":\"xypruuuy\"}],\"rows\":[\"datahrszi\",\"dataoyuelyetn\"]},\"renderingProperties\":{\"type\":1833939931,\"title\":\"yggagflnlgmt\",\"description\":\"ahzjmucftb\",\"isVisible\":true}},{\"table\":{\"tableName\":\"ohkpigqfu\",\"columns\":[{\"columnName\":\"zmkw\",\"dataType\":\"snoxaxmqeqa\",\"columnType\":\"hjnhgwydyynfsvk\"},{\"columnName\":\"bvqt\",\"dataType\":\"arfdlpukhpyrnei\",\"columnType\":\"cpeogkhnmgbrou\"},{\"columnName\":\"dbhfhp\",\"dataType\":\"azjzo\",\"columnType\":\"jxhpdulontacn\"}],\"rows\":[\"datatehtuevrhrljyoog\"]},\"renderingProperties\":{\"type\":705670671,\"title\":\"duugwbsre\",\"description\":\"fqkfuarenl\",\"isVisible\":false}}],\"status\":{\"message\":\"lnvnafvvkyfedev\",\"statusId\":972204015},\"dataProviderMetadata\":{\"providerName\":\"cqxypokkhminq\",\"propertyBag\":[{\"name\":\"zng\",\"value\":\"dxxewuninv\"},{\"name\":\"bchaqd\",\"value\":\"qecrqctmxx\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("m", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("gtuwkff", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("sysidfvclglxnf", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("jtkbusqogsfika", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("ansharujtjiqxfz", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1833939931, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("yggagflnlgmt", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("ahzjmucftb", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("lnvnafvvkyfedev", model.status().message()); - Assertions.assertEquals(972204015, model.status().statusId()); - Assertions.assertEquals("cqxypokkhminq", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("zng", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("dxxewuninv", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsProperties model = new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic(), - new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("m"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("gtuwkff") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("sysidfvclglxnf") - .withDataType("jtkbusqogsfika") - .withColumnType("ansharujtjiqxfz"), - new DiagnosticDataTableResponseColumn().withColumnName("qttv") - .withDataType("pqhjpenuygbqeqq") - .withColumnType("ewvnqvcdlgu"), - new DiagnosticDataTableResponseColumn().withColumnName("cmfdjwnlax") - .withDataType("njqikcz") - .withColumnType("itacgxmfcsserx"), - new DiagnosticDataTableResponseColumn().withColumnName("vs") - .withDataType("hlwntsjgq") - .withColumnType("xypruuuy"))) - .withRows(Arrays.asList("datahrszi", "dataoyuelyetn"))) - .withRenderingProperties(new DiagnosticRendering().withType(1833939931) - .withTitle("yggagflnlgmt") - .withDescription("ahzjmucftb") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("ohkpigqfu") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("zmkw") - .withDataType("snoxaxmqeqa") - .withColumnType("hjnhgwydyynfsvk"), - new DiagnosticDataTableResponseColumn().withColumnName("bvqt") - .withDataType("arfdlpukhpyrnei") - .withColumnType("cpeogkhnmgbrou"), - new DiagnosticDataTableResponseColumn().withColumnName("dbhfhp") - .withDataType("azjzo") - .withColumnType("jxhpdulontacn"))) - .withRows(Arrays.asList("datatehtuevrhrljyoog"))) - .withRenderingProperties(new DiagnosticRendering().withType(705670671) - .withTitle("duugwbsre") - .withDescription("fqkfuarenl") - .withIsVisible(false)))) - .withStatus(new DiagnosticsStatus().withMessage("lnvnafvvkyfedev").withStatusId(972204015)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("cqxypokkhminq") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("zng").withValue("dxxewuninv"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("bchaqd").withValue("qecrqctmxx")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("m", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("gtuwkff", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("sysidfvclglxnf", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("jtkbusqogsfika", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("ansharujtjiqxfz", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1833939931, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("yggagflnlgmt", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("ahzjmucftb", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("lnvnafvvkyfedev", model.status().message()); - Assertions.assertEquals(972204015, model.status().statusId()); - Assertions.assertEquals("cqxypokkhminq", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("zng", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("dxxewuninv", model.dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java deleted file mode 100644 index 79840cc61edc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsStatus model - = BinaryData.fromString("{\"message\":\"h\",\"statusId\":963815011}").toObject(DiagnosticsStatus.class); - Assertions.assertEquals("h", model.message()); - Assertions.assertEquals(963815011, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("h").withStatusId(963815011); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("h", model.message()); - Assertions.assertEquals(963815011, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java deleted file mode 100644 index ee22a42a2e34..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"vcrrpcj\",\"value\":\"bstvje\"}") - .toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("vcrrpcj", model.propertyName()); - Assertions.assertEquals("bstvje", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentConfigurationProperty model - = new DotNetComponentConfigurationProperty().withPropertyName("vcrrpcj").withValue("bstvje"); - model = BinaryData.fromObject(model).toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("vcrrpcj", model.propertyName()); - Assertions.assertEquals("bstvje", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java deleted file mode 100644 index 3ee90151a6f3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java +++ /dev/null @@ -1,45 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"dzbenri\",\"value\":\"awetzq\"}],\"serviceBinds\":[{\"name\":\"wflj\",\"serviceId\":\"namtuatmzw\"},{\"name\":\"jncqtjzmi\",\"serviceId\":\"gbgatzuuvbxn\"},{\"name\":\"ebwgga\",\"serviceId\":\"tzlswvaj\"},{\"name\":\"utlxjoqzasunwqrj\",\"serviceId\":\"rg\"}]},\"id\":\"aohcmbuocn\",\"name\":\"r\",\"type\":\"hmbpyryxamebly\"}") - .toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("dzbenri", model.configurations().get(0).propertyName()); - Assertions.assertEquals("awetzq", model.configurations().get(0).value()); - Assertions.assertEquals("wflj", model.serviceBinds().get(0).name()); - Assertions.assertEquals("namtuatmzw", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentInner model = new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays - .asList(new DotNetComponentConfigurationProperty().withPropertyName("dzbenri").withValue("awetzq"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("wflj").withServiceId("namtuatmzw"), - new DotNetComponentServiceBind().withName("jncqtjzmi").withServiceId("gbgatzuuvbxn"), - new DotNetComponentServiceBind().withName("ebwgga").withServiceId("tzlswvaj"), - new DotNetComponentServiceBind().withName("utlxjoqzasunwqrj").withServiceId("rg"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("dzbenri", model.configurations().get(0).propertyName()); - Assertions.assertEquals("awetzq", model.configurations().get(0).value()); - Assertions.assertEquals("wflj", model.serviceBinds().get(0).name()); - Assertions.assertEquals("namtuatmzw", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java deleted file mode 100644 index 9ce139cef219..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java +++ /dev/null @@ -1,46 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"ocxnehvsmtodl\",\"value\":\"yapucygvoa\"}],\"serviceBinds\":[{\"name\":\"ssxlghieegjlg\",\"serviceId\":\"paseksgb\"},{\"name\":\"antuygdhgaqipirp\",\"serviceId\":\"rqofulopmjnlexwh\"},{\"name\":\"jpib\",\"serviceId\":\"phuuuerctato\"},{\"name\":\"ntqpbr\",\"serviceId\":\"yrduczkgofxyfsr\"}]}") - .toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("ocxnehvsmtodl", model.configurations().get(0).propertyName()); - Assertions.assertEquals("yapucygvoa", model.configurations().get(0).value()); - Assertions.assertEquals("ssxlghieegjlg", model.serviceBinds().get(0).name()); - Assertions.assertEquals("paseksgb", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentProperties model = new DotNetComponentProperties() - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("ocxnehvsmtodl").withValue("yapucygvoa"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("ssxlghieegjlg").withServiceId("paseksgb"), - new DotNetComponentServiceBind().withName("antuygdhgaqipirp").withServiceId("rqofulopmjnlexwh"), - new DotNetComponentServiceBind().withName("jpib").withServiceId("phuuuerctato"), - new DotNetComponentServiceBind().withName("ntqpbr").withServiceId("yrduczkgofxyfsr"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("ocxnehvsmtodl", model.configurations().get(0).propertyName()); - Assertions.assertEquals("yapucygvoa", model.configurations().get(0).value()); - Assertions.assertEquals("ssxlghieegjlg", model.serviceBinds().get(0).name()); - Assertions.assertEquals("paseksgb", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java deleted file mode 100644 index d199f6412886..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentServiceBind model - = BinaryData.fromString("{\"name\":\"nrmvvfkoxmlghk\",\"serviceId\":\"idvrmaz\"}") - .toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("nrmvvfkoxmlghk", model.name()); - Assertions.assertEquals("idvrmaz", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentServiceBind model - = new DotNetComponentServiceBind().withName("nrmvvfkoxmlghk").withServiceId("idvrmaz"); - model = BinaryData.fromObject(model).toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("nrmvvfkoxmlghk", model.name()); - Assertions.assertEquals("idvrmaz", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java deleted file mode 100644 index e36a36260507..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java +++ /dev/null @@ -1,83 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qedikdfrd\",\"value\":\"qmrjg\"},{\"propertyName\":\"hfqlgg\",\"value\":\"iwzcxmjpbyeph\"},{\"propertyName\":\"t\",\"value\":\"j\"}],\"serviceBinds\":[{\"name\":\"yfqi\",\"serviceId\":\"xhnpo\"},{\"name\":\"qwcabvnui\",\"serviceId\":\"ey\"},{\"name\":\"wlpaugmrmfjlrxwt\",\"serviceId\":\"ukhfkvc\"},{\"name\":\"izmoaeds\",\"serviceId\":\"wuived\"}]},\"id\":\"gyeewxeiq\",\"name\":\"psmgo\",\"type\":\"guamlj\"},{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"gaufcs\",\"value\":\"vnewgnxkympqanx\"},{\"propertyName\":\"kixtwbtaoy\",\"value\":\"yghs\"},{\"propertyName\":\"cyl\",\"value\":\"gmnsghpxy\"},{\"propertyName\":\"hdrwjjkh\",\"value\":\"omacluzvxnqmhr\"}],\"serviceBinds\":[{\"name\":\"fwmkoisqcssffxui\",\"serviceId\":\"csypobkdqzrdzsyl\"}]},\"id\":\"lgtrczzy\",\"name\":\"mxzjijpvua\",\"type\":\"rkihcirld\"},{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"b\",\"value\":\"ja\"},{\"propertyName\":\"rnnqb\",\"value\":\"bpizxqltgr\"}],\"serviceBinds\":[{\"name\":\"pxrxvbfihwu\",\"serviceId\":\"ctafsrbxrblm\"},{\"name\":\"owxih\",\"serviceId\":\"nxw\"},{\"name\":\"gnepz\",\"serviceId\":\"klsbsbqqqagw\"},{\"name\":\"xaomzisglrrc\",\"serviceId\":\"zkhhltnjadhqo\"}]},\"id\":\"jqoyueayfbpcm\",\"name\":\"plby\",\"type\":\"rueqthwm\"},{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"igdhxiidlo\",\"value\":\"dbwdpyqyybxubmdn\"},{\"propertyName\":\"cbq\",\"value\":\"e\"},{\"propertyName\":\"ela\",\"value\":\"cigeleohdbvqvw\"}],\"serviceBinds\":[{\"name\":\"pwbeonr\",\"serviceId\":\"wzdqybxceakxcpts\"},{\"name\":\"fyiaseqch\",\"serviceId\":\"ttzrazisgyki\"},{\"name\":\"mvanbwzo\",\"serviceId\":\"nrxxbsojklin\"},{\"name\":\"dptysprqs\",\"serviceId\":\"zxojpslsv\"}]},\"id\":\"pli\",\"name\":\"fiqwoy\",\"type\":\"qvapcohhoucq\"}],\"nextLink\":\"oj\"}") - .toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("qedikdfrd", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("qmrjg", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("yfqi", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("xhnpo", model.value().get(0).serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentsCollection model - = new DotNetComponentsCollection().withValue(Arrays.asList( - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("qedikdfrd").withValue("qmrjg"), - new DotNetComponentConfigurationProperty().withPropertyName("hfqlgg") - .withValue("iwzcxmjpbyeph"), - new DotNetComponentConfigurationProperty().withPropertyName("t").withValue("j"))) - .withServiceBinds(Arrays.asList( - new DotNetComponentServiceBind().withName("yfqi").withServiceId("xhnpo"), - new DotNetComponentServiceBind().withName("qwcabvnui").withServiceId("ey"), - new DotNetComponentServiceBind().withName("wlpaugmrmfjlrxwt").withServiceId("ukhfkvc"), - new DotNetComponentServiceBind().withName("izmoaeds").withServiceId("wuived"))), - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("gaufcs") - .withValue("vnewgnxkympqanx"), - new DotNetComponentConfigurationProperty().withPropertyName("kixtwbtaoy").withValue("yghs"), - new DotNetComponentConfigurationProperty().withPropertyName("cyl").withValue("gmnsghpxy"), - new DotNetComponentConfigurationProperty().withPropertyName("hdrwjjkh") - .withValue("omacluzvxnqmhr"))) - .withServiceBinds(Arrays - .asList(new DotNetComponentServiceBind().withName("fwmkoisqcssffxui") - .withServiceId("csypobkdqzrdzsyl"))), - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations( - Arrays.asList(new DotNetComponentConfigurationProperty().withPropertyName("b").withValue("ja"), - new DotNetComponentConfigurationProperty().withPropertyName("rnnqb") - .withValue("bpizxqltgr"))) - .withServiceBinds(Arrays.asList( - new DotNetComponentServiceBind().withName("pxrxvbfihwu").withServiceId("ctafsrbxrblm"), - new DotNetComponentServiceBind().withName("owxih").withServiceId("nxw"), - new DotNetComponentServiceBind().withName("gnepz").withServiceId("klsbsbqqqagw"), - new DotNetComponentServiceBind().withName("xaomzisglrrc").withServiceId("zkhhltnjadhqo"))), - new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("igdhxiidlo") - .withValue("dbwdpyqyybxubmdn"), - new DotNetComponentConfigurationProperty().withPropertyName("cbq").withValue("e"), - new DotNetComponentConfigurationProperty().withPropertyName("ela").withValue("cigeleohdbvqvw"))) - .withServiceBinds(Arrays.asList( - new DotNetComponentServiceBind().withName("pwbeonr").withServiceId("wzdqybxceakxcpts"), - new DotNetComponentServiceBind().withName("fyiaseqch").withServiceId("ttzrazisgyki"), - new DotNetComponentServiceBind().withName("mvanbwzo").withServiceId("nrxxbsojklin"), - new DotNetComponentServiceBind().withName("dptysprqs").withServiceId("zxojpslsv"))))); - model = BinaryData.fromObject(model).toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("qedikdfrd", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("qmrjg", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("yfqi", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("xhnpo", model.value().get(0).serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index e4bc5938e301..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,59 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DotNetComponentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"zdqiqdlrat\",\"value\":\"wxoauwxsuy\"},{\"propertyName\":\"nhrfgslgl\",\"value\":\"ry\"},{\"propertyName\":\"zihuioaeo\",\"value\":\"ajtfey\"}],\"serviceBinds\":[{\"name\":\"gdd\",\"serviceId\":\"hdccxb\"},{\"name\":\"uqutkzwtjww\",\"serviceId\":\"zytijcx\"}]},\"id\":\"ondegjdydhqkkk\",\"name\":\"juck\",\"type\":\"a\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DotNetComponent response - = manager.dotNetComponents() - .define("ceeg") - .withExistingManagedEnvironment("ovyzt", "lnomfpb") - .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("nji").withValue("ukkrehyh"), - new DotNetComponentConfigurationProperty().withPropertyName("joduifvulxfaryrv") - .withValue("gdezvjqwahoy"), - new DotNetComponentConfigurationProperty().withPropertyName("axqvjweiwtczkddn") - .withValue("vbooqbmdqrxy"), - new DotNetComponentConfigurationProperty().withPropertyName("ae").withValue("cflwtjdtlr"))) - .withServiceBinds(Arrays - .asList(new DotNetComponentServiceBind().withName("oyycuxdtz").withServiceId("ipsdudgcozzomehx"))) - .create(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.componentType()); - Assertions.assertEquals("zdqiqdlrat", response.configurations().get(0).propertyName()); - Assertions.assertEquals("wxoauwxsuy", response.configurations().get(0).value()); - Assertions.assertEquals("gdd", response.serviceBinds().get(0).name()); - Assertions.assertEquals("hdccxb", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java deleted file mode 100644 index adacbcf374c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -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 DotNetComponentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"nqifb\",\"value\":\"troiauesugmo\"},{\"propertyName\":\"cjycb\",\"value\":\"lrgttwfldsiuor\"},{\"propertyName\":\"ikcedpk\",\"value\":\"iwm\"}],\"serviceBinds\":[{\"name\":\"rx\",\"serviceId\":\"qvvyczyay\"}]},\"id\":\"tg\",\"name\":\"bxiqahragpxmibpl\",\"type\":\"upoyryefqm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DotNetComponent response = manager.dotNetComponents() - .getWithResponse("qoq", "umov", "fbpbvzopaxmfmvsm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.componentType()); - Assertions.assertEquals("nqifb", response.configurations().get(0).propertyName()); - Assertions.assertEquals("troiauesugmo", response.configurations().get(0).value()); - Assertions.assertEquals("rx", response.serviceBinds().get(0).name()); - Assertions.assertEquals("qvvyczyay", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java deleted file mode 100644 index e5513afe5c84..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -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 DotNetComponentsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"i\",\"value\":\"vfph\"},{\"propertyName\":\"zxplgtpvdvatlz\",\"value\":\"schnzrsbkkzov\"}],\"serviceBinds\":[{\"name\":\"nfmf\",\"serviceId\":\"xafofuworimmo\"},{\"name\":\"wdehk\",\"serviceId\":\"vh\"}]},\"id\":\"ovanyrva\",\"name\":\"rtgelg\",\"type\":\"ewikfyaqandmym\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.dotNetComponents().list("zmec", "yrzwim", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.iterator().next().componentType()); - Assertions.assertEquals("i", response.iterator().next().configurations().get(0).propertyName()); - Assertions.assertEquals("vfph", response.iterator().next().configurations().get(0).value()); - Assertions.assertEquals("nfmf", response.iterator().next().serviceBinds().get(0).name()); - Assertions.assertEquals("xafofuworimmo", response.iterator().next().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DynamicPoolConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DynamicPoolConfigurationTests.java deleted file mode 100644 index 8487edf4f75c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DynamicPoolConfigurationTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExecutionType; -import org.junit.jupiter.api.Assertions; - -public final class DynamicPoolConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DynamicPoolConfiguration model - = BinaryData.fromString("{\"executionType\":\"Timed\",\"cooldownPeriodInSeconds\":746023712}") - .toObject(DynamicPoolConfiguration.class); - Assertions.assertEquals(ExecutionType.TIMED, model.executionType()); - Assertions.assertEquals(746023712, model.cooldownPeriodInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DynamicPoolConfiguration model = new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED) - .withCooldownPeriodInSeconds(746023712); - model = BinaryData.fromObject(model).toObject(DynamicPoolConfiguration.class); - Assertions.assertEquals(ExecutionType.TIMED, model.executionType()); - Assertions.assertEquals(746023712, model.cooldownPeriodInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java deleted file mode 100644 index 7e7c64b51950..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariable model - = BinaryData.fromString("{\"name\":\"bdagxt\",\"value\":\"bqdxbx\"}").toObject(EnvironmentVariable.class); - Assertions.assertEquals("bdagxt", model.name()); - Assertions.assertEquals("bqdxbx", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariable model = new EnvironmentVariable().withName("bdagxt").withValue("bqdxbx"); - model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); - Assertions.assertEquals("bdagxt", model.name()); - Assertions.assertEquals("bqdxbx", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index 00e76cbc1dad..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"wuoegrpk\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("wuoegrpk", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model - = new ExtendedLocation().withName("wuoegrpk").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("wuoegrpk", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java deleted file mode 100644 index 128be3fa547c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; - -public final class ForwardProxyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForwardProxy model = BinaryData.fromString( - "{\"convention\":\"Custom\",\"customHostHeaderName\":\"umasxazjpq\",\"customProtoHeaderName\":\"gual\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("umasxazjpq", model.customHostHeaderName()); - Assertions.assertEquals("gual", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = new ForwardProxy().withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("umasxazjpq") - .withCustomProtoHeaderName("gual"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("umasxazjpq", model.customHostHeaderName()); - Assertions.assertEquals("gual", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.java deleted file mode 100644 index c1476a56cf87..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -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 FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests { - @Test - public void testInvokeFunctionsHostWithResponse() throws Exception { - String responseStr = "\"rptvcshtkutzcttb\""; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - String response = manager.functionsExtensions() - .invokeFunctionsHostWithResponse("uqbhpowcnxtpzdly", "eidtoakatp", "ytgrhzbqfd", "fa", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rptvcshtkutzcttb", response); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java deleted file mode 100644 index 17ce4d5cadf3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GlobalValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GlobalValidation model = BinaryData.fromString( - "{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"s\",\"excludedPaths\":[\"bquxigjy\",\"gzjaoyfhrtxilne\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("s", model.redirectToProvider()); - Assertions.assertEquals("bquxigjy", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model - = new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("s") - .withExcludedPaths(Arrays.asList("bquxigjy", "gzjaoyfhrtxilne")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("s", model.redirectToProvider()); - Assertions.assertEquals("bquxigjy", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java deleted file mode 100644 index a50eb82e0d80..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.HeaderMatchMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatchMatch model = BinaryData.fromString( - "{\"exactMatch\":\"wjzrnfygxgisp\",\"prefixMatch\":\"vtz\",\"suffixMatch\":\"ufubl\",\"regexMatch\":\"fxqeof\"}") - .toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatchMatch model = new HeaderMatchMatch().withExactMatch("wjzrnfygxgisp") - .withPrefixMatch("vtz") - .withSuffixMatch("ufubl") - .withRegexMatch("fxqeof"); - model = BinaryData.fromObject(model).toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java deleted file mode 100644 index 47d423d7c17a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HeaderMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatch model = BinaryData.fromString( - "{\"header\":\"uybbkpodep\",\"match\":{\"exactMatch\":\"inuvamiheogn\",\"prefixMatch\":\"xzxtheo\",\"suffixMatch\":\"si\",\"regexMatch\":\"evcciqihnhun\"}}") - .toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatch model = new HeaderMatch().withHeaderProperty("uybbkpodep") - .withExactMatch("inuvamiheogn") - .withPrefixMatch("xzxtheo") - .withSuffixMatch("si") - .withRegexMatch("evcciqihnhun"); - model = BinaryData.fromObject(model).toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java deleted file mode 100644 index 5662a4ebc19c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class HttpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpConnectionPool model - = BinaryData.fromString("{\"http1MaxPendingRequests\":5903092,\"http2MaxRequests\":1154409847}") - .toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpConnectionPool model - = new HttpConnectionPool().withHttp1MaxPendingRequests(5903092).withHttp2MaxRequests(1154409847); - model = BinaryData.fromObject(model).toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java deleted file mode 100644 index 117a9ffcc6c9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpGet model = BinaryData - .fromString("{\"url\":\"wzizxbmpgcjefuzm\",\"fileName\":\"pbttdum\",\"headers\":[\"pxebmnzbt\"]}") - .toObject(HttpGet.class); - Assertions.assertEquals("wzizxbmpgcjefuzm", model.url()); - Assertions.assertEquals("pbttdum", model.fileName()); - Assertions.assertEquals("pxebmnzbt", model.headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpGet model - = new HttpGet().withUrl("wzizxbmpgcjefuzm").withFileName("pbttdum").withHeaders(Arrays.asList("pxebmnzbt")); - model = BinaryData.fromObject(model).toObject(HttpGet.class); - Assertions.assertEquals("wzizxbmpgcjefuzm", model.url()); - Assertions.assertEquals("pbttdum", model.fileName()); - Assertions.assertEquals("pxebmnzbt", model.headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java deleted file mode 100644 index cbf79db3ef8e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyRetryBackOff; -import org.junit.jupiter.api.Assertions; - -public final class HttpRetryPolicyRetryBackOffTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpRetryPolicyRetryBackOff model = BinaryData.fromString( - "{\"initialDelayInMilliseconds\":2232295730634911769,\"maxIntervalInMilliseconds\":8368000594620652423}") - .toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpRetryPolicyRetryBackOff model - = new HttpRetryPolicyRetryBackOff().withInitialDelayInMilliseconds(2232295730634911769L) - .withMaxIntervalInMilliseconds(8368000594620652423L); - model = BinaryData.fromObject(model).toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index d6ecc83199b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettingsRoutes model - = BinaryData.fromString("{\"apiPrefix\":\"enjbdlwtgrhp\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("enjbdlwtgrhp", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("enjbdlwtgrhp"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("enjbdlwtgrhp", model.apiPrefix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java deleted file mode 100644 index d967aa4fdf54..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java +++ /dev/null @@ -1,41 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettings model = BinaryData.fromString( - "{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"wooc\"},\"forwardProxy\":{\"convention\":\"Standard\",\"customHostHeaderName\":\"qvpkvlrxnjeaseip\",\"customProtoHeaderName\":\"oflokey\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(true, model.requireHttps()); - Assertions.assertEquals("wooc", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.STANDARD, model.forwardProxy().convention()); - Assertions.assertEquals("qvpkvlrxnjeaseip", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("oflokey", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model = new HttpSettings().withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("wooc")) - .withForwardProxy(new ForwardProxy().withConvention(ForwardProxyConvention.STANDARD) - .withCustomHostHeaderName("qvpkvlrxnjeaseip") - .withCustomProtoHeaderName("oflokey")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(true, model.requireHttps()); - Assertions.assertEquals("wooc", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.STANDARD, model.forwardProxy().convention()); - Assertions.assertEquals("qvpkvlrxnjeaseip", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("oflokey", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IdentitySettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IdentitySettingsTests.java deleted file mode 100644 index b1a9150d4d6b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IdentitySettingsTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.IdentitySettings; -import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; -import org.junit.jupiter.api.Assertions; - -public final class IdentitySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentitySettings model = BinaryData.fromString("{\"identity\":\"eeyebi\",\"lifecycle\":\"None\"}") - .toObject(IdentitySettings.class); - Assertions.assertEquals("eeyebi", model.identity()); - Assertions.assertEquals(IdentitySettingsLifeCycle.NONE, model.lifecycle()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentitySettings model - = new IdentitySettings().withIdentity("eeyebi").withLifecycle(IdentitySettingsLifeCycle.NONE); - model = BinaryData.fromObject(model).toObject(IdentitySettings.class); - Assertions.assertEquals("eeyebi", model.identity()); - Assertions.assertEquals(IdentitySettingsLifeCycle.NONE, model.lifecycle()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java deleted file mode 100644 index 08910a22d223..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java +++ /dev/null @@ -1,31 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; -import org.junit.jupiter.api.Assertions; - -public final class IngressPortMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressPortMapping model - = BinaryData.fromString("{\"external\":true,\"targetPort\":1010479001,\"exposedPort\":403427600}") - .toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(1010479001, model.targetPort()); - Assertions.assertEquals(403427600, model.exposedPort()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressPortMapping model - = new IngressPortMapping().withExternal(true).withTargetPort(1010479001).withExposedPort(403427600); - model = BinaryData.fromObject(model).toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(1010479001, model.targetPort()); - Assertions.assertEquals(403427600, model.exposedPort()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java deleted file mode 100644 index f5793c8ace6b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import org.junit.jupiter.api.Assertions; - -public final class IngressStickySessionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressStickySessions model - = BinaryData.fromString("{\"affinity\":\"none\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.NONE); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 941d8411b880..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java +++ /dev/null @@ -1,36 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; - -public final class IpSecurityRestrictionRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpSecurityRestrictionRule model = BinaryData.fromString( - "{\"name\":\"oftrmaequia\",\"description\":\"icslfaoq\",\"ipAddressRange\":\"piyylhalnswhccsp\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("oftrmaequia", model.name()); - Assertions.assertEquals("icslfaoq", model.description()); - Assertions.assertEquals("piyylhalnswhccsp", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = new IpSecurityRestrictionRule().withName("oftrmaequia") - .withDescription("icslfaoq") - .withIpAddressRange("piyylhalnswhccsp") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("oftrmaequia", model.name()); - Assertions.assertEquals("icslfaoq", model.description()); - Assertions.assertEquals("piyylhalnswhccsp", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java deleted file mode 100644 index 0b18d40ff824..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"fxjelg\",\"value\":\"pzqjhhhq\"}") - .toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("fxjelg", model.propertyName()); - Assertions.assertEquals("pzqjhhhq", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentConfigurationProperty model - = new JavaComponentConfigurationProperty().withPropertyName("fxjelg").withValue("pzqjhhhq"); - model = BinaryData.fromObject(model).toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("fxjelg", model.propertyName()); - Assertions.assertEquals("pzqjhhhq", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentIngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentIngressTests.java deleted file mode 100644 index 3d58155b3c59..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentIngressTests.java +++ /dev/null @@ -1,22 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; - -public final class JavaComponentIngressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentIngress model - = BinaryData.fromString("{\"fqdn\":\"gevgwmse\"}").toObject(JavaComponentIngress.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentIngress model = new JavaComponentIngress(); - model = BinaryData.fromObject(model).toObject(JavaComponentIngress.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java deleted file mode 100644 index 7d387ae0846c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java +++ /dev/null @@ -1,49 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"ormkfqlwxldyk\",\"value\":\"sy\"}],\"scale\":{\"minReplicas\":2007438165,\"maxReplicas\":1807199058},\"serviceBinds\":[{\"name\":\"bmjk\",\"serviceId\":\"bjgsjjxxahmrn\"},{\"name\":\"zyqegxyiv\",\"serviceId\":\"nbm\"},{\"name\":\"bjijkgqxnh\",\"serviceId\":\"keznjaujvaa\"},{\"name\":\"ggiycwkdtaawxwf\",\"serviceId\":\"aumrrqmbzmqkrat\"}]},\"id\":\"xwbjs\",\"name\":\"dbirkfpksokdgo\",\"type\":\"ewijymrhbguz\"}") - .toObject(JavaComponentInner.class); - Assertions.assertEquals("ormkfqlwxldyk", model.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("sy", model.properties().configurations().get(0).value()); - Assertions.assertEquals(2007438165, model.properties().scale().minReplicas()); - Assertions.assertEquals(1807199058, model.properties().scale().maxReplicas()); - Assertions.assertEquals("bmjk", model.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("bjgsjjxxahmrn", model.properties().serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentInner model = new JavaComponentInner().withProperties(new JavaComponentProperties() - .withConfigurations(Arrays - .asList(new JavaComponentConfigurationProperty().withPropertyName("ormkfqlwxldyk").withValue("sy"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(2007438165).withMaxReplicas(1807199058)) - .withServiceBinds( - Arrays.asList(new JavaComponentServiceBind().withName("bmjk").withServiceId("bjgsjjxxahmrn"), - new JavaComponentServiceBind().withName("zyqegxyiv").withServiceId("nbm"), - new JavaComponentServiceBind().withName("bjijkgqxnh").withServiceId("keznjaujvaa"), - new JavaComponentServiceBind().withName("ggiycwkdtaawxwf").withServiceId("aumrrqmbzmqkrat")))); - model = BinaryData.fromObject(model).toObject(JavaComponentInner.class); - Assertions.assertEquals("ormkfqlwxldyk", model.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("sy", model.properties().configurations().get(0).value()); - Assertions.assertEquals(2007438165, model.properties().scale().minReplicas()); - Assertions.assertEquals(1807199058, model.properties().scale().maxReplicas()); - Assertions.assertEquals("bmjk", model.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("bjgsjjxxahmrn", model.properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesScaleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesScaleTests.java deleted file mode 100644 index 388ff23dd2cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesScaleTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentPropertiesScaleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentPropertiesScale model - = BinaryData.fromString("{\"minReplicas\":26618529,\"maxReplicas\":1797841912}") - .toObject(JavaComponentPropertiesScale.class); - Assertions.assertEquals(26618529, model.minReplicas()); - Assertions.assertEquals(1797841912, model.maxReplicas()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentPropertiesScale model - = new JavaComponentPropertiesScale().withMinReplicas(26618529).withMaxReplicas(1797841912); - model = BinaryData.fromObject(model).toObject(JavaComponentPropertiesScale.class); - Assertions.assertEquals(26618529, model.minReplicas()); - Assertions.assertEquals(1797841912, model.maxReplicas()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java deleted file mode 100644 index fe29ef21365b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java +++ /dev/null @@ -1,48 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"nfnzhhh\",\"value\":\"smffjkutycyarnr\"}],\"scale\":{\"minReplicas\":214389671,\"maxReplicas\":2107621897},\"serviceBinds\":[{\"name\":\"ghktdpy\",\"serviceId\":\"hcoeocnhzq\"},{\"name\":\"ttjzcfyjzpt\",\"serviceId\":\"lohap\"},{\"name\":\"nfszpyglqdhmrjz\",\"serviceId\":\"l\"},{\"name\":\"pjby\",\"serviceId\":\"sjoqcjenkyhfqzvs\"}]}") - .toObject(JavaComponentProperties.class); - Assertions.assertEquals("nfnzhhh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("smffjkutycyarnr", model.configurations().get(0).value()); - Assertions.assertEquals(214389671, model.scale().minReplicas()); - Assertions.assertEquals(2107621897, model.scale().maxReplicas()); - Assertions.assertEquals("ghktdpy", model.serviceBinds().get(0).name()); - Assertions.assertEquals("hcoeocnhzq", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentProperties model = new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("nfnzhhh").withValue("smffjkutycyarnr"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(214389671).withMaxReplicas(2107621897)) - .withServiceBinds( - Arrays.asList(new JavaComponentServiceBind().withName("ghktdpy").withServiceId("hcoeocnhzq"), - new JavaComponentServiceBind().withName("ttjzcfyjzpt").withServiceId("lohap"), - new JavaComponentServiceBind().withName("nfszpyglqdhmrjz").withServiceId("l"), - new JavaComponentServiceBind().withName("pjby").withServiceId("sjoqcjenkyhfqzvs"))); - model = BinaryData.fromObject(model).toObject(JavaComponentProperties.class); - Assertions.assertEquals("nfnzhhh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("smffjkutycyarnr", model.configurations().get(0).value()); - Assertions.assertEquals(214389671, model.scale().minReplicas()); - Assertions.assertEquals(2107621897, model.scale().maxReplicas()); - Assertions.assertEquals("ghktdpy", model.serviceBinds().get(0).name()); - Assertions.assertEquals("hcoeocnhzq", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java deleted file mode 100644 index 1fb6927a22f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentServiceBind model = BinaryData.fromString("{\"name\":\"acoyvivbsizusjs\",\"serviceId\":\"bscm\"}") - .toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("acoyvivbsizusjs", model.name()); - Assertions.assertEquals("bscm", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentServiceBind model - = new JavaComponentServiceBind().withName("acoyvivbsizusjs").withServiceId("bscm"); - model = BinaryData.fromObject(model).toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("acoyvivbsizusjs", model.name()); - Assertions.assertEquals("bscm", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java deleted file mode 100644 index cf11f757aead..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java +++ /dev/null @@ -1,77 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qroohtu\",\"value\":\"maonurj\"},{\"propertyName\":\"mghihp\",\"value\":\"cmslclblyjxltbs\"},{\"propertyName\":\"scvsfxigctm\",\"value\":\"uupb\"}],\"scale\":{\"minReplicas\":922272916,\"maxReplicas\":1106041304},\"serviceBinds\":[{\"name\":\"ceukdqkkyihztg\",\"serviceId\":\"mgqzgwldoyc\"},{\"name\":\"llcecfehuwaoa\",\"serviceId\":\"h\"},{\"name\":\"qllizstac\",\"serviceId\":\"vhrweftkwqejpmv\"},{\"name\":\"ehaepwamcxtc\",\"serviceId\":\"upeuknijduyye\"}]},\"id\":\"ydjfb\",\"name\":\"c\",\"type\":\"v\"},{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"wikdmh\",\"value\":\"kuflgbh\"},{\"propertyName\":\"uacdixmxuf\",\"value\":\"ryjqgdkf\"}],\"scale\":{\"minReplicas\":1021158786,\"maxReplicas\":1850515821},\"serviceBinds\":[{\"name\":\"jhvefgwbmqjchnt\",\"serviceId\":\"faymxbulpz\"},{\"name\":\"lbm\",\"serviceId\":\"yojwyvfkmbtsu\"},{\"name\":\"xsgxjcmmzrrs\",\"serviceId\":\"biwsd\"},{\"name\":\"pxqwo\",\"serviceId\":\"ffjxcjrmmuabwib\"}]},\"id\":\"ogjo\",\"name\":\"mcyefoyzbam\",\"type\":\"in\"},{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"kpoldtvevboc\",\"value\":\"hzjkn\"}],\"scale\":{\"minReplicas\":1180422043,\"maxReplicas\":483249279},\"serviceBinds\":[{\"name\":\"nrup\",\"serviceId\":\"amrdixtrekidswys\"}]},\"id\":\"ruffgllukk\",\"name\":\"tvlxhrpqh\",\"type\":\"mblcouqehbhbcds\"}],\"nextLink\":\"ryrando\"}") - .toObject(JavaComponentsCollection.class); - Assertions.assertEquals("qroohtu", model.value().get(0).properties().configurations().get(0).propertyName()); - Assertions.assertEquals("maonurj", model.value().get(0).properties().configurations().get(0).value()); - Assertions.assertEquals(922272916, model.value().get(0).properties().scale().minReplicas()); - Assertions.assertEquals(1106041304, model.value().get(0).properties().scale().maxReplicas()); - Assertions.assertEquals("ceukdqkkyihztg", model.value().get(0).properties().serviceBinds().get(0).name()); - Assertions.assertEquals("mgqzgwldoyc", model.value().get(0).properties().serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentsCollection model - = new JavaComponentsCollection().withValue(Arrays.asList( - new JavaComponentInner() - .withProperties(new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("qroohtu").withValue("maonurj"), - new JavaComponentConfigurationProperty().withPropertyName("mghihp") - .withValue("cmslclblyjxltbs"), - new JavaComponentConfigurationProperty().withPropertyName("scvsfxigctm").withValue("uupb"))) - .withScale( - new JavaComponentPropertiesScale().withMinReplicas(922272916).withMaxReplicas(1106041304)) - .withServiceBinds(Arrays.asList( - new JavaComponentServiceBind().withName("ceukdqkkyihztg").withServiceId("mgqzgwldoyc"), - new JavaComponentServiceBind().withName("llcecfehuwaoa").withServiceId("h"), - new JavaComponentServiceBind().withName("qllizstac").withServiceId("vhrweftkwqejpmv"), - new JavaComponentServiceBind().withName("ehaepwamcxtc").withServiceId("upeuknijduyye")))), - new JavaComponentInner() - .withProperties(new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("wikdmh").withValue("kuflgbh"), - new JavaComponentConfigurationProperty().withPropertyName("uacdixmxuf") - .withValue("ryjqgdkf"))) - .withScale( - new JavaComponentPropertiesScale().withMinReplicas(1021158786).withMaxReplicas(1850515821)) - .withServiceBinds(Arrays.asList( - new JavaComponentServiceBind().withName("jhvefgwbmqjchnt").withServiceId("faymxbulpz"), - new JavaComponentServiceBind().withName("lbm").withServiceId("yojwyvfkmbtsu"), - new JavaComponentServiceBind().withName("xsgxjcmmzrrs").withServiceId("biwsd"), - new JavaComponentServiceBind().withName("pxqwo").withServiceId("ffjxcjrmmuabwib")))), - new JavaComponentInner().withProperties(new JavaComponentProperties() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("kpoldtvevboc").withValue("hzjkn"))) - .withScale( - new JavaComponentPropertiesScale().withMinReplicas(1180422043).withMaxReplicas(483249279)) - .withServiceBinds(Arrays - .asList(new JavaComponentServiceBind().withName("nrup").withServiceId("amrdixtrekidswys")))))); - model = BinaryData.fromObject(model).toObject(JavaComponentsCollection.class); - Assertions.assertEquals("qroohtu", model.value().get(0).properties().configurations().get(0).propertyName()); - Assertions.assertEquals("maonurj", model.value().get(0).properties().configurations().get(0).value()); - Assertions.assertEquals(922272916, model.value().get(0).properties().scale().minReplicas()); - Assertions.assertEquals(1106041304, model.value().get(0).properties().scale().maxReplicas()); - Assertions.assertEquals("ceukdqkkyihztg", model.value().get(0).properties().serviceBinds().get(0).name()); - Assertions.assertEquals("mgqzgwldoyc", model.value().get(0).properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index a285d0c926b4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,59 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JavaComponentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"urkep\",\"value\":\"ehqqylm\"},{\"propertyName\":\"twjwdsdlzm\",\"value\":\"erxxxoteehkhowgo\"},{\"propertyName\":\"vhxowpcbapnpxra\",\"value\":\"wbmpspfeylqloc\"},{\"propertyName\":\"ujexayglxrk\",\"value\":\"nmzpas\"}],\"scale\":{\"minReplicas\":890793558,\"maxReplicas\":402195294},\"serviceBinds\":[{\"name\":\"fpieidzlvs\",\"serviceId\":\"ywjopac\"}]},\"id\":\"hydv\",\"name\":\"kmfngpmillxgjs\",\"type\":\"izwgsoriobijeiyd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JavaComponent response = manager.javaComponents() - .define("mcxqqxmyzklao") - .withExistingManagedEnvironment("xlu", "kft") - .withProperties(new JavaComponentProperties() - .withConfigurations(Arrays - .asList(new JavaComponentConfigurationProperty().withPropertyName("mzrqraz").withValue("ivznllas"), - new JavaComponentConfigurationProperty().withPropertyName("skhj").withValue("pvbaih"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1962293618).withMaxReplicas(2110088551)) - .withServiceBinds(Arrays.asList( - new JavaComponentServiceBind().withName("ywbqgroigbsfsgs").withServiceId("nwldfmhljq"), - new JavaComponentServiceBind().withName("spmrjct").withServiceId("ldsxebuhsxrz"), - new JavaComponentServiceBind().withName("gsdaluyckh").withServiceId("rbhseuerbgpxebjl")))) - .create(); - - Assertions.assertEquals("urkep", response.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("ehqqylm", response.properties().configurations().get(0).value()); - Assertions.assertEquals(890793558, response.properties().scale().minReplicas()); - Assertions.assertEquals(402195294, response.properties().scale().maxReplicas()); - Assertions.assertEquals("fpieidzlvs", response.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("ywjopac", response.properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java deleted file mode 100644 index aa083acc7ded..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -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 JavaComponentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"joxtdahne\",\"value\":\"ovt\"},{\"propertyName\":\"ztivfwjl\",\"value\":\"zekfsrmauklajv\"}],\"scale\":{\"minReplicas\":630907604,\"maxReplicas\":1874917407},\"serviceBinds\":[{\"name\":\"jovtkwxnhwhhn\",\"serviceId\":\"rzaaoee\"},{\"name\":\"mjenvjeatea\",\"serviceId\":\"crxoxdj\"}]},\"id\":\"dnaryyinzk\",\"name\":\"olrndwdb\",\"type\":\"xvzaledoy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JavaComponent response = manager.javaComponents() - .getWithResponse("soy", "yxyj", "cbqp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("joxtdahne", response.properties().configurations().get(0).propertyName()); - Assertions.assertEquals("ovt", response.properties().configurations().get(0).value()); - Assertions.assertEquals(630907604, response.properties().scale().minReplicas()); - Assertions.assertEquals(1874917407, response.properties().scale().maxReplicas()); - Assertions.assertEquals("jovtkwxnhwhhn", response.properties().serviceBinds().get(0).name()); - Assertions.assertEquals("rzaaoee", response.properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java deleted file mode 100644 index b1923f438841..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java +++ /dev/null @@ -1,45 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -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 JavaComponentsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentType\":\"JavaComponentProperties\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"httnzqs\",\"value\":\"mebgszplu\"},{\"propertyName\":\"ekpdzzmssg\",\"value\":\"vokyejidbdqzsqun\"},{\"propertyName\":\"wztlvvwsnmrkky\",\"value\":\"repwpwfkcaux\"},{\"propertyName\":\"avcpfpdofuckclbt\",\"value\":\"ue\"}],\"scale\":{\"minReplicas\":725742425,\"maxReplicas\":580481302},\"serviceBinds\":[{\"name\":\"ngojfsqebuuxjx\",\"serviceId\":\"xfjwp\"},{\"name\":\"ktpmbmxb\",\"serviceId\":\"rwgzzxl\"},{\"name\":\"khxsdplaumy\",\"serviceId\":\"hweqjfyxydgtok\"},{\"name\":\"bvwglgwzp\",\"serviceId\":\"akglhpsesrfga\"}]},\"id\":\"iydvxc\",\"name\":\"d\",\"type\":\"yhgoq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.javaComponents().list("dtjva", "yyznmrgcdogcvuc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("httnzqs", - response.iterator().next().properties().configurations().get(0).propertyName()); - Assertions.assertEquals("mebgszplu", response.iterator().next().properties().configurations().get(0).value()); - Assertions.assertEquals(725742425, response.iterator().next().properties().scale().minReplicas()); - Assertions.assertEquals(580481302, response.iterator().next().properties().scale().maxReplicas()); - Assertions.assertEquals("ngojfsqebuuxjx", response.iterator().next().properties().serviceBinds().get(0).name()); - Assertions.assertEquals("xfjwp", response.iterator().next().properties().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java deleted file mode 100644 index 4e460250be96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationManualTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationManualTriggerConfig model - = BinaryData.fromString("{\"replicaCompletionCount\":1422511233,\"parallelism\":1025559588}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(1422511233, model.replicaCompletionCount()); - Assertions.assertEquals(1025559588, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model - = new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1422511233) - .withParallelism(1025559588); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(1422511233, model.replicaCompletionCount()); - Assertions.assertEquals(1025559588, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java deleted file mode 100644 index 05ef99349b47..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationScheduleTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationScheduleTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = BinaryData - .fromString( - "{\"replicaCompletionCount\":718100150,\"cronExpression\":\"mlwywaeeczg\",\"parallelism\":2069370787}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(718100150, model.replicaCompletionCount()); - Assertions.assertEquals("mlwywaeeczg", model.cronExpression()); - Assertions.assertEquals(2069370787, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model - = new JobConfigurationScheduleTriggerConfig().withReplicaCompletionCount(718100150) - .withCronExpression("mlwywaeeczg") - .withParallelism(2069370787); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(718100150, model.replicaCompletionCount()); - Assertions.assertEquals("mlwywaeeczg", model.cronExpression()); - Assertions.assertEquals(2069370787, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java deleted file mode 100644 index 8923847f0056..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionBaseInner model - = BinaryData.fromString("{\"name\":\"sybwptdaca\",\"id\":\"vlf\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("sybwptdaca", model.name()); - Assertions.assertEquals("vlf", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("sybwptdaca").withId("vlf"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("sybwptdaca", model.name()); - Assertions.assertEquals("vlf", model.id()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java deleted file mode 100644 index 775084092b0d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java +++ /dev/null @@ -1,140 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.ReplicaExecutionStatus; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionInner model = BinaryData.fromString( - "{\"name\":\"gwumgxdgdhpa\",\"id\":\"dexjddvjs\",\"type\":\"wotmmwllcolsrsxa\",\"properties\":{\"status\":\"Processing\",\"startTime\":\"2021-04-01T03:23:07Z\",\"endTime\":\"2021-03-09T11:00:51Z\",\"template\":{\"containers\":[{\"image\":\"jljnhvlqjbek\",\"name\":\"eksnbksdqhjvyk\",\"command\":[\"sl\"],\"args\":[\"ustcpoq\",\"avnwqj\",\"g\",\"knlejjjkxybwfd\"],\"env\":[{},{}],\"resources\":{\"cpu\":60.943224543269345,\"memory\":\"svkzykj\",\"ephemeralStorage\":\"kns\"}},{\"image\":\"wushcdp\",\"name\":\"pn\",\"command\":[\"gjfbpkuwxeoi\",\"jfizfavkjzwfbc\",\"aykmmf\",\"sbfwxr\"],\"args\":[\"dew\"],\"env\":[{},{}],\"resources\":{\"cpu\":77.68566374552775,\"memory\":\"bjazejwwviy\",\"ephemeralStorage\":\"ps\"}},{\"image\":\"brnnhjxsqw\",\"name\":\"qkbiwet\",\"command\":[\"ycyqiqyhgfsetzl\",\"xbsfledynoj\",\"ziu\"],\"args\":[\"zkkdtnhqs\",\"cljse\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":31.673528645996928,\"memory\":\"afhlbyl\",\"ephemeralStorage\":\"bevxrhyzd\"}},{\"image\":\"rsofpltdbmairrh\",\"name\":\"fnrac\",\"command\":[\"qigtuujwouhdaws\",\"grbjbxsjybvitvqk\",\"y\",\"znumtggmuwdchoz\"],\"args\":[\"fexl\",\"xn\"],\"env\":[{},{}],\"resources\":{\"cpu\":74.29099049732783,\"memory\":\"iknaqlnuwig\",\"ephemeralStorage\":\"xly\"}}],\"initContainers\":[{\"image\":\"vx\",\"name\":\"wxh\",\"command\":[\"jtlkexaonwivkcqh\",\"xhxknlc\"],\"args\":[\"mkyupijub\",\"qjfkakfqfrkemyi\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":80.08756513780673,\"memory\":\"cowvfdjkp\",\"ephemeralStorage\":\"phlkksnm\"}},{\"image\":\"vyfijdkzuqnw\",\"name\":\"thuqolyahluq\",\"command\":[\"lsutrjbh\",\"ykfhyqezvqqugdrf\",\"bcvex\"],\"args\":[\"quowtljvfwhrea\",\"khyxvrqtvbcz\",\"ulmdgglm\",\"pjpfseykgs\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":89.34675754345622,\"memory\":\"afp\",\"ephemeralStorage\":\"lkvec\"}}]},\"detailedStatus\":{\"replicas\":[{\"name\":\"goadyedmzr\",\"containers\":[{},{},{}]},{\"name\":\"knubnoitp\",\"containers\":[{},{},{}]},{\"name\":\"rgdg\",\"containers\":[{},{}]},{\"name\":\"qraswugyxpqitwei\",\"containers\":[{},{},{},{}]}]}}}") - .toObject(JobExecutionInner.class); - Assertions.assertEquals("gwumgxdgdhpa", model.name()); - Assertions.assertEquals("dexjddvjs", model.id()); - Assertions.assertEquals("wotmmwllcolsrsxa", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T03:23:07Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T11:00:51Z"), model.endTime()); - Assertions.assertEquals("jljnhvlqjbek", model.template().containers().get(0).image()); - Assertions.assertEquals("eksnbksdqhjvyk", model.template().containers().get(0).name()); - Assertions.assertEquals("sl", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("ustcpoq", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(60.943224543269345D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("svkzykj", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("vx", model.template().initContainers().get(0).image()); - Assertions.assertEquals("wxh", model.template().initContainers().get(0).name()); - Assertions.assertEquals("jtlkexaonwivkcqh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("mkyupijub", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(80.08756513780673D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("cowvfdjkp", model.template().initContainers().get(0).resources().memory()); - Assertions.assertEquals("goadyedmzr", model.detailedStatus().replicas().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionInner model - = new JobExecutionInner().withName("gwumgxdgdhpa") - .withId("dexjddvjs") - .withType("wotmmwllcolsrsxa") - .withStartTime(OffsetDateTime.parse("2021-04-01T03:23:07Z")) - .withEndTime(OffsetDateTime.parse("2021-03-09T11:00:51Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer().withImage("jljnhvlqjbek") - .withName("eksnbksdqhjvyk") - .withCommand(Arrays.asList("sl")) - .withArgs(Arrays.asList("ustcpoq", "avnwqj", "g", "knlejjjkxybwfd")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(60.943224543269345D) - .withMemory("svkzykj")), - new JobExecutionContainer().withImage("wushcdp") - .withName("pn") - .withCommand( - Arrays.asList("gjfbpkuwxeoi", "jfizfavkjzwfbc", "aykmmf", "sbfwxr")) - .withArgs(Arrays.asList("dew")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(77.68566374552775D) - .withMemory("bjazejwwviy")), - new JobExecutionContainer().withImage("brnnhjxsqw") - .withName("qkbiwet") - .withCommand(Arrays.asList("ycyqiqyhgfsetzl", "xbsfledynoj", "ziu")) - .withArgs(Arrays.asList("zkkdtnhqs", "cljse")) - .withEnv(Arrays - .asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources() - .withCpu(31.673528645996928D) - .withMemory("afhlbyl")), - new JobExecutionContainer().withImage("rsofpltdbmairrh") - .withName("fnrac") - .withCommand(Arrays.asList("qigtuujwouhdaws", "grbjbxsjybvitvqk", "y", - "znumtggmuwdchoz")) - .withArgs(Arrays.asList("fexl", "xn")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(74.29099049732783D) - .withMemory("iknaqlnuwig")))) - .withInitContainers(Arrays.asList( - new JobExecutionContainer().withImage("vx") - .withName("wxh") - .withCommand(Arrays.asList("jtlkexaonwivkcqh", "xhxknlc")) - .withArgs(Arrays.asList("mkyupijub", "qjfkakfqfrkemyi")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar())) - .withResources( - new ContainerResources().withCpu(80.08756513780673D).withMemory("cowvfdjkp")), - new JobExecutionContainer().withImage("vyfijdkzuqnw") - .withName("thuqolyahluq") - .withCommand(Arrays.asList("lsutrjbh", "ykfhyqezvqqugdrf", "bcvex")) - .withArgs(Arrays.asList("quowtljvfwhrea", "khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar())) - .withResources( - new ContainerResources().withCpu(89.34675754345622D).withMemory("afp"))))) - .withDetailedStatus(new ExecutionStatus().withReplicas(Arrays.asList( - new ReplicaExecutionStatus().withName("goadyedmzr") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus(), - new ContainerExecutionStatus())), - new ReplicaExecutionStatus().withName("knubnoitp") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus(), - new ContainerExecutionStatus())), - new ReplicaExecutionStatus().withName("rgdg") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus())), - new ReplicaExecutionStatus().withName("qraswugyxpqitwei") - .withContainers(Arrays.asList(new ContainerExecutionStatus(), new ContainerExecutionStatus(), - new ContainerExecutionStatus(), new ContainerExecutionStatus()))))); - model = BinaryData.fromObject(model).toObject(JobExecutionInner.class); - Assertions.assertEquals("gwumgxdgdhpa", model.name()); - Assertions.assertEquals("dexjddvjs", model.id()); - Assertions.assertEquals("wotmmwllcolsrsxa", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T03:23:07Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-09T11:00:51Z"), model.endTime()); - Assertions.assertEquals("jljnhvlqjbek", model.template().containers().get(0).image()); - Assertions.assertEquals("eksnbksdqhjvyk", model.template().containers().get(0).name()); - Assertions.assertEquals("sl", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("ustcpoq", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(60.943224543269345D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("svkzykj", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("vx", model.template().initContainers().get(0).image()); - Assertions.assertEquals("wxh", model.template().initContainers().get(0).name()); - Assertions.assertEquals("jtlkexaonwivkcqh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("mkyupijub", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(80.08756513780673D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("cowvfdjkp", model.template().initContainers().get(0).resources().memory()); - Assertions.assertEquals("goadyedmzr", model.detailedStatus().replicas().get(0).name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java deleted file mode 100644 index 75b1614c7be0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("adhfztlray", "rkgzkyhudbkuw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java deleted file mode 100644 index 9ff0e9120b1f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java +++ /dev/null @@ -1,53 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -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 JobsExecutionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"eoftnorwai\",\"id\":\"ioctqk\",\"type\":\"ja\",\"properties\":{\"status\":\"Succeeded\",\"startTime\":\"2021-08-22T09:01:23Z\",\"endTime\":\"2021-05-14T08:05:49Z\",\"template\":{\"containers\":[{\"image\":\"oss\",\"name\":\"jxtvlxxzqfcwrrio\",\"command\":[\"ezwy\",\"j\"],\"args\":[\"iqegm\",\"db\",\"ohcwhpyv\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"tszwcanzb\",\"name\":\"kwuyck\",\"command\":[\"ensmuffiwjbct\",\"bpzujqjtotdxp\",\"scsl\"],\"args\":[\"usiecktybhjuxid\",\"hxomilddxjx\",\"ugxwjwilmqrslaat\"],\"env\":[{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"zgxqgqwlxr\",\"name\":\"tvhvtqqy\",\"command\":[\"kteo\"],\"args\":[\"ogmkorvvmvmco\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"bsn\",\"name\":\"nqliwkmzoj\",\"command\":[\"yalhtgm\",\"nazgbjbhrpgiq\"],\"args\":[\"cucrcm\",\"aixpqj\",\"wifhbksldttohq\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"h\",\"name\":\"siqikvllrht\",\"command\":[\"lxkoi\",\"mtrawrqkza\",\"bun\",\"paklw\"],\"args\":[\"eeprnejzl\"],\"env\":[{},{}],\"resources\":{}}]},\"detailedStatus\":{\"replicas\":[{\"name\":\"xscbduxapgrcqe\",\"containers\":[{},{}]},{\"name\":\"djomlnwsbvvdl\",\"containers\":[{},{},{}]},{\"name\":\"kq\",\"containers\":[{},{}]}]}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.jobsExecutions().list("euynh", "okayrg", "ybriop", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eoftnorwai", response.iterator().next().name()); - Assertions.assertEquals("ioctqk", response.iterator().next().id()); - Assertions.assertEquals("ja", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-22T09:01:23Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-14T08:05:49Z"), response.iterator().next().endTime()); - Assertions.assertEquals("oss", response.iterator().next().template().containers().get(0).image()); - Assertions.assertEquals("jxtvlxxzqfcwrrio", response.iterator().next().template().containers().get(0).name()); - Assertions.assertEquals("ezwy", response.iterator().next().template().containers().get(0).command().get(0)); - Assertions.assertEquals("iqegm", response.iterator().next().template().containers().get(0).args().get(0)); - Assertions.assertEquals("zgxqgqwlxr", response.iterator().next().template().initContainers().get(0).image()); - Assertions.assertEquals("tvhvtqqy", response.iterator().next().template().initContainers().get(0).name()); - Assertions.assertEquals("kteo", response.iterator().next().template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("ogmkorvvmvmco", - response.iterator().next().template().initContainers().get(0).args().get(0)); - Assertions.assertEquals("xscbduxapgrcqe", response.iterator().next().detailedStatus().replicas().get(0).name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 5e338c64cdce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,52 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -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 JobsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"metadata\":{\"id\":\"lbkl\",\"name\":\"mnnkkwayqshw\",\"description\":\"xrid\",\"author\":\"bsaqjm\",\"category\":\"xqwqueu\",\"supportTopicList\":[{\"id\":\"tpziizevjy\",\"pesId\":\"fvezefk\"},{\"id\":\"qt\",\"pesId\":\"lepjjzkcasf\"},{\"id\":\"c\",\"pesId\":\"o\"},{\"id\":\"fjwajnrt\",\"pesId\":\"vaqkifmxawost\"}],\"analysisTypes\":[\"nhrkmjqncfvdsc\",\"hemvwfnqqwypvnd\",\"wbgodtggrssg\"],\"type\":\"fk\",\"score\":12.798208},\"dataset\":[{\"table\":{\"tableName\":\"mvecvztscbgmusai\",\"columns\":[{},{}],\"rows\":[\"datankzzohnrddclz\"]},\"renderingProperties\":{\"type\":1312159373,\"title\":\"ehlbzqixbnjrqvzy\",\"description\":\"xozony\",\"isVisible\":true}},{\"table\":{\"tableName\":\"udpabcreuwzos\",\"columns\":[{},{}],\"rows\":[\"datacvasormrexzvdu\"]},\"renderingProperties\":{\"type\":842951636,\"title\":\"ygbadu\",\"description\":\"covsdqhzrtd\",\"isVisible\":false}}],\"status\":{\"message\":\"imzfvpp\",\"statusId\":414377585},\"dataProviderMetadata\":{\"providerName\":\"fjmclngygnhrkomb\",\"propertyBag\":[{\"name\":\"jdopggorwjo\",\"value\":\"rotpvclpof\"},{\"name\":\"lmwkptskwxjg\",\"value\":\"xccb\"},{\"name\":\"akmkookbput\",\"value\":\"vmuyak\"},{\"name\":\"wk\",\"value\":\"ow\"}]}},\"id\":\"royrdurxf\",\"name\":\"zqjim\",\"type\":\"jtgzj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = manager.jobs() - .getDetectorWithResponse("cjdk", "otcsu", "mzoonsvobchkxfpw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nhrkmjqncfvdsc", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("mvecvztscbgmusai", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1312159373, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("ehlbzqixbnjrqvzy", - response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xozony", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("imzfvpp", response.properties().status().message()); - Assertions.assertEquals(414377585, response.properties().status().statusId()); - Assertions.assertEquals("fjmclngygnhrkomb", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("jdopggorwjo", - response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("rotpvclpof", - response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsMockTests.java deleted file mode 100644 index e66350569baa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsMockTests.java +++ /dev/null @@ -1,56 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -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 JobsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"olmugpyvao\",\"name\":\"kluwz\",\"description\":\"ygz\",\"author\":\"yevjhubnobguq\",\"category\":\"qsq\",\"supportTopicList\":[{\"id\":\"ioyj\",\"pesId\":\"mlviqcpszpmcvqdv\"},{\"id\":\"mvxyrxdh\",\"pesId\":\"qojbxao\"},{\"id\":\"gbzxmbtplefoioy\",\"pesId\":\"oxznvgvd\"}],\"analysisTypes\":[\"uvda\",\"sxmrszbknimxlp\"],\"type\":\"rxrzutylcur\",\"score\":4.548967},\"dataset\":[{\"table\":{\"tableName\":\"qaeht\",\"columns\":[{},{}],\"rows\":[\"datanvynfaooeactedc\",\"datalsk\",\"datak\"]},\"renderingProperties\":{\"type\":247319273,\"title\":\"hzllrqmtlpbyxro\",\"description\":\"uyqyp\",\"isVisible\":true}},{\"table\":{\"tableName\":\"iicsudyhbrjjt\",\"columns\":[{},{},{},{}],\"rows\":[\"datasjrholuqwgus\",\"dataxhdod\",\"datajwyblvtbdmvsb\",\"dataidaelqpvekmkwjfb\"]},\"renderingProperties\":{\"type\":912529746,\"title\":\"gdusxurs\",\"description\":\"v\",\"isVisible\":true}}],\"status\":{\"message\":\"coqwczsyiqri\",\"statusId\":916243678},\"dataProviderMetadata\":{\"providerName\":\"vaangqtnhjrfdmf\",\"propertyBag\":[{\"name\":\"aexxjfwtgdfkka\",\"value\":\"gvmuafmczf\"},{\"name\":\"yuepsvpltidajjvy\",\"value\":\"ocfkumcfjxoky\"}]}},\"id\":\"syasvfnkwmygjjek\",\"name\":\"knfdr\",\"type\":\"gjqyckgtxkrdtulc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.jobs().listDetectors("hmmlc", "yarnggcjfwblqhxk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uvda", response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("qaeht", response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(247319273, - response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("hzllrqmtlpbyxro", - response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("uyqyp", - response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, - response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("coqwczsyiqri", response.iterator().next().properties().status().message()); - Assertions.assertEquals(916243678, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("vaangqtnhjrfdmf", - response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("aexxjfwtgdfkka", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("gvmuafmczf", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java deleted file mode 100644 index ad9427e286ae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsStopExecutionMockTests { - @Test - public void testStopExecution() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().stopExecution("by", "fqpgaixwrgr", "kderf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java deleted file mode 100644 index a1d62bc55dd1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -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 JobsStopMultipleExecutionsMockTests { - @Test - public void testStopMultipleExecutions() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"nxhtf\",\"id\":\"qbsudzpgchzpg\",\"type\":\"umjdjxhzghg\",\"properties\":{\"status\":\"Failed\",\"startTime\":\"2021-01-05T00:02:43Z\",\"endTime\":\"2021-01-05T16:16:30Z\",\"template\":{\"containers\":[{}],\"initContainers\":[{}]},\"detailedStatus\":{\"replicas\":[{}]}}}],\"nextLink\":\"mxjdnaju\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppJobExecutions response - = manager.jobs().stopMultipleExecutions("swqi", "wepwoggg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nxhtf", response.value().get(0).name()); - Assertions.assertEquals("qbsudzpgchzpg", response.value().get(0).id()); - Assertions.assertEquals("umjdjxhzghg", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T00:02:43Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T16:16:30Z"), response.value().get(0).endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java deleted file mode 100644 index 5431a4045353..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JwtClaimChecksTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JwtClaimChecks model = BinaryData - .fromString("{\"allowedGroups\":[\"snb\"],\"allowedClientApplications\":[\"abnmocpcyshu\",\"zafb\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("snb", model.allowedGroups().get(0)); - Assertions.assertEquals("abnmocpcyshu", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = new JwtClaimChecks().withAllowedGroups(Arrays.asList("snb")) - .withAllowedClientApplications(Arrays.asList("abnmocpcyshu", "zafb")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("snb", model.allowedGroups().get(0)); - Assertions.assertEquals("abnmocpcyshu", model.allowedClientApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java deleted file mode 100644 index 2370b4f6a1fc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java +++ /dev/null @@ -1,21 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; - -public final class KedaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KedaConfiguration model = BinaryData.fromString("{\"version\":\"vl\"}").toObject(KedaConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KedaConfiguration model = new KedaConfiguration(); - model = BinaryData.fromObject(model).toObject(KedaConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java deleted file mode 100644 index 3726fc9941c2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java +++ /dev/null @@ -1,51 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"currentValue\":41.2557,\"limit\":14.812088,\"name\":{\"value\":\"rsiwdyjqur\",\"localizedValue\":\"crraueekcsu\"}},{\"currentValue\":1.5593171,\"limit\":12.774044,\"name\":{\"value\":\"ddacbcbgydlqidy\",\"localizedValue\":\"hmptyrilkfbn\"}},{\"currentValue\":55.588596,\"limit\":89.35382,\"name\":{\"value\":\"vzt\",\"localizedValue\":\"nfnqtxjtomals\"}},{\"currentValue\":43.106903,\"limit\":78.589905,\"name\":{\"value\":\"ddepldwqjns\",\"localizedValue\":\"ygleexa\"}}],\"nextLink\":\"mywhsb\"}") - .toObject(ListUsagesResult.class); - Assertions.assertEquals(41.2557f, model.value().get(0).currentValue()); - Assertions.assertEquals(14.812088f, model.value().get(0).limit()); - Assertions.assertEquals("rsiwdyjqur", model.value().get(0).name().value()); - Assertions.assertEquals("crraueekcsu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("mywhsb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult() - .withValue(Arrays.asList( - new UsageInner().withCurrentValue(41.2557f) - .withLimit(14.812088f) - .withName(new UsageName().withValue("rsiwdyjqur").withLocalizedValue("crraueekcsu")), - new UsageInner().withCurrentValue(1.5593171f) - .withLimit(12.774044f) - .withName(new UsageName().withValue("ddacbcbgydlqidy").withLocalizedValue("hmptyrilkfbn")), - new UsageInner().withCurrentValue(55.588596f) - .withLimit(89.35382f) - .withName(new UsageName().withValue("vzt").withLocalizedValue("nfnqtxjtomals")), - new UsageInner().withCurrentValue(43.106903f) - .withLimit(78.589905f) - .withName(new UsageName().withValue("ddepldwqjns").withLocalizedValue("ygleexa")))) - .withNextLink("mywhsb"); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - Assertions.assertEquals(41.2557f, model.value().get(0).currentValue()); - Assertions.assertEquals(14.812088f, model.value().get(0).limit()); - Assertions.assertEquals("rsiwdyjqur", model.value().get(0).name().value()); - Assertions.assertEquals("crraueekcsu", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("mywhsb", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoggerSettingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoggerSettingTests.java deleted file mode 100644 index 56d15ece3f04..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoggerSettingTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import org.junit.jupiter.api.Assertions; - -public final class LoggerSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoggerSetting model - = BinaryData.fromString("{\"logger\":\"klff\",\"level\":\"debug\"}").toObject(LoggerSetting.class); - Assertions.assertEquals("klff", model.logger()); - Assertions.assertEquals(Level.DEBUG, model.level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoggerSetting model = new LoggerSetting().withLogger("klff").withLevel(Level.DEBUG); - model = BinaryData.fromObject(model).toObject(LoggerSetting.class); - Assertions.assertEquals("klff", model.logger()); - Assertions.assertEquals(Level.DEBUG, model.level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java deleted file mode 100644 index 3c21201c92fa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; - -public final class LogicAppInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogicAppInner model = BinaryData - .fromString( - "{\"properties\":\"dataaqylkjztji\",\"id\":\"zjcg\",\"name\":\"xitp\",\"type\":\"inzcpdltkrlgj\"}") - .toObject(LogicAppInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogicAppInner model = new LogicAppInner().withProperties("dataaqylkjztji"); - model = BinaryData.fromObject(model).toObject(LogicAppInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 4606c6ad6387..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":\"datawgqrntaum\",\"id\":\"cjlvkrkegtyc\",\"name\":\"uppiyxlzm\",\"type\":\"yddeeqz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogicApp response = manager.logicApps() - .define("xlxicwgp") - .withExistingContainerApp("lkdlgwgna", "kuuyiuyuaf") - .withProperties("datadc") - .create(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.java deleted file mode 100644 index 6bb639b4bb5b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.logicApps().deleteWithResponse("mxrfomckew", "my", "fopxf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.java deleted file mode 100644 index 0d2829fcd805..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsDeployWorkflowArtifactsWithResponseMockTests { - @Test - public void testDeployWorkflowArtifactsWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.logicApps() - .deployWorkflowArtifactsWithResponse("bgacnr", "fdtncmspsanma", "eubkqiqmlf", - new WorkflowArtifacts().withAppSettings("datalqcskkqjmxptueip") - .withFiles("datagkwdr") - .withFilesToDelete(Arrays.asList("pahu", "onjkkxukguehvvp", "joegcjojlleuidp", "tonvhgnhtmeplhb")), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.java deleted file mode 100644 index aeac42f8fde9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":\"datayedzfzq\",\"id\":\"uqhtdereuno\",\"name\":\"a\",\"type\":\"zwhpjlwyxedz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogicApp response = manager.logicApps() - .getWithResponse("vktjhffecqkoq", "ouergaghp", "zxkpyehhfdyld", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.java deleted file mode 100644 index c1238da7bcac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LogicAppsInvokeWithResponseMockTests { - @Test - public void testInvokeWithResponse() throws Exception { - String responseStr = "\"dataeotmf\""; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Object response = manager.logicApps() - .invokeWithResponse("xbriifefn", "s", "vrqoemwsi", "eailwdqmqf", LogicAppsProxyMethod.GET, - com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java deleted file mode 100644 index a6a89d5d62ec..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import org.junit.jupiter.api.Assertions; - -public final class LoginRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"l\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("l", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("l"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("l", model.logoutEndpoint()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java deleted file mode 100644 index af2cb60aaee2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginScopesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginScopes model = BinaryData.fromString("{\"scopes\":[\"clwhijcoejctbz\"]}").toObject(LoginScopes.class); - Assertions.assertEquals("clwhijcoejctbz", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("clwhijcoejctbz")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("clwhijcoejctbz", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java deleted file mode 100644 index c565f177aa1f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogsConfiguration model - = BinaryData.fromString("{\"destinations\":[\"txd\",\"hmoz\",\"sgzv\"]}").toObject(LogsConfiguration.class); - Assertions.assertEquals("txd", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogsConfiguration model = new LogsConfiguration().withDestinations(Arrays.asList("txd", "hmoz", "sgzv")); - model = BinaryData.fromObject(model).toObject(LogsConfiguration.class); - Assertions.assertEquals("txd", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java deleted file mode 100644 index 03f637f5a43c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java +++ /dev/null @@ -1,41 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedCertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCertificatePatch model - = BinaryData.fromString("{\"tags\":{\"cclfgxannn\":\"spxklu\",\"ewxigpxvk\":\"ytzpo\"}}") - .toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("spxklu", model.tags().get("cclfgxannn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model - = new ManagedCertificatePatch().withTags(mapOf("cclfgxannn", "spxklu", "ewxigpxvk", "ytzpo")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("spxklu", model.tags().get("cclfgxannn")); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 82e261f99abb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedCertificates() - .deleteWithResponse("wuhw", "wjnoxuo", "tfnressfepgck", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 02cd00b0cbbd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,50 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -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 ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"metadata\":{\"id\":\"agdvcdqhftz\",\"name\":\"yfaofdf\",\"description\":\"tncwmhjobzrfpr\",\"author\":\"dc\",\"category\":\"yftcvbzwgwhg\",\"supportTopicList\":[{\"id\":\"auoors\",\"pesId\":\"tfybipufdmxuqb\"},{\"id\":\"nasttuxvzfqayop\",\"pesId\":\"sixhgvbhx\"},{\"id\":\"dztgsqja\",\"pesId\":\"mar\"},{\"id\":\"eibpgbrhbjdqkn\",\"pesId\":\"nmotpuwnnoh\"}],\"analysisTypes\":[\"ngocfrjuypwyi\",\"laynosugkf\",\"axttpfsmwgs\",\"hqucum\"],\"type\":\"dau\",\"score\":49.593155},\"dataset\":[{\"table\":{\"tableName\":\"thxuarigrjdl\",\"columns\":[{},{},{},{}],\"rows\":[\"datavkrbzkuastaxklpr\"]},\"renderingProperties\":{\"type\":801885966,\"title\":\"l\",\"description\":\"izwxvs\",\"isVisible\":false}},{\"table\":{\"tableName\":\"yyskyekgafxczv\",\"columns\":[{},{}],\"rows\":[\"datartwletyves\",\"datartlhpdhwyn\",\"datatacz\",\"datanjfmbbfnvjxit\"]},\"renderingProperties\":{\"type\":1661586982,\"title\":\"rtiklsmnihqlco\",\"description\":\"syi\",\"isVisible\":true}}],\"status\":{\"message\":\"wbgbudav\",\"statusId\":638512610},\"dataProviderMetadata\":{\"providerName\":\"ccqcdhth\",\"propertyBag\":[{\"name\":\"irknucosaw\",\"value\":\"tnagzlgpya\"},{\"name\":\"ihzqjjtsmuy\",\"value\":\"fttkacybdueu\"}]}},\"id\":\"mcdcpkshl\",\"name\":\"jermhzic\",\"type\":\"bfdjhyaaknyukibx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = manager.managedEnvironmentDiagnostics() - .getDetectorWithResponse("uz", "wjecooyvhtuqbpe", "nii", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ngocfrjuypwyi", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("thxuarigrjdl", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(801885966, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("l", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("izwxvs", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("wbgbudav", response.properties().status().message()); - Assertions.assertEquals(638512610, response.properties().status().statusId()); - Assertions.assertEquals("ccqcdhth", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("irknucosaw", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("tnagzlgpya", - response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 1309fcfc5110..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -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 ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests { - @Test - public void testListDetectorsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"mtmvwituwey\",\"name\":\"shcybwfuppox\",\"description\":\"cmvouujxdiikmoxr\",\"author\":\"svavlrxikjmoy\",\"category\":\"unpip\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"zfn\"],\"type\":\"patpf\",\"score\":77.88766},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"whxorpwaltz\",\"statusId\":1877042144},\"dataProviderMetadata\":{\"providerName\":\"ojfccylhtrht\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"jpwexcdrz\",\"name\":\"robzzxezmnrkjgpj\",\"type\":\"uxsphlokfpm\"},{\"properties\":{\"metadata\":{\"id\":\"vzvfb\",\"name\":\"bd\",\"description\":\"fvcgnrglaqr\",\"author\":\"ambhbafebzxf\",\"category\":\"qutibhl\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"vrkpsa\"],\"type\":\"u\",\"score\":38.36888},\"dataset\":[{},{},{}],\"status\":{\"message\":\"nysvlpyeuukppd\",\"statusId\":521816147},\"dataProviderMetadata\":{\"providerName\":\"lxvhhyqqegatxgrz\",\"propertyBag\":[{}]}},\"id\":\"nmtsdixc\",\"name\":\"w\",\"type\":\"ibmg\"},{\"properties\":{\"metadata\":{\"id\":\"cjc\",\"name\":\"airwcqzoofj\",\"description\":\"jsvepfbhtleberp\",\"author\":\"jeknfqnw\",\"category\":\"qxowkdn\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"rhw\",\"ehycpn\"],\"type\":\"awonoehrguqlhfw\",\"score\":21.82771},\"dataset\":[{},{},{}],\"status\":{\"message\":\"yrguyfazbk\",\"statusId\":196544276},\"dataProviderMetadata\":{\"providerName\":\"vthrmxkb\",\"propertyBag\":[{},{},{}]}},\"id\":\"dxomrawppk\",\"name\":\"boozflyacagaed\",\"type\":\"oiqclmgdtwgab\"}],\"nextLink\":\"f\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DiagnosticsCollection response = manager.managedEnvironmentDiagnostics() - .listDetectorsWithResponse("bfs", "eqbbewfcuqfpy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zfn", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("whxorpwaltz", response.value().get(0).properties().status().message()); - Assertions.assertEquals(1877042144, response.value().get(0).properties().status().statusId()); - Assertions.assertEquals("ojfccylhtrht", - response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 16fbab743036..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,52 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -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 ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"groupIds\":[\"bja\"],\"privateEndpoint\":{\"id\":\"oclannmxynlsuq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"trkt\",\"actionsRequired\":\"patr\"},\"provisioningState\":\"Succeeded\"},\"id\":\"tfinfhoksmmculwk\",\"name\":\"icruo\",\"type\":\"krjflsgaojb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response - = manager.managedEnvironmentPrivateEndpointConnections() - .define("ujjcxgdqmrlhn") - .withExistingManagedEnvironment("jxvtrkfkgenjqnnp", "wkosnyxigf") - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("ekd") - .withActionsRequired("vuftrsvjmnsvu")) - .create(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("trkt", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("patr", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 6f341c86d48f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -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 ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"groupIds\":[\"vmkinwtey\",\"qshixbc\"],\"privateEndpoint\":{\"id\":\"pylblfsprrwc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"tc\",\"actionsRequired\":\"fx\"},\"provisioningState\":\"Updating\"},\"id\":\"zfslxizhqikmgob\",\"name\":\"iqemcdiiisklbon\",\"type\":\"xu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = manager.managedEnvironmentPrivateEndpointConnections() - .getWithResponse("jlm", "vdorsirx", "hyrkqakofajfr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("tc", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fx", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index 2fc1743d0719..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -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 ManagedEnvironmentPrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupIds\":[\"htuzlxiwyopgar\",\"fctwra\"],\"privateEndpoint\":{\"id\":\"dojq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"sipiysnjqyowa\",\"actionsRequired\":\"c\"},\"provisioningState\":\"Updating\"},\"id\":\"a\",\"name\":\"undtsew\",\"type\":\"aupwhlzyckrem\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.managedEnvironmentPrivateEndpointConnections() - .list("vdrijanxndm", "vardlmzjotprrm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("sipiysnjqyowa", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("c", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.java deleted file mode 100644 index eabbd1981c77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResource; -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 ManagedEnvironmentPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"jiswllu\",\"requiredMembers\":[\"hfwlfxzfwugeup\",\"knecexkgrv\",\"psjdmng\",\"yt\"],\"requiredZoneNames\":[\"zfyxcnwawoxcg\",\"bejqfbifopfjx\",\"wdrpa\",\"q\"]},\"id\":\"rfm\",\"name\":\"wotfcuu\",\"type\":\"gtji\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.managedEnvironmentPrivateLinkResources() - .list("qpqsdoctpzpuj", "flmcdsgxc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zfyxcnwawoxcg", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java deleted file mode 100644 index 49dc98f35e54..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = BinaryData.fromString("{\"mtls\":{\"enabled\":false}}") - .toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(false, model.mtls().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model - = new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(false)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(false, model.mtls().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.java deleted file mode 100644 index 8a27c7c7c32e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption model - = BinaryData.fromString("{\"enabled\":true}") - .toObject(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption model - = new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(true); - model = BinaryData.fromObject(model) - .toObject(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.java deleted file mode 100644 index fa5a7e9e6d9e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfiguration model - = BinaryData.fromString("{\"encryption\":{\"enabled\":false}}") - .toObject(ManagedEnvironmentPropertiesPeerTrafficConfiguration.class); - Assertions.assertEquals(false, model.encryption().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerTrafficConfiguration model - = new ManagedEnvironmentPropertiesPeerTrafficConfiguration().withEncryption( - new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(false)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerTrafficConfiguration.class); - Assertions.assertEquals(false, model.encryption().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java deleted file mode 100644 index a2e2d385a95e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Usage; -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 ManagedEnvironmentUsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"currentValue\":51.928596,\"limit\":92.0443,\"name\":{\"value\":\"w\",\"localizedValue\":\"ihwpadhedbfobd\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.managedEnvironmentUsages().list("yyrqaedwov", "cytjgoea", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(51.928596f, response.iterator().next().currentValue()); - Assertions.assertEquals(92.0443f, response.iterator().next().limit()); - Assertions.assertEquals("w", response.iterator().next().name().value()); - Assertions.assertEquals("ihwpadhedbfobd", response.iterator().next().name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 77356ce4f86b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironments().delete("wfhxwyrkbre", "zl", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java deleted file mode 100644 index 388df51698ea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,41 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -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 ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"minimumCount\":691575719,\"maximumCount\":1783164068,\"currentCount\":1641268662},\"id\":\"yuvtz\",\"name\":\"xzhclec\",\"type\":\"wtzqzcloyhy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.managedEnvironments() - .listWorkloadProfileStates("klfnisyxgucbmt", "ed", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(691575719, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(1783164068, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(1641268662, response.iterator().next().properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index a6c5c1d4c36a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironmentsStorages() - .deleteWithResponse("pn", "qpwnikxkcajgr", "rct", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index abc41ca4d195..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,43 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"230c3431-b6d5-45e1-ad60-982d38be0cc6\",\"tenantId\":\"3608a43e-8e31-482c-be6d-7870288cda0c\",\"type\":\"None\",\"userAssignedIdentities\":{\"kphywpnvjto\":{\"principalId\":\"66b8cf76-f18a-4c22-b85f-11e970ce403d\",\"clientId\":\"de3ffd42-35fa-4062-b784-aaa4baefabd1\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("kphywpnvjto", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - // 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; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java deleted file mode 100644 index 131eaa0ae3ef..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricsConfiguration model - = BinaryData.fromString("{\"includeKeda\":true,\"destinations\":[\"jzfpafolpymwamx\"]}") - .toObject(MetricsConfiguration.class); - Assertions.assertEquals(true, model.includeKeda()); - Assertions.assertEquals("jzfpafolpymwamx", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricsConfiguration model - = new MetricsConfiguration().withIncludeKeda(true).withDestinations(Arrays.asList("jzfpafolpymwamx")); - model = BinaryData.fromObject(model).toObject(MetricsConfiguration.class); - Assertions.assertEquals(true, model.includeKeda()); - Assertions.assertEquals("jzfpafolpymwamx", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java deleted file mode 100644 index f78edccfaf21..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class MtlsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mtls model = BinaryData.fromString("{\"enabled\":true}").toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mtls model = new Mtls().withEnabled(true); - model = BinaryData.fromObject(model).toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NacosComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NacosComponentTests.java deleted file mode 100644 index ad10b7e7dfe7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NacosComponentTests.java +++ /dev/null @@ -1,56 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.NacosComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NacosComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NacosComponent model = BinaryData.fromString( - "{\"componentType\":\"Nacos\",\"ingress\":{\"fqdn\":\"yngjgvrquvpygglp\"},\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"eljtiahxmfqryarv\",\"value\":\"zqbglcjkays\"},{\"propertyName\":\"hz\",\"value\":\"ubtlmjtg\"},{\"propertyName\":\"ioskkfmkmfdjxyxg\",\"value\":\"kqvjcteoedlr\"},{\"propertyName\":\"skkzpxvjnzdpvo\",\"value\":\"jhpcn\"}],\"scale\":{\"minReplicas\":379540195,\"maxReplicas\":2097322331},\"serviceBinds\":[{\"name\":\"ytexvzilmhivzk\",\"serviceId\":\"wncknr\"},{\"name\":\"ajlskzptj\",\"serviceId\":\"lwe\"},{\"name\":\"yrth\",\"serviceId\":\"lehmcgcjeinueho\"},{\"name\":\"mvfejvqnttmbqd\",\"serviceId\":\"zfivfokpysthhzag\"}]}") - .toObject(NacosComponent.class); - Assertions.assertEquals("eljtiahxmfqryarv", model.configurations().get(0).propertyName()); - Assertions.assertEquals("zqbglcjkays", model.configurations().get(0).value()); - Assertions.assertEquals(379540195, model.scale().minReplicas()); - Assertions.assertEquals(2097322331, model.scale().maxReplicas()); - Assertions.assertEquals("ytexvzilmhivzk", model.serviceBinds().get(0).name()); - Assertions.assertEquals("wncknr", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NacosComponent model - = new NacosComponent() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("eljtiahxmfqryarv") - .withValue("zqbglcjkays"), - new JavaComponentConfigurationProperty().withPropertyName("hz").withValue("ubtlmjtg"), - new JavaComponentConfigurationProperty().withPropertyName("ioskkfmkmfdjxyxg") - .withValue("kqvjcteoedlr"), - new JavaComponentConfigurationProperty().withPropertyName("skkzpxvjnzdpvo").withValue("jhpcn"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(379540195).withMaxReplicas(2097322331)) - .withServiceBinds( - Arrays.asList(new JavaComponentServiceBind().withName("ytexvzilmhivzk").withServiceId("wncknr"), - new JavaComponentServiceBind().withName("ajlskzptj").withServiceId("lwe"), - new JavaComponentServiceBind().withName("yrth").withServiceId("lehmcgcjeinueho"), - new JavaComponentServiceBind().withName("mvfejvqnttmbqd").withServiceId("zfivfokpysthhzag"))) - .withIngress(new JavaComponentIngress()); - model = BinaryData.fromObject(model).toObject(NacosComponent.class); - Assertions.assertEquals("eljtiahxmfqryarv", model.configurations().get(0).propertyName()); - Assertions.assertEquals("zqbglcjkays", model.configurations().get(0).value()); - Assertions.assertEquals(379540195, model.scale().minReplicas()); - Assertions.assertEquals(2097322331, model.scale().maxReplicas()); - Assertions.assertEquals("ytexvzilmhivzk", model.serviceBinds().get(0).name()); - Assertions.assertEquals("wncknr", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 9f959749fd2c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -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 NamespacesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"vwfqjch\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = manager.namespaces() - .checkNameAvailabilityWithResponse("hua", "zmzivrtrfzhhez", - new CheckNameAvailabilityRequest().withName("judxdyyrud").withType("hswtvdkxbqssgfe"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("vwfqjch", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java deleted file mode 100644 index 04722508c139..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AccessMode; -import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; -import org.junit.jupiter.api.Assertions; - -public final class NfsAzureFilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NfsAzureFileProperties model = BinaryData - .fromString("{\"server\":\"yejsxtlg\",\"accessMode\":\"ReadOnly\",\"shareName\":\"gziiucijjcea\"}") - .toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("yejsxtlg", model.server()); - Assertions.assertEquals(AccessMode.READ_ONLY, model.accessMode()); - Assertions.assertEquals("gziiucijjcea", model.shareName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NfsAzureFileProperties model = new NfsAzureFileProperties().withServer("yejsxtlg") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("gziiucijjcea"); - model = BinaryData.fromObject(model).toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("yejsxtlg", model.server()); - Assertions.assertEquals(AccessMode.READ_ONLY, model.accessMode()); - Assertions.assertEquals("gziiucijjcea", model.shareName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index 9b7b04146c17..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; - -public final class NonceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nonce model = BinaryData.fromString("{\"validateNonce\":false,\"nonceExpirationInterval\":\"ampmngnz\"}") - .toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("ampmngnz", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("ampmngnz"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("ampmngnz", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java deleted file mode 100644 index 713af822f1a5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OpenIdConnectLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OpenIdConnectLogin model = BinaryData.fromString("{\"nameClaimType\":\"evgbmqjq\",\"scopes\":[\"y\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("evgbmqjq", model.nameClaimType()); - Assertions.assertEquals("y", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model - = new OpenIdConnectLogin().withNameClaimType("evgbmqjq").withScopes(Arrays.asList("y")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("evgbmqjq", model.nameClaimType()); - Assertions.assertEquals("y", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java deleted file mode 100644 index d8638166c2b6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java +++ /dev/null @@ -1,45 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDetailInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDetailInner model = BinaryData.fromString( - "{\"name\":\"gh\",\"isDataAction\":false,\"display\":{\"provider\":\"tlffhzbkr\",\"resource\":\"jjavfq\",\"operation\":\"hnqoewdo\",\"description\":\"yetesy\"},\"origin\":\"idbz\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("gh", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tlffhzbkr", model.display().provider()); - Assertions.assertEquals("jjavfq", model.display().resource()); - Assertions.assertEquals("hnqoewdo", model.display().operation()); - Assertions.assertEquals("yetesy", model.display().description()); - Assertions.assertEquals("idbz", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = new OperationDetailInner().withName("gh") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("tlffhzbkr") - .withResource("jjavfq") - .withOperation("hnqoewdo") - .withDescription("yetesy")) - .withOrigin("idbz"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("gh", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tlffhzbkr", model.display().provider()); - Assertions.assertEquals("jjavfq", model.display().resource()); - Assertions.assertEquals("hnqoewdo", model.display().operation()); - Assertions.assertEquals("yetesy", model.display().description()); - Assertions.assertEquals("idbz", model.origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java deleted file mode 100644 index 3eddea433f36..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.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\":\"hqtfbovn\",\"resource\":\"kbwetnj\",\"operation\":\"p\",\"description\":\"rkzyaupia\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hqtfbovn", model.provider()); - Assertions.assertEquals("kbwetnj", model.resource()); - Assertions.assertEquals("p", model.operation()); - Assertions.assertEquals("rkzyaupia", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("hqtfbovn") - .withResource("kbwetnj") - .withOperation("p") - .withDescription("rkzyaupia"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hqtfbovn", model.provider()); - Assertions.assertEquals("kbwetnj", model.resource()); - Assertions.assertEquals("p", model.operation()); - Assertions.assertEquals("rkzyaupia", model.description()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java deleted file mode 100644 index 5801df0acd9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,44 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -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 OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"dirdammtzjgc\",\"isDataAction\":true,\"display\":{\"provider\":\"bwjjirmuydgf\",\"resource\":\"mdofgeoagfuoft\",\"operation\":\"odwxmdajwiygmgs\",\"description\":\"mdmze\"},\"origin\":\"rstgfczljdnc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dirdammtzjgc", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("bwjjirmuydgf", response.iterator().next().display().provider()); - Assertions.assertEquals("mdofgeoagfuoft", response.iterator().next().display().resource()); - Assertions.assertEquals("odwxmdajwiygmgs", response.iterator().next().display().operation()); - Assertions.assertEquals("mdmze", response.iterator().next().display().description()); - Assertions.assertEquals("rstgfczljdnc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchCollectionTests.java deleted file mode 100644 index 9c583249d5ee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchCollectionTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import com.azure.resourcemanager.appcontainers.models.PatchCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PatchCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"targetEnvironmentId\":\"is\",\"targetContainerAppId\":\"w\",\"targetRevisionId\":\"hwplefaxvx\",\"patchApplyStatus\":\"Succeeded\",\"createdAt\":\"2021-10-23T15:17:09Z\",\"lastModifiedAt\":\"2021-07-08T19:53:14Z\",\"patchDetails\":[{\"targetContainerName\":\"zeyqxtjjfzqlqhyc\",\"targetImage\":\"vodggxdbee\",\"lastDetectionTime\":\"2021-01-10T06:37:58Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"knlrariaawiuagy\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"ylyrfgiagtco\",\"targetImage\":\"ocqwogfnzjvus\",\"lastDetectionTime\":\"2021-06-09T04:39:41Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"mozuxylfsb\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"ysownbtgkbug\",\"targetImage\":\"jqctojcmisofie\",\"lastDetectionTime\":\"2021-03-06T19:28:26Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"ojyqdhcuplcplcw\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"}]},\"id\":\"lhzdsqtzb\",\"name\":\"rgnowcjhfgm\",\"type\":\"ecactx\"},{\"properties\":{\"targetEnvironmentId\":\"teyowclu\",\"targetContainerAppId\":\"vekqvgqo\",\"targetRevisionId\":\"ifzmpjwyivqi\",\"patchApplyStatus\":\"RebaseInProgress\",\"createdAt\":\"2021-05-10T21:47:58Z\",\"lastModifiedAt\":\"2021-06-21T15:40:21Z\",\"patchDetails\":[{\"targetContainerName\":\"phuagrttikteusq\",\"targetImage\":\"zkvyklx\",\"lastDetectionTime\":\"2021-04-15T18:56:28Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"affmmfblcqc\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"ibrta\",\"targetImage\":\"metttwgd\",\"lastDetectionTime\":\"2021-03-28T07:37:54Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"ihhrmo\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"Other\"},{\"targetContainerName\":\"eypxiutcxapzhyr\",\"targetImage\":\"etoge\",\"lastDetectionTime\":\"2021-07-23T00:05:49Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"slhvnhlab\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"zjcjbtr\",\"targetImage\":\"aehvvibrxjjstoq\",\"lastDetectionTime\":\"2021-08-31T22:29:59Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"pkxztmoobkl\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"Other\"}]},\"id\":\"cwq\",\"name\":\"pimaqxzhemjyh\",\"type\":\"hujswtwkozzwcul\"},{\"properties\":{\"targetEnvironmentId\":\"wpfaj\",\"targetContainerAppId\":\"wltlwtjjguktalh\",\"targetRevisionId\":\"vkcdmxzr\",\"patchApplyStatus\":\"RevisionCreationFailed\",\"createdAt\":\"2021-09-15T13:37:06Z\",\"lastModifiedAt\":\"2021-04-25T21:44:27Z\",\"patchDetails\":[{\"targetContainerName\":\"aaomylweazu\",\"targetImage\":\"cse\",\"lastDetectionTime\":\"2021-05-30T11:51:47Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"npjhlfzswpchwahf\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"fepgfew\",\"targetImage\":\"twly\",\"lastDetectionTime\":\"2021-01-13T00:28:43Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"xykxhdj\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"},{\"targetContainerName\":\"bcxf\",\"targetImage\":\"bcporxvxcjzhqizx\",\"lastDetectionTime\":\"2021-02-06T15:19:15Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"gqscj\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"Other\"},{\"targetContainerName\":\"uhdqazk\",\"targetImage\":\"tgguwpijrajcivmm\",\"lastDetectionTime\":\"2021-05-22T22:25:38Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"fiwrxgkn\",\"newLayer\":{},\"oldLayer\":{},\"patchType\":\"FrameworkAndOSSecurity\"}]},\"id\":\"zqodfvpgshox\",\"name\":\"sgbpfgzdjtx\",\"type\":\"zflbqvg\"}],\"nextLink\":\"vl\"}") - .toObject(PatchCollection.class); - Assertions.assertEquals("vl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchCollection model = new PatchCollection().withValue(Arrays.asList(new ContainerAppsPatchResourceInner(), - new ContainerAppsPatchResourceInner(), new ContainerAppsPatchResourceInner())).withNextLink("vl"); - model = BinaryData.fromObject(model).toObject(PatchCollection.class); - Assertions.assertEquals("vl", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.java deleted file mode 100644 index f15d6b9b67e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PatchDetailsNewLayer; -import org.junit.jupiter.api.Assertions; - -public final class PatchDetailsNewLayerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchDetailsNewLayer model = BinaryData - .fromString( - "{\"name\":\"jdhttzaefedxi\",\"frameworkAndVersion\":\"hrphkmcrjdqn\",\"osAndVersion\":\"fzpbgtgkyl\"}") - .toObject(PatchDetailsNewLayer.class); - Assertions.assertEquals("jdhttzaefedxi", model.name()); - Assertions.assertEquals("hrphkmcrjdqn", model.frameworkAndVersion()); - Assertions.assertEquals("fzpbgtgkyl", model.osAndVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchDetailsNewLayer model = new PatchDetailsNewLayer().withName("jdhttzaefedxi") - .withFrameworkAndVersion("hrphkmcrjdqn") - .withOsAndVersion("fzpbgtgkyl"); - model = BinaryData.fromObject(model).toObject(PatchDetailsNewLayer.class); - Assertions.assertEquals("jdhttzaefedxi", model.name()); - Assertions.assertEquals("hrphkmcrjdqn", model.frameworkAndVersion()); - Assertions.assertEquals("fzpbgtgkyl", model.osAndVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.java deleted file mode 100644 index e9bd06f3b036..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PatchDetailsOldLayer; -import org.junit.jupiter.api.Assertions; - -public final class PatchDetailsOldLayerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchDetailsOldLayer model = BinaryData - .fromString("{\"name\":\"ghrjeuutl\",\"frameworkAndVersion\":\"ez\",\"osAndVersion\":\"hokvbwnh\"}") - .toObject(PatchDetailsOldLayer.class); - Assertions.assertEquals("ghrjeuutl", model.name()); - Assertions.assertEquals("ez", model.frameworkAndVersion()); - Assertions.assertEquals("hokvbwnh", model.osAndVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchDetailsOldLayer model = new PatchDetailsOldLayer().withName("ghrjeuutl") - .withFrameworkAndVersion("ez") - .withOsAndVersion("hokvbwnh"); - model = BinaryData.fromObject(model).toObject(PatchDetailsOldLayer.class); - Assertions.assertEquals("ghrjeuutl", model.name()); - Assertions.assertEquals("ez", model.frameworkAndVersion()); - Assertions.assertEquals("hokvbwnh", model.osAndVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.java deleted file mode 100644 index 5aec217b64bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PatchDetails; - -public final class PatchDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchDetails model = BinaryData.fromString( - "{\"targetContainerName\":\"kknhxkizvytnrzv\",\"targetImage\":\"lj\",\"lastDetectionTime\":\"2021-02-20T05:38:09Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"rano\",\"newLayer\":{\"name\":\"ukkjqnvbroyla\",\"frameworkAndVersion\":\"ulcdisdosf\",\"osAndVersion\":\"jsvg\"},\"oldLayer\":{\"name\":\"hryvy\",\"frameworkAndVersion\":\"t\",\"osAndVersion\":\"lxgccknfnwmbtm\"},\"patchType\":\"FrameworkAndOSSecurity\"}") - .toObject(PatchDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchDetails model = new PatchDetails(); - model = BinaryData.fromObject(model).toObject(PatchDetails.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.java deleted file mode 100644 index f8de283c23a3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class PatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchProperties model = BinaryData.fromString( - "{\"targetEnvironmentId\":\"itgvkx\",\"targetContainerAppId\":\"yqdrf\",\"targetRevisionId\":\"cealzxwh\",\"patchApplyStatus\":\"RevisionCreationFailed\",\"createdAt\":\"2021-04-17T10:43:30Z\",\"lastModifiedAt\":\"2021-03-27T07:28:32Z\",\"patchDetails\":[{\"targetContainerName\":\"hlwigdivbkbxg\",\"targetImage\":\"mf\",\"lastDetectionTime\":\"2021-09-11T08:38:54Z\",\"detectionStatus\":\"RegistryLoginFailed\",\"newImageName\":\"asqvd\",\"newLayer\":{\"name\":\"y\",\"frameworkAndVersion\":\"xakjsqzhzb\",\"osAndVersion\":\"kgimsidxasic\"},\"oldLayer\":{\"name\":\"vvjskgfmocwahp\",\"frameworkAndVersion\":\"atjeaahh\",\"osAndVersion\":\"hhnakzybbj\"},\"patchType\":\"FrameworkSecurity\"},{\"targetContainerName\":\"jks\",\"targetImage\":\"xkyxvxevblbj\",\"lastDetectionTime\":\"2021-03-19T03:04:44Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"jlageu\",\"newLayer\":{\"name\":\"xuns\",\"frameworkAndVersion\":\"bn\",\"osAndVersion\":\"pxynenlsvxeizzg\"},\"oldLayer\":{\"name\":\"nsrmffeycx\",\"frameworkAndVersion\":\"tpiymerteea\",\"osAndVersion\":\"xqiekkkzddrtk\"},\"patchType\":\"OSSecurity\"},{\"targetContainerName\":\"jbmxvavre\",\"targetImage\":\"de\",\"lastDetectionTime\":\"2021-07-20T03:47:36Z\",\"detectionStatus\":\"Failed\",\"newImageName\":\"cuijpxt\",\"newLayer\":{\"name\":\"wprtu\",\"frameworkAndVersion\":\"sawddjibabxvi\",\"osAndVersion\":\"tvtzeexavoxtfg\"},\"oldLayer\":{\"name\":\"dmdqb\",\"frameworkAndVersion\":\"ypq\",\"osAndVersion\":\"sfj\"},\"patchType\":\"FrameworkSecurity\"},{\"targetContainerName\":\"slhhxudbxv\",\"targetImage\":\"d\",\"lastDetectionTime\":\"2021-02-13T16:52:17Z\",\"detectionStatus\":\"Succeeded\",\"newImageName\":\"irudh\",\"newLayer\":{\"name\":\"es\",\"frameworkAndVersion\":\"dlpagzrcxfail\",\"osAndVersion\":\"xwmdboxd\"},\"oldLayer\":{\"name\":\"ft\",\"frameworkAndVersion\":\"qobr\",\"osAndVersion\":\"nac\"},\"patchType\":\"FrameworkAndOSSecurity\"}]}") - .toObject(PatchProperties.class); - Assertions.assertEquals("itgvkx", model.targetEnvironmentId()); - Assertions.assertEquals("yqdrf", model.targetContainerAppId()); - Assertions.assertEquals("cealzxwh", model.targetRevisionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchProperties model = new PatchProperties().withTargetEnvironmentId("itgvkx") - .withTargetContainerAppId("yqdrf") - .withTargetRevisionId("cealzxwh"); - model = BinaryData.fromObject(model).toObject(PatchProperties.class); - Assertions.assertEquals("itgvkx", model.targetEnvironmentId()); - Assertions.assertEquals("yqdrf", model.targetContainerAppId()); - Assertions.assertEquals("cealzxwh", model.targetRevisionId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.java deleted file mode 100644 index e579f88d12b6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; -import org.junit.jupiter.api.Assertions; - -public final class PatchSkipConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PatchSkipConfig model = BinaryData.fromString("{\"skip\":false}").toObject(PatchSkipConfig.class); - Assertions.assertEquals(false, model.skip()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PatchSkipConfig model = new PatchSkipConfig().withSkip(false); - model = BinaryData.fromObject(model).toObject(PatchSkipConfig.class); - Assertions.assertEquals(false, model.skip()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java deleted file mode 100644 index 38fe3ae4de65..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PreBuildStepTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PreBuildStep model = BinaryData.fromString( - "{\"description\":\"kbogqxndlkzgx\",\"scripts\":[\"iplbpodxunkbebxm\"],\"httpGet\":{\"url\":\"yyntwl\",\"fileName\":\"qtkoievs\",\"headers\":[\"gqrlltmuwla\"]}}") - .toObject(PreBuildStep.class); - Assertions.assertEquals("kbogqxndlkzgx", model.description()); - Assertions.assertEquals("iplbpodxunkbebxm", model.scripts().get(0)); - Assertions.assertEquals("yyntwl", model.httpGet().url()); - Assertions.assertEquals("qtkoievs", model.httpGet().fileName()); - Assertions.assertEquals("gqrlltmuwla", model.httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreBuildStep model = new PreBuildStep().withDescription("kbogqxndlkzgx") - .withScripts(Arrays.asList("iplbpodxunkbebxm")) - .withHttpGet( - new HttpGet().withUrl("yyntwl").withFileName("qtkoievs").withHeaders(Arrays.asList("gqrlltmuwla"))); - model = BinaryData.fromObject(model).toObject(PreBuildStep.class); - Assertions.assertEquals("kbogqxndlkzgx", model.description()); - Assertions.assertEquals("iplbpodxunkbebxm", model.scripts().get(0)); - Assertions.assertEquals("yyntwl", model.httpGet().url()); - Assertions.assertEquals("qtkoievs", model.httpGet().fileName()); - Assertions.assertEquals("gqrlltmuwla", model.httpGet().headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 56309cd0684e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionInnerTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"groupIds\":[\"updwv\",\"phcnzqtpj\",\"mqrhvthl\",\"iwdcxsmlzzhzd\"],\"privateEndpoint\":{\"id\":\"tlgy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"vlnnpx\",\"actionsRequired\":\"afiqgeaarbgjekg\"},\"provisioningState\":\"Failed\"},\"id\":\"yulidwcwvm\",\"name\":\"eg\",\"type\":\"o\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vlnnpx", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("afiqgeaarbgjekg", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model - = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("vlnnpx") - .withActionsRequired("afiqgeaarbgjekg")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vlnnpx", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("afiqgeaarbgjekg", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 3e7a4e4cf7b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,50 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupIds\":[\"cwg\",\"xf\",\"vaknokzwjj\",\"r\"],\"privateEndpoint\":{\"id\":\"xldzyyfytpqsix\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ujivyqlkjuvsm\",\"actionsRequired\":\"slzoyov\"},\"provisioningState\":\"Waiting\"},\"id\":\"pqvyb\",\"name\":\"fgvmx\",\"type\":\"okcvtlubses\"},{\"properties\":{\"groupIds\":[\"artr\",\"unlpirykycndz\",\"qi\",\"jreuykbbmn\"],\"privateEndpoint\":{\"id\":\"ltbxoeeonqlnfw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"vqdbpbhfck\",\"actionsRequired\":\"ezcrcssbzhddubb\"},\"provisioningState\":\"Deleting\"},\"id\":\"lhkalehpavawugi\",\"name\":\"j\",\"type\":\"iogqgdminictte\"}],\"nextLink\":\"ohiygspn\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ujivyqlkjuvsm", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("slzoyov", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model - = new PrivateEndpointConnectionListResult().withValue(Arrays.asList( - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("ujivyqlkjuvsm") - .withActionsRequired("slzoyov")), - new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("vqdbpbhfck") - .withActionsRequired("ezcrcssbzhddubb")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ujivyqlkjuvsm", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("slzoyov", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 386971a32a67..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"jirwgdnqzbrfk\"],\"privateEndpoint\":{\"id\":\"hzmtksjc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"gsxcdgljplkeua\",\"actionsRequired\":\"tomflrytswfpf\"},\"provisioningState\":\"Canceled\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gsxcdgljplkeua", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("tomflrytswfpf", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("gsxcdgljplkeua") - .withActionsRequired("tomflrytswfpf")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gsxcdgljplkeua", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("tomflrytswfpf", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java deleted file mode 100644 index 4d13045f0755..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"cxnmskwhqjjyslu\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index bda795f6a37a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"iytxt\",\"requiredMembers\":[\"kvlbpktgdstyoua\",\"bewreswmowegmmut\"],\"requiredZoneNames\":[\"eyguq\"]},\"id\":\"ijiitns\",\"name\":\"xlzdesygrijwa\",\"type\":\"ufanray\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("eyguq", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("eyguq")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("eyguq", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 0a1be6cd3ae6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkResourceListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"czykmktpvw\",\"requiredMembers\":[\"sehch\",\"hufmpq\",\"mqyjgy\"],\"requiredZoneNames\":[\"lod\",\"aeuzanh\",\"fnhsenwphp\",\"fngq\"]},\"id\":\"lidftujwjj\",\"name\":\"fwbeqrkuorh\",\"type\":\"ssruqnmdvhazcvj\"}],\"nextLink\":\"iqswbqer\"}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("lod", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResult model - = new PrivateLinkResourceListResult().withValue(Arrays.asList(new PrivateLinkResourceInner() - .withRequiredZoneNames(Arrays.asList("lod", "aeuzanh", "fnhsenwphp", "fngq")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("lod", model.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index dfae8a2b2309..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,28 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"ueqfrojsyd\",\"requiredMembers\":[\"ydkygywezskieca\"],\"requiredZoneNames\":[\"zmxieqvdsmaklix\",\"cahyhx\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("zmxieqvdsmaklix", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("zmxieqvdsmaklix", "cahyhx")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("zmxieqvdsmaklix", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 91d70f5bd880..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"hhkvpedwqs\",\"actionsRequired\":\"rhmpqvwwsk\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("hhkvpedwqs", model.description()); - Assertions.assertEquals("rhmpqvwwsk", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("hhkvpedwqs") - .withActionsRequired("rhmpqvwwsk"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("hhkvpedwqs", model.description()); - Assertions.assertEquals("rhmpqvwwsk", model.actionsRequired()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java deleted file mode 100644 index c5a40200f15c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,84 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-10-26T12:31:30Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"mwqkchcxwaxf\",\"containers\":[{\"name\":\"kjexfdeqvhp\",\"containerId\":\"lkkshkbffmbmx\",\"ready\":false,\"started\":true,\"restartCount\":1026663345,\"runningState\":\"Terminated\",\"runningStateDetails\":\"xs\",\"logStreamEndpoint\":\"tf\",\"execEndpoint\":\"gicgaaoepttaq\",\"debugEndpoint\":\"dewemxswv\"},{\"name\":\"unzzjgehk\",\"containerId\":\"imrt\",\"ready\":true,\"started\":false,\"restartCount\":1206713259,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ljqepq\",\"logStreamEndpoint\":\"ixmonstshiyxg\",\"execEndpoint\":\"lfcldu\",\"debugEndpoint\":\"birdsvuwcobiegs\"},{\"name\":\"ninwjizc\",\"containerId\":\"nghgshej\",\"ready\":false,\"started\":true,\"restartCount\":1233756756,\"runningState\":\"Terminated\",\"runningStateDetails\":\"lxqzvn\",\"logStreamEndpoint\":\"sbycucrwnamikz\",\"execEndpoint\":\"rqbsmswziq\",\"debugEndpoint\":\"uhok\"}],\"initContainers\":[{\"name\":\"whvhczznvfb\",\"containerId\":\"jsxjwwix\",\"ready\":true,\"started\":true,\"restartCount\":1286205076,\"runningState\":\"Waiting\",\"runningStateDetails\":\"dvnoamldsehaohdj\",\"logStreamEndpoint\":\"flzokxco\",\"execEndpoint\":\"e\",\"debugEndpoint\":\"jetagltsxoatft\"},{\"name\":\"pnpbswveflocc\",\"containerId\":\"mozi\",\"ready\":false,\"started\":false,\"restartCount\":394748877,\"runningState\":\"Terminated\",\"runningStateDetails\":\"pkyjcxcjxgrytfm\",\"logStreamEndpoint\":\"ycilrmcaykggnox\",\"execEndpoint\":\"t\",\"debugEndpoint\":\"sxwpndfcpfnznthj\"},{\"name\":\"kjaosrxuzv\",\"containerId\":\"mktcqiosmgbza\",\"ready\":true,\"started\":false,\"restartCount\":1712162659,\"runningState\":\"Terminated\",\"runningStateDetails\":\"tlaprltzkatb\",\"logStreamEndpoint\":\"mznnbsoqeqalarvl\",\"execEndpoint\":\"un\",\"debugEndpoint\":\"gfebwlnb\"},{\"name\":\"yreeudz\",\"containerId\":\"vbpdqmjxlyyzglgo\",\"ready\":false,\"started\":false,\"restartCount\":2050380690,\"runningState\":\"Terminated\",\"runningStateDetails\":\"j\",\"logStreamEndpoint\":\"obaxkjeytu\",\"execEndpoint\":\"bfjkw\",\"debugEndpoint\":\"snkq\"}]},\"id\":\"syrq\",\"name\":\"njqhdenxa\",\"type\":\"l\"}]}") - .toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("kjexfdeqvhp", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("lkkshkbffmbmx", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(1026663345, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("whvhczznvfb", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("jsxjwwix", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1286205076, model.value().get(0).initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaCollectionInner model = new ReplicaCollectionInner().withValue(Arrays.asList(new ReplicaInner() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("kjexfdeqvhp") - .withContainerId("lkkshkbffmbmx") - .withReady(false) - .withStarted(true) - .withRestartCount(1026663345), - new ReplicaContainer().withName("unzzjgehk") - .withContainerId("imrt") - .withReady(true) - .withStarted(false) - .withRestartCount(1206713259), - new ReplicaContainer().withName("ninwjizc") - .withContainerId("nghgshej") - .withReady(false) - .withStarted(true) - .withRestartCount(1233756756))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("whvhczznvfb") - .withContainerId("jsxjwwix") - .withReady(true) - .withStarted(true) - .withRestartCount(1286205076), - new ReplicaContainer().withName("pnpbswveflocc") - .withContainerId("mozi") - .withReady(false) - .withStarted(false) - .withRestartCount(394748877), - new ReplicaContainer().withName("kjaosrxuzv") - .withContainerId("mktcqiosmgbza") - .withReady(true) - .withStarted(false) - .withRestartCount(1712162659), - new ReplicaContainer().withName("yreeudz") - .withContainerId("vbpdqmjxlyyzglgo") - .withReady(false) - .withStarted(false) - .withRestartCount(2050380690))))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("kjexfdeqvhp", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("lkkshkbffmbmx", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(1026663345, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("whvhczznvfb", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("jsxjwwix", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1286205076, model.value().get(0).initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index 7e80ed4b55ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaContainer model = BinaryData.fromString( - "{\"name\":\"uqn\",\"containerId\":\"phzfylsgcrp\",\"ready\":true,\"started\":true,\"restartCount\":1496519581,\"runningState\":\"Terminated\",\"runningStateDetails\":\"zelfwyfwl\",\"logStreamEndpoint\":\"jwetnpsihcla\",\"execEndpoint\":\"va\",\"debugEndpoint\":\"pt\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("uqn", model.name()); - Assertions.assertEquals("phzfylsgcrp", model.containerId()); - Assertions.assertEquals(true, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1496519581, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = new ReplicaContainer().withName("uqn") - .withContainerId("phzfylsgcrp") - .withReady(true) - .withStarted(true) - .withRestartCount(1496519581); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("uqn", model.name()); - Assertions.assertEquals("phzfylsgcrp", model.containerId()); - Assertions.assertEquals(true, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1496519581, model.restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java deleted file mode 100644 index aa09927054b4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,83 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaInner model = BinaryData.fromString( - "{\"properties\":{\"createdTime\":\"2021-10-07T11:54:14Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"ykprlpyznu\",\"containers\":[{\"name\":\"smexiitdf\",\"containerId\":\"tyasiibmiybnnust\",\"ready\":true,\"started\":true,\"restartCount\":1367151711,\"runningState\":\"Terminated\",\"runningStateDetails\":\"hcmavmqfo\",\"logStreamEndpoint\":\"or\",\"execEndpoint\":\"gyyprotwy\",\"debugEndpoint\":\"ndm\"},{\"name\":\"hu\",\"containerId\":\"mjkavlgorbmft\",\"ready\":true,\"started\":true,\"restartCount\":1649651263,\"runningState\":\"Running\",\"runningStateDetails\":\"vnzcyjto\",\"logStreamEndpoint\":\"vopvp\",\"execEndpoint\":\"bzqgqqi\",\"debugEndpoint\":\"dsvqwt\"},{\"name\":\"ky\",\"containerId\":\"cysihs\",\"ready\":false,\"started\":true,\"restartCount\":1889253771,\"runningState\":\"Waiting\",\"runningStateDetails\":\"tmcdzsufcohd\",\"logStreamEndpoint\":\"zlmcmuapcvhdb\",\"execEndpoint\":\"wqqxeysko\",\"debugEndpoint\":\"zinkfkbgbzbowxeq\"}],\"initContainers\":[{\"name\":\"mygvkzqkj\",\"containerId\":\"okbzef\",\"ready\":false,\"started\":true,\"restartCount\":1829804009,\"runningState\":\"Waiting\",\"runningStateDetails\":\"leipqx\",\"logStreamEndpoint\":\"wvz\",\"execEndpoint\":\"zvd\",\"debugEndpoint\":\"zdix\"},{\"name\":\"q\",\"containerId\":\"odawopqhewjptmcg\",\"ready\":true,\"started\":false,\"restartCount\":803654279,\"runningState\":\"Running\",\"runningStateDetails\":\"la\",\"logStreamEndpoint\":\"tmzlbiojlv\",\"execEndpoint\":\"rbbpneqvcwwyy\",\"debugEndpoint\":\"mochpprprsnmok\"},{\"name\":\"zejnhl\",\"containerId\":\"pbzpcpiljhahz\",\"ready\":true,\"started\":false,\"restartCount\":491953314,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ehol\",\"logStreamEndpoint\":\"jwiuubwefqsfapaq\",\"execEndpoint\":\"e\",\"debugEndpoint\":\"q\"},{\"name\":\"x\",\"containerId\":\"mfxapjwogqqno\",\"ready\":true,\"started\":true,\"restartCount\":1894525187,\"runningState\":\"Terminated\",\"runningStateDetails\":\"wpwyawbz\",\"logStreamEndpoint\":\"qbucljgkyexaoguy\",\"execEndpoint\":\"p\",\"debugEndpoint\":\"sdaultxij\"}]},\"id\":\"mfqwa\",\"name\":\"lnqnmcjn\",\"type\":\"zqdqxt\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("smexiitdf", model.containers().get(0).name()); - Assertions.assertEquals("tyasiibmiybnnust", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1367151711, model.containers().get(0).restartCount()); - Assertions.assertEquals("mygvkzqkj", model.initContainers().get(0).name()); - Assertions.assertEquals("okbzef", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1829804009, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = new ReplicaInner() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("smexiitdf") - .withContainerId("tyasiibmiybnnust") - .withReady(true) - .withStarted(true) - .withRestartCount(1367151711), - new ReplicaContainer().withName("hu") - .withContainerId("mjkavlgorbmft") - .withReady(true) - .withStarted(true) - .withRestartCount(1649651263), - new ReplicaContainer().withName("ky") - .withContainerId("cysihs") - .withReady(false) - .withStarted(true) - .withRestartCount(1889253771))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("mygvkzqkj") - .withContainerId("okbzef") - .withReady(false) - .withStarted(true) - .withRestartCount(1829804009), - new ReplicaContainer().withName("q") - .withContainerId("odawopqhewjptmcg") - .withReady(true) - .withStarted(false) - .withRestartCount(803654279), - new ReplicaContainer().withName("zejnhl") - .withContainerId("pbzpcpiljhahz") - .withReady(true) - .withStarted(false) - .withRestartCount(491953314), - new ReplicaContainer().withName("x") - .withContainerId("mfxapjwogqqno") - .withReady(true) - .withStarted(true) - .withRestartCount(1894525187))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("smexiitdf", model.containers().get(0).name()); - Assertions.assertEquals("tyasiibmiybnnust", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1367151711, model.containers().get(0).restartCount()); - Assertions.assertEquals("mygvkzqkj", model.initContainers().get(0).name()); - Assertions.assertEquals("okbzef", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1829804009, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 22af8439c00d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java +++ /dev/null @@ -1,83 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaProperties model = BinaryData.fromString( - "{\"createdTime\":\"2021-08-28T15:42:49Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"fusfzsvtuikzhajq\",\"containers\":[{\"name\":\"hm\",\"containerId\":\"qryxyn\",\"ready\":true,\"started\":true,\"restartCount\":1655994607,\"runningState\":\"Running\",\"runningStateDetails\":\"xznptgoeiyb\",\"logStreamEndpoint\":\"bp\",\"execEndpoint\":\"vf\",\"debugEndpoint\":\"kvntjlrigjkskyri\"},{\"name\":\"vzidsxwaab\",\"containerId\":\"ifrygzn\",\"ready\":false,\"started\":false,\"restartCount\":1979636769,\"runningState\":\"Waiting\",\"runningStateDetails\":\"bgopxlhslnel\",\"logStreamEndpoint\":\"eixynllxecwcroj\",\"execEndpoint\":\"slhcawjutifd\",\"debugEndpoint\":\"mvi\"},{\"name\":\"rqjb\",\"containerId\":\"zhraglkafh\",\"ready\":true,\"started\":false,\"restartCount\":1352761194,\"runningState\":\"Terminated\",\"runningStateDetails\":\"pzvcpopmxelnwc\",\"logStreamEndpoint\":\"yjede\",\"execEndpoint\":\"mlfmkqs\",\"debugEndpoint\":\"zuawxtzxpuamwa\"}],\"initContainers\":[{\"name\":\"vxcushsphaivmx\",\"containerId\":\"sflvgsgzwywakoih\",\"ready\":true,\"started\":true,\"restartCount\":1233115603,\"runningState\":\"Terminated\",\"runningStateDetails\":\"hlnymzotq\",\"logStreamEndpoint\":\"yuzcbmqqvxmvw\",\"execEndpoint\":\"tayx\",\"debugEndpoint\":\"supe\"},{\"name\":\"lzqnhcvs\",\"containerId\":\"tnzoibgsxgnxfy\",\"ready\":true,\"started\":false,\"restartCount\":520618832,\"runningState\":\"Terminated\",\"runningStateDetails\":\"o\",\"logStreamEndpoint\":\"bxiqxeiiqbimht\",\"execEndpoint\":\"winhehfqpo\",\"debugEndpoint\":\"wbcb\"},{\"name\":\"mbnkb\",\"containerId\":\"qvxkd\",\"ready\":false,\"started\":false,\"restartCount\":229905373,\"runningState\":\"Waiting\",\"runningStateDetails\":\"wbzuwfmdurage\",\"logStreamEndpoint\":\"zvcjfelisdjubggb\",\"execEndpoint\":\"gkxkbsazgakg\",\"debugEndpoint\":\"yrcmjdmspofap\"},{\"name\":\"hryl\",\"containerId\":\"ofrzgb\",\"ready\":false,\"started\":false,\"restartCount\":1946171356,\"runningState\":\"Waiting\",\"runningStateDetails\":\"l\",\"logStreamEndpoint\":\"bcuiiz\",\"execEndpoint\":\"twfans\",\"debugEndpoint\":\"pdibmikostbzbki\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("hm", model.containers().get(0).name()); - Assertions.assertEquals("qryxyn", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1655994607, model.containers().get(0).restartCount()); - Assertions.assertEquals("vxcushsphaivmx", model.initContainers().get(0).name()); - Assertions.assertEquals("sflvgsgzwywakoih", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1233115603, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = new ReplicaProperties() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("hm") - .withContainerId("qryxyn") - .withReady(true) - .withStarted(true) - .withRestartCount(1655994607), - new ReplicaContainer().withName("vzidsxwaab") - .withContainerId("ifrygzn") - .withReady(false) - .withStarted(false) - .withRestartCount(1979636769), - new ReplicaContainer().withName("rqjb") - .withContainerId("zhraglkafh") - .withReady(true) - .withStarted(false) - .withRestartCount(1352761194))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("vxcushsphaivmx") - .withContainerId("sflvgsgzwywakoih") - .withReady(true) - .withStarted(true) - .withRestartCount(1233115603), - new ReplicaContainer().withName("lzqnhcvs") - .withContainerId("tnzoibgsxgnxfy") - .withReady(true) - .withStarted(false) - .withRestartCount(520618832), - new ReplicaContainer().withName("mbnkb") - .withContainerId("qvxkd") - .withReady(false) - .withStarted(false) - .withRestartCount(229905373), - new ReplicaContainer().withName("hryl") - .withContainerId("ofrzgb") - .withReady(false) - .withStarted(false) - .withRestartCount(1946171356))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("hm", model.containers().get(0).name()); - Assertions.assertEquals("qryxyn", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(1655994607, model.containers().get(0).restartCount()); - Assertions.assertEquals("vxcushsphaivmx", model.initContainers().get(0).name()); - Assertions.assertEquals("sflvgsgzwywakoih", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(1233115603, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java deleted file mode 100644 index a900bf3e486d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java +++ /dev/null @@ -1,37 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -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 ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests { - @Test - public void testGetCustomDomainVerificationIdWithResponse() throws Exception { - String responseStr = "\"urz\""; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - String response = manager.resourceProviders() - .getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("urz", response); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java deleted file mode 100644 index 2ddd05fcf038..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java +++ /dev/null @@ -1,52 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -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 ResourceProvidersJobExecutionWithResponseMockTests { - @Test - public void testJobExecutionWithResponse() throws Exception { - String responseStr - = "{\"name\":\"ltvdhqnufbx\",\"id\":\"iibntojo\",\"type\":\"nybydhuihaouwud\",\"properties\":{\"status\":\"Degraded\",\"startTime\":\"2021-09-23T08:57:31Z\",\"endTime\":\"2021-09-06T22:13:13Z\",\"template\":{\"containers\":[{\"image\":\"umo\",\"name\":\"ircamqprlo\",\"command\":[\"gejcvjkjyczc\",\"tag\",\"lajdyoljeqyxq\",\"mzsizzhravrcjk\"],\"args\":[\"gqb\",\"cxhnqxgzxlerm\",\"merghski\"],\"env\":[{},{},{}],\"resources\":{}},{\"image\":\"pkcbkfukdljq\",\"name\":\"tsdyds\",\"command\":[\"afyalo\",\"ww\"],\"args\":[\"znyufpqzs\",\"ifgufyjfdkqiyv\",\"djokgwesym\",\"qh\"],\"env\":[{}],\"resources\":{}},{\"image\":\"lpe\",\"name\":\"zn\",\"command\":[\"eaujq\",\"bgsimwejlwbkbp\",\"zobdwbcp\"],\"args\":[\"wkuh\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"czkfwfat\",\"name\":\"wphn\",\"command\":[\"vdwgtqcume\",\"saaqgoq\"],\"args\":[\"uy\",\"sbskowkrbhz\",\"rb\"],\"env\":[{},{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"iuasfgq\",\"name\":\"cyhfaimqvdru\",\"command\":[\"gyfpeoehgfmqmsk\",\"ixvlz\",\"xplhpeva\",\"yntvzjyielbq\"],\"args\":[\"bqvknmpecqxgiq\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"bn\",\"name\":\"stlpwqp\",\"command\":[\"jkht\",\"psvyouweuiyxfw\",\"ztsm\"],\"args\":[\"evyllznfhkqyt\"],\"env\":[{},{},{}],\"resources\":{}},{\"image\":\"opgfzdgjfcy\",\"name\":\"svloyyhigq\",\"command\":[\"uqw\",\"ajquzxpixhyoi\"],\"args\":[\"dbgsosc\"],\"env\":[{},{},{},{}],\"resources\":{}}]},\"detailedStatus\":{\"replicas\":[{\"name\":\"ennmf\",\"containers\":[{},{},{},{}]},{\"name\":\"nrtekw\",\"containers\":[{}]},{\"name\":\"ro\",\"containers\":[{},{},{},{}]},{\"name\":\"d\",\"containers\":[{},{}]}]}}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobExecution response = manager.resourceProviders() - .jobExecutionWithResponse("fedsbgz", "ncoinmphymc", "i", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ltvdhqnufbx", response.name()); - Assertions.assertEquals("iibntojo", response.id()); - Assertions.assertEquals("nybydhuihaouwud", response.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-23T08:57:31Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-06T22:13:13Z"), response.endTime()); - Assertions.assertEquals("umo", response.template().containers().get(0).image()); - Assertions.assertEquals("ircamqprlo", response.template().containers().get(0).name()); - Assertions.assertEquals("gejcvjkjyczc", response.template().containers().get(0).command().get(0)); - Assertions.assertEquals("gqb", response.template().containers().get(0).args().get(0)); - Assertions.assertEquals("iuasfgq", response.template().initContainers().get(0).image()); - Assertions.assertEquals("cyhfaimqvdru", response.template().initContainers().get(0).name()); - Assertions.assertEquals("gyfpeoehgfmqmsk", response.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("bqvknmpecqxgiq", response.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals("ennmf", response.detailedStatus().replicas().get(0).name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java deleted file mode 100644 index f4c894a1fecd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,26 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; - -public final class RevisionCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RevisionCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-25T16:08:34Z\",\"lastActiveTime\":\"2021-05-08T04:39:02Z\",\"fqdn\":\"ipifhpfeoajvg\",\"template\":{\"revisionSuffix\":\"xjcsheafidltu\",\"terminationGracePeriodSeconds\":8187666305787624959,\"initContainers\":[{}],\"containers\":[{},{},{}],\"scale\":{\"minReplicas\":240183027,\"maxReplicas\":1632871841,\"cooldownPeriod\":1883095042,\"pollingInterval\":84921922,\"rules\":[{},{},{},{}]},\"volumes\":[{},{},{}],\"serviceBinds\":[{},{},{}]},\"active\":false,\"replicas\":592289991,\"trafficWeight\":756597053,\"provisioningError\":\"ucb\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioned\",\"runningState\":\"Running\"},\"id\":\"mcwsldrizetpwb\",\"name\":\"a\",\"type\":\"llibphbqzmizak\"},{\"properties\":{\"createdTime\":\"2021-02-12T00:07:30Z\",\"lastActiveTime\":\"2021-02-11T14:59:40Z\",\"fqdn\":\"dnjzh\",\"template\":{\"revisionSuffix\":\"ylhjlm\",\"terminationGracePeriodSeconds\":1077522990830391189,\"initContainers\":[{},{}],\"containers\":[{},{}],\"scale\":{\"minReplicas\":1631755461,\"maxReplicas\":1003988498,\"cooldownPeriod\":596523417,\"pollingInterval\":608923593,\"rules\":[{},{},{},{}]},\"volumes\":[{},{}],\"serviceBinds\":[{},{},{},{}]},\"active\":true,\"replicas\":1672946681,\"trafficWeight\":2018313749,\"provisioningError\":\"xdza\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\",\"runningState\":\"Failed\"},\"id\":\"uufuz\",\"name\":\"oyjathwtzol\",\"type\":\"a\"}],\"nextLink\":\"wm\"}") - .toObject(RevisionCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionCollection model - = new RevisionCollection().withValue(Arrays.asList(new RevisionInner(), new RevisionInner())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeDotnetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeDotnetTests.java deleted file mode 100644 index b50e3a2d8b7e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeDotnetTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeDotnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeDotnet model - = BinaryData.fromString("{\"autoConfigureDataProtection\":true}").toObject(RuntimeDotnet.class); - Assertions.assertEquals(true, model.autoConfigureDataProtection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeDotnet model = new RuntimeDotnet().withAutoConfigureDataProtection(true); - model = BinaryData.fromObject(model).toObject(RuntimeDotnet.class); - Assertions.assertEquals(true, model.autoConfigureDataProtection()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.java deleted file mode 100644 index c69d8d7cd0f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeJavaAgentLoggingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeJavaAgentLogging model = BinaryData.fromString( - "{\"loggerSettings\":[{\"logger\":\"kzbzkdvncjabudu\",\"level\":\"debug\"},{\"logger\":\"kakmokzh\",\"level\":\"debug\"}]}") - .toObject(RuntimeJavaAgentLogging.class); - Assertions.assertEquals("kzbzkdvncjabudu", model.loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.DEBUG, model.loggerSettings().get(0).level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeJavaAgentLogging model = new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("kzbzkdvncjabudu").withLevel(Level.DEBUG), - new LoggerSetting().withLogger("kakmokzh").withLevel(Level.DEBUG))); - model = BinaryData.fromObject(model).toObject(RuntimeJavaAgentLogging.class); - Assertions.assertEquals("kzbzkdvncjabudu", model.loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.DEBUG, model.loggerSettings().get(0).level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.java deleted file mode 100644 index 172e7eae5d55..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeJavaAgentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeJavaAgent model = BinaryData.fromString( - "{\"enabled\":true,\"logging\":{\"loggerSettings\":[{\"logger\":\"jorwkqnyhgbij\",\"level\":\"warn\"},{\"logger\":\"ivfxzsjabibsyst\",\"level\":\"trace\"},{\"logger\":\"fsdjpvkvp\",\"level\":\"error\"}]}}") - .toObject(RuntimeJavaAgent.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jorwkqnyhgbij", model.logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.logging().loggerSettings().get(0).level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeJavaAgent model = new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("jorwkqnyhgbij").withLevel(Level.WARN), - new LoggerSetting().withLogger("ivfxzsjabibsyst").withLevel(Level.TRACE), - new LoggerSetting().withLogger("fsdjpvkvp").withLevel(Level.ERROR)))); - model = BinaryData.fromObject(model).toObject(RuntimeJavaAgent.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jorwkqnyhgbij", model.logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.logging().loggerSettings().get(0).level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.java deleted file mode 100644 index b17937e90348..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeJavaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeJava model = BinaryData.fromString( - "{\"enableMetrics\":true,\"javaAgent\":{\"enabled\":false,\"logging\":{\"loggerSettings\":[{\"logger\":\"wm\",\"level\":\"info\"}]}}}") - .toObject(RuntimeJava.class); - Assertions.assertEquals(true, model.enableMetrics()); - Assertions.assertEquals(false, model.javaAgent().enabled()); - Assertions.assertEquals("wm", model.javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.INFO, model.javaAgent().logging().loggerSettings().get(0).level()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeJava model = new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(false) - .withLogging(new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("wm").withLevel(Level.INFO))))); - model = BinaryData.fromObject(model).toObject(RuntimeJava.class); - Assertions.assertEquals(true, model.enableMetrics()); - Assertions.assertEquals(false, model.javaAgent().enabled()); - Assertions.assertEquals("wm", model.javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.INFO, model.javaAgent().logging().loggerSettings().get(0).level()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.java deleted file mode 100644 index 2b2ccda78d1e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.java +++ /dev/null @@ -1,48 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Level; -import com.azure.resourcemanager.appcontainers.models.LoggerSetting; -import com.azure.resourcemanager.appcontainers.models.Runtime; -import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; -import com.azure.resourcemanager.appcontainers.models.RuntimeJava; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; -import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Runtime model = BinaryData.fromString( - "{\"java\":{\"enableMetrics\":true,\"javaAgent\":{\"enabled\":true,\"logging\":{\"loggerSettings\":[{\"logger\":\"g\",\"level\":\"warn\"},{\"logger\":\"fvpdbo\",\"level\":\"warn\"},{\"logger\":\"cizsjqlhkrribdei\",\"level\":\"debug\"}]}}},\"dotnet\":{\"autoConfigureDataProtection\":false}}") - .toObject(Runtime.class); - Assertions.assertEquals(true, model.java().enableMetrics()); - Assertions.assertEquals(true, model.java().javaAgent().enabled()); - Assertions.assertEquals("g", model.java().javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.java().javaAgent().logging().loggerSettings().get(0).level()); - Assertions.assertEquals(false, model.dotnet().autoConfigureDataProtection()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Runtime model = new Runtime() - .withJava(new RuntimeJava().withEnableMetrics(true) - .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) - .withLogging(new RuntimeJavaAgentLogging() - .withLoggerSettings(Arrays.asList(new LoggerSetting().withLogger("g").withLevel(Level.WARN), - new LoggerSetting().withLogger("fvpdbo").withLevel(Level.WARN), - new LoggerSetting().withLogger("cizsjqlhkrribdei").withLevel(Level.DEBUG)))))) - .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(false)); - model = BinaryData.fromObject(model).toObject(Runtime.class); - Assertions.assertEquals(true, model.java().enableMetrics()); - Assertions.assertEquals(true, model.java().javaAgent().enabled()); - Assertions.assertEquals("g", model.java().javaAgent().logging().loggerSettings().get(0).logger()); - Assertions.assertEquals(Level.WARN, model.java().javaAgent().logging().loggerSettings().get(0).level()); - Assertions.assertEquals(false, model.dotnet().autoConfigureDataProtection()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.java deleted file mode 100644 index 5c94dc489775..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleConfiguration model - = BinaryData.fromString("{\"maxConcurrentSessions\":1887957925,\"readySessionInstances\":666535336}") - .toObject(ScaleConfiguration.class); - Assertions.assertEquals(1887957925, model.maxConcurrentSessions()); - Assertions.assertEquals(666535336, model.readySessionInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleConfiguration model - = new ScaleConfiguration().withMaxConcurrentSessions(1887957925).withReadySessionInstances(666535336); - model = BinaryData.fromObject(model).toObject(ScaleConfiguration.class); - Assertions.assertEquals(1887957925, model.maxConcurrentSessions()); - Assertions.assertEquals(666535336, model.readySessionInstances()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.java deleted file mode 100644 index 2d9636e6e4c7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.java +++ /dev/null @@ -1,39 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ScgRoute; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScgRouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScgRoute model = BinaryData.fromString( - "{\"id\":\"rbhmpfulubef\",\"uri\":\"ybpmf\",\"predicates\":[\"nunmpzkrv\",\"yifkdschlzvf\"],\"filters\":[\"nkjjwgcwnphbkgf\",\"rtogmhmj\",\"jsc\",\"fp\"],\"order\":4170299053453455281}") - .toObject(ScgRoute.class); - Assertions.assertEquals("rbhmpfulubef", model.id()); - Assertions.assertEquals("ybpmf", model.uri()); - Assertions.assertEquals("nunmpzkrv", model.predicates().get(0)); - Assertions.assertEquals("nkjjwgcwnphbkgf", model.filters().get(0)); - Assertions.assertEquals(4170299053453455281L, model.order()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScgRoute model = new ScgRoute().withId("rbhmpfulubef") - .withUri("ybpmf") - .withPredicates(Arrays.asList("nunmpzkrv", "yifkdschlzvf")) - .withFilters(Arrays.asList("nkjjwgcwnphbkgf", "rtogmhmj", "jsc", "fp")) - .withOrder(4170299053453455281L); - model = BinaryData.fromObject(model).toObject(ScgRoute.class); - Assertions.assertEquals("rbhmpfulubef", model.id()); - Assertions.assertEquals("ybpmf", model.uri()); - Assertions.assertEquals("nunmpzkrv", model.predicates().get(0)); - Assertions.assertEquals("nkjjwgcwnphbkgf", model.filters().get(0)); - Assertions.assertEquals(4170299053453455281L, model.order()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java deleted file mode 100644 index be1ca258d665..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Service; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Service model = BinaryData.fromString("{\"type\":\"wqlgzrf\"}").toObject(Service.class); - Assertions.assertEquals("wqlgzrf", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Service model = new Service().withType("wqlgzrf"); - model = BinaryData.fromObject(model).toObject(Service.class); - Assertions.assertEquals("wqlgzrf", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionContainerResourcesTests.java deleted file mode 100644 index dbc14af3db00..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionContainerResourcesTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class SessionContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionContainerResources model - = BinaryData.fromString("{\"cpu\":23.363409382810364,\"memory\":\"bjuyrsrziuctixg\"}") - .toObject(SessionContainerResources.class); - Assertions.assertEquals(23.363409382810364D, model.cpu()); - Assertions.assertEquals("bjuyrsrziuctixg", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionContainerResources model - = new SessionContainerResources().withCpu(23.363409382810364D).withMemory("bjuyrsrziuctixg"); - model = BinaryData.fromObject(model).toObject(SessionContainerResources.class); - Assertions.assertEquals(23.363409382810364D, model.cpu()); - Assertions.assertEquals("bjuyrsrziuctixg", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java deleted file mode 100644 index eb7c8bc7dcc4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java +++ /dev/null @@ -1,24 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.SessionIngress; -import org.junit.jupiter.api.Assertions; - -public final class SessionIngressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionIngress model = BinaryData.fromString("{\"targetPort\":1033941226}").toObject(SessionIngress.class); - Assertions.assertEquals(1033941226, model.targetPort()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionIngress model = new SessionIngress().withTargetPort(1033941226); - model = BinaryData.fromObject(model).toObject(SessionIngress.class); - Assertions.assertEquals(1033941226, model.targetPort()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.java deleted file mode 100644 index 4686fce9724b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; -import org.junit.jupiter.api.Assertions; - -public final class SessionNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionNetworkConfiguration model - = BinaryData.fromString("{\"status\":\"EgressEnabled\"}").toObject(SessionNetworkConfiguration.class); - Assertions.assertEquals(SessionNetworkStatus.EGRESS_ENABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionNetworkConfiguration model - = new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED); - model = BinaryData.fromObject(model).toObject(SessionNetworkConfiguration.class); - Assertions.assertEquals(SessionNetworkStatus.EGRESS_ENABLED, model.status()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.java deleted file mode 100644 index 6d7771b7d6b9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.SessionPoolSecret; -import org.junit.jupiter.api.Assertions; - -public final class SessionPoolSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionPoolSecret model - = BinaryData.fromString("{\"name\":\"pemtuoqu\",\"value\":\"yegq\"}").toObject(SessionPoolSecret.class); - Assertions.assertEquals("pemtuoqu", model.name()); - Assertions.assertEquals("yegq", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionPoolSecret model = new SessionPoolSecret().withName("pemtuoqu").withValue("yegq"); - model = BinaryData.fromObject(model).toObject(SessionPoolSecret.class); - Assertions.assertEquals("pemtuoqu", model.name()); - Assertions.assertEquals("yegq", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java deleted file mode 100644 index 50f99a1228b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java +++ /dev/null @@ -1,52 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringBootAdminComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringBootAdminComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringBootAdmin\",\"ingress\":{\"fqdn\":\"kvzwydw\"},\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"gkskjivbss\",\"value\":\"jqf\"},{\"propertyName\":\"peexpgeumilhwuit\",\"value\":\"exyionofninbd\"},{\"propertyName\":\"s\",\"value\":\"wqqrsmpcbbprtuga\"}],\"scale\":{\"minReplicas\":859644110,\"maxReplicas\":1675076969},\"serviceBinds\":[{\"name\":\"vm\",\"serviceId\":\"gd\"},{\"name\":\"bfcmkrfts\",\"serviceId\":\"wjjxsgm\"},{\"name\":\"wvif\",\"serviceId\":\"kecifhocjxwklo\"},{\"name\":\"rvtxvcmufunlc\",\"serviceId\":\"xvi\"}]}") - .toObject(SpringBootAdminComponent.class); - Assertions.assertEquals("gkskjivbss", model.configurations().get(0).propertyName()); - Assertions.assertEquals("jqf", model.configurations().get(0).value()); - Assertions.assertEquals(859644110, model.scale().minReplicas()); - Assertions.assertEquals(1675076969, model.scale().maxReplicas()); - Assertions.assertEquals("vm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("gd", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringBootAdminComponent model = new SpringBootAdminComponent() - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("gkskjivbss").withValue("jqf"), - new JavaComponentConfigurationProperty().withPropertyName("peexpgeumilhwuit") - .withValue("exyionofninbd"), - new JavaComponentConfigurationProperty().withPropertyName("s").withValue("wqqrsmpcbbprtuga"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(859644110).withMaxReplicas(1675076969)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("vm").withServiceId("gd"), - new JavaComponentServiceBind().withName("bfcmkrfts").withServiceId("wjjxsgm"), - new JavaComponentServiceBind().withName("wvif").withServiceId("kecifhocjxwklo"), - new JavaComponentServiceBind().withName("rvtxvcmufunlc").withServiceId("xvi"))) - .withIngress(new JavaComponentIngress()); - model = BinaryData.fromObject(model).toObject(SpringBootAdminComponent.class); - Assertions.assertEquals("gkskjivbss", model.configurations().get(0).propertyName()); - Assertions.assertEquals("jqf", model.configurations().get(0).value()); - Assertions.assertEquals(859644110, model.scale().minReplicas()); - Assertions.assertEquals(1675076969, model.scale().maxReplicas()); - Assertions.assertEquals("vm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("gd", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java deleted file mode 100644 index c88fcabe87bc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java +++ /dev/null @@ -1,47 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringCloudConfigComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringCloudConfigComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringCloudConfigComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"ekraokqkbudbt\",\"value\":\"okbavlyttaak\"},{\"propertyName\":\"frkebsmhpd\",\"value\":\"dig\"},{\"propertyName\":\"olekscbctnanqim\",\"value\":\"zxpdcldpkawnsnl\"},{\"propertyName\":\"mouxwksqmudmfco\",\"value\":\"icziuswswjrkb\"}],\"scale\":{\"minReplicas\":1858823351,\"maxReplicas\":1182597783},\"serviceBinds\":[{\"name\":\"yfscyrfwbivqvo\",\"serviceId\":\"uyzwvbhlimbyqecr\"}]}") - .toObject(SpringCloudConfigComponent.class); - Assertions.assertEquals("ekraokqkbudbt", model.configurations().get(0).propertyName()); - Assertions.assertEquals("okbavlyttaak", model.configurations().get(0).value()); - Assertions.assertEquals(1858823351, model.scale().minReplicas()); - Assertions.assertEquals(1182597783, model.scale().maxReplicas()); - Assertions.assertEquals("yfscyrfwbivqvo", model.serviceBinds().get(0).name()); - Assertions.assertEquals("uyzwvbhlimbyqecr", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringCloudConfigComponent model = new SpringCloudConfigComponent().withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("ekraokqkbudbt").withValue("okbavlyttaak"), - new JavaComponentConfigurationProperty().withPropertyName("frkebsmhpd").withValue("dig"), - new JavaComponentConfigurationProperty().withPropertyName("olekscbctnanqim").withValue("zxpdcldpkawnsnl"), - new JavaComponentConfigurationProperty().withPropertyName("mouxwksqmudmfco").withValue("icziuswswjrkb"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1858823351).withMaxReplicas(1182597783)) - .withServiceBinds(Arrays - .asList(new JavaComponentServiceBind().withName("yfscyrfwbivqvo").withServiceId("uyzwvbhlimbyqecr"))); - model = BinaryData.fromObject(model).toObject(SpringCloudConfigComponent.class); - Assertions.assertEquals("ekraokqkbudbt", model.configurations().get(0).propertyName()); - Assertions.assertEquals("okbavlyttaak", model.configurations().get(0).value()); - Assertions.assertEquals(1858823351, model.scale().minReplicas()); - Assertions.assertEquals(1182597783, model.scale().maxReplicas()); - Assertions.assertEquals("yfscyrfwbivqvo", model.serviceBinds().get(0).name()); - Assertions.assertEquals("uyzwvbhlimbyqecr", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java deleted file mode 100644 index 6295fd22da8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java +++ /dev/null @@ -1,50 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.SpringCloudEurekaComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringCloudEurekaComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringCloudEurekaComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudEureka\",\"ingress\":{\"fqdn\":\"yyrlhgenu\"},\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"veb\",\"value\":\"szllrzlsmmdqgmi\"},{\"propertyName\":\"pimcqrhn\",\"value\":\"minkl\"},{\"propertyName\":\"xsvtzarhzvqnsqk\",\"value\":\"mbjwzzoslpkyb\"}],\"scale\":{\"minReplicas\":1366421495,\"maxReplicas\":493622397},\"serviceBinds\":[{\"name\":\"jsqjcemqbm\",\"serviceId\":\"vqar\"},{\"name\":\"xuqreblu\",\"serviceId\":\"mbwxsfg\"}]}") - .toObject(SpringCloudEurekaComponent.class); - Assertions.assertEquals("veb", model.configurations().get(0).propertyName()); - Assertions.assertEquals("szllrzlsmmdqgmi", model.configurations().get(0).value()); - Assertions.assertEquals(1366421495, model.scale().minReplicas()); - Assertions.assertEquals(493622397, model.scale().maxReplicas()); - Assertions.assertEquals("jsqjcemqbm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("vqar", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringCloudEurekaComponent model = new SpringCloudEurekaComponent() - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("veb").withValue("szllrzlsmmdqgmi"), - new JavaComponentConfigurationProperty().withPropertyName("pimcqrhn").withValue("minkl"), - new JavaComponentConfigurationProperty().withPropertyName("xsvtzarhzvqnsqk") - .withValue("mbjwzzoslpkyb"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1366421495).withMaxReplicas(493622397)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("jsqjcemqbm").withServiceId("vqar"), - new JavaComponentServiceBind().withName("xuqreblu").withServiceId("mbwxsfg"))) - .withIngress(new JavaComponentIngress()); - model = BinaryData.fromObject(model).toObject(SpringCloudEurekaComponent.class); - Assertions.assertEquals("veb", model.configurations().get(0).propertyName()); - Assertions.assertEquals("szllrzlsmmdqgmi", model.configurations().get(0).value()); - Assertions.assertEquals(1366421495, model.scale().minReplicas()); - Assertions.assertEquals(493622397, model.scale().maxReplicas()); - Assertions.assertEquals("jsqjcemqbm", model.serviceBinds().get(0).name()); - Assertions.assertEquals("vqar", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.java deleted file mode 100644 index 3601782d9f7b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.java +++ /dev/null @@ -1,81 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentIngress; -import com.azure.resourcemanager.appcontainers.models.JavaComponentPropertiesScale; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.ScgRoute; -import com.azure.resourcemanager.appcontainers.models.SpringCloudGatewayComponent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SpringCloudGatewayComponentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SpringCloudGatewayComponent model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudGateway\",\"ingress\":{\"fqdn\":\"xifvqnrxtmbpjpt\"},\"springCloudGatewayRoutes\":[{\"id\":\"jhrsidqpxlb\",\"uri\":\"pakftngatwm\",\"predicates\":[\"u\",\"rymdwmf\"],\"filters\":[\"y\",\"vjqdvdwkq\",\"ldrlefgnaavua\",\"n\"],\"order\":1685167136810834762},{\"id\":\"outnpdctuhspfefy\",\"uri\":\"hduyeuyldph\",\"predicates\":[\"bkcgsuthhllnm\",\"y\",\"efxexlf\",\"i\"],\"filters\":[\"tjrrlkmds\",\"jhhxdlajf\"],\"order\":1421309624350000860},{\"id\":\"scv\",\"uri\":\"lxlhuavkrm\",\"predicates\":[\"yjmkxettc\",\"lojfkqidnqto\",\"xjhqxcsqhtkb\",\"nqlrng\"],\"filters\":[\"biipsnawwlqkznx\",\"hllxricctkw\",\"uqqoaj\",\"eiyglesrwvaexhdc\"],\"order\":6015888492629008209},{\"id\":\"qnkbrupobehdm\",\"uri\":\"jzacvumepjpbibn\",\"predicates\":[\"hep\",\"fexleqirccjcly\",\"cgxvrpj\",\"vczuodacpune\"],\"filters\":[\"pdjxqeskoynu\",\"ylpckaewsedv\",\"skwxe\"],\"order\":2622213002534691170}],\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"hctmjtsgh\",\"value\":\"c\"},{\"propertyName\":\"pzarpzeqacdld\",\"value\":\"mpypefcpczshnuq\"},{\"propertyName\":\"aizu\",\"value\":\"kh\"}],\"scale\":{\"minReplicas\":1288045967,\"maxReplicas\":529640941},\"serviceBinds\":[{\"name\":\"tvtv\",\"serviceId\":\"w\"}]}") - .toObject(SpringCloudGatewayComponent.class); - Assertions.assertEquals("hctmjtsgh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("c", model.configurations().get(0).value()); - Assertions.assertEquals(1288045967, model.scale().minReplicas()); - Assertions.assertEquals(529640941, model.scale().maxReplicas()); - Assertions.assertEquals("tvtv", model.serviceBinds().get(0).name()); - Assertions.assertEquals("w", model.serviceBinds().get(0).serviceId()); - Assertions.assertEquals("jhrsidqpxlb", model.springCloudGatewayRoutes().get(0).id()); - Assertions.assertEquals("pakftngatwm", model.springCloudGatewayRoutes().get(0).uri()); - Assertions.assertEquals("u", model.springCloudGatewayRoutes().get(0).predicates().get(0)); - Assertions.assertEquals("y", model.springCloudGatewayRoutes().get(0).filters().get(0)); - Assertions.assertEquals(1685167136810834762L, model.springCloudGatewayRoutes().get(0).order()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SpringCloudGatewayComponent model = new SpringCloudGatewayComponent() - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("hctmjtsgh").withValue("c"), - new JavaComponentConfigurationProperty().withPropertyName("pzarpzeqacdld") - .withValue("mpypefcpczshnuq"), - new JavaComponentConfigurationProperty().withPropertyName("aizu").withValue("kh"))) - .withScale(new JavaComponentPropertiesScale().withMinReplicas(1288045967).withMaxReplicas(529640941)) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("tvtv").withServiceId("w"))) - .withIngress(new JavaComponentIngress()) - .withSpringCloudGatewayRoutes(Arrays.asList( - new ScgRoute().withId("jhrsidqpxlb") - .withUri("pakftngatwm") - .withPredicates(Arrays.asList("u", "rymdwmf")) - .withFilters(Arrays.asList("y", "vjqdvdwkq", "ldrlefgnaavua", "n")) - .withOrder(1685167136810834762L), - new ScgRoute().withId("outnpdctuhspfefy") - .withUri("hduyeuyldph") - .withPredicates(Arrays.asList("bkcgsuthhllnm", "y", "efxexlf", "i")) - .withFilters(Arrays.asList("tjrrlkmds", "jhhxdlajf")) - .withOrder(1421309624350000860L), - new ScgRoute().withId("scv") - .withUri("lxlhuavkrm") - .withPredicates(Arrays.asList("yjmkxettc", "lojfkqidnqto", "xjhqxcsqhtkb", "nqlrng")) - .withFilters(Arrays.asList("biipsnawwlqkznx", "hllxricctkw", "uqqoaj", "eiyglesrwvaexhdc")) - .withOrder(6015888492629008209L), - new ScgRoute().withId("qnkbrupobehdm") - .withUri("jzacvumepjpbibn") - .withPredicates(Arrays.asList("hep", "fexleqirccjcly", "cgxvrpj", "vczuodacpune")) - .withFilters(Arrays.asList("pdjxqeskoynu", "ylpckaewsedv", "skwxe")) - .withOrder(2622213002534691170L))); - model = BinaryData.fromObject(model).toObject(SpringCloudGatewayComponent.class); - Assertions.assertEquals("hctmjtsgh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("c", model.configurations().get(0).value()); - Assertions.assertEquals(1288045967, model.scale().minReplicas()); - Assertions.assertEquals(529640941, model.scale().maxReplicas()); - Assertions.assertEquals("tvtv", model.serviceBinds().get(0).name()); - Assertions.assertEquals("w", model.serviceBinds().get(0).serviceId()); - Assertions.assertEquals("jhrsidqpxlb", model.springCloudGatewayRoutes().get(0).id()); - Assertions.assertEquals("pakftngatwm", model.springCloudGatewayRoutes().get(0).uri()); - Assertions.assertEquals("u", model.springCloudGatewayRoutes().get(0).predicates().get(0)); - Assertions.assertEquals("y", model.springCloudGatewayRoutes().get(0).filters().get(0)); - Assertions.assertEquals(1685167136810834762L, model.springCloudGatewayRoutes().get(0).order()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java deleted file mode 100644 index 525f953e5e6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class TcpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpConnectionPool model - = BinaryData.fromString("{\"maxConnections\":171596164}").toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpConnectionPool model = new TcpConnectionPool().withMaxConnections(171596164); - model = BinaryData.fromObject(model).toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java deleted file mode 100644 index aa0e1f0e2019..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java +++ /dev/null @@ -1,25 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TcpRetryPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpRetryPolicy model - = BinaryData.fromString("{\"maxConnectAttempts\":56034680}").toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpRetryPolicy model = new TcpRetryPolicy().withMaxConnectAttempts(56034680); - model = BinaryData.fromObject(model).toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java deleted file mode 100644 index 22186455269f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TimeoutPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TimeoutPolicy model = BinaryData - .fromString("{\"responseTimeoutInSeconds\":2068674986,\"connectionTimeoutInSeconds\":974822937}") - .toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeoutPolicy model - = new TimeoutPolicy().withResponseTimeoutInSeconds(2068674986).withConnectionTimeoutInSeconds(974822937); - model = BinaryData.fromObject(model).toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java deleted file mode 100644 index e2c19cb8f5f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TracesConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TracesConfiguration model - = BinaryData.fromString("{\"includeDapr\":true,\"destinations\":[\"cdxfzzzwyjafitl\",\"guyn\",\"chl\"]}") - .toObject(TracesConfiguration.class); - Assertions.assertEquals(true, model.includeDapr()); - Assertions.assertEquals("cdxfzzzwyjafitl", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TracesConfiguration model = new TracesConfiguration().withIncludeDapr(true) - .withDestinations(Arrays.asList("cdxfzzzwyjafitl", "guyn", "chl")); - model = BinaryData.fromObject(model).toObject(TracesConfiguration.class); - Assertions.assertEquals(true, model.includeDapr()); - Assertions.assertEquals("cdxfzzzwyjafitl", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java deleted file mode 100644 index 9b0e9c8a0b8c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import org.junit.jupiter.api.Assertions; - -public final class TrafficWeightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrafficWeight model = BinaryData.fromString( - "{\"revisionName\":\"cngqqmoakufgmjz\",\"weight\":1463483261,\"latestRevision\":false,\"label\":\"twaenuuzko\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("cngqqmoakufgmjz", model.revisionName()); - Assertions.assertEquals(1463483261, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("twaenuuzko", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = new TrafficWeight().withRevisionName("cngqqmoakufgmjz") - .withWeight(1463483261) - .withLatestRevision(false) - .withLabel("twaenuuzko"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("cngqqmoakufgmjz", model.revisionName()); - Assertions.assertEquals(1463483261, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("twaenuuzko", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java deleted file mode 100644 index 6edb251cc04e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java +++ /dev/null @@ -1,35 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = BinaryData.fromString( - "{\"currentValue\":89.70679,\"limit\":84.81147,\"name\":{\"value\":\"ycs\",\"localizedValue\":\"zyvoaqa\"}}") - .toObject(UsageInner.class); - Assertions.assertEquals(89.70679f, model.currentValue()); - Assertions.assertEquals(84.81147f, model.limit()); - Assertions.assertEquals("ycs", model.name().value()); - Assertions.assertEquals("zyvoaqa", model.name().localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner().withCurrentValue(89.70679f) - .withLimit(84.81147f) - .withName(new UsageName().withValue("ycs").withLocalizedValue("zyvoaqa")); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - Assertions.assertEquals(89.70679f, model.currentValue()); - Assertions.assertEquals(84.81147f, model.limit()); - Assertions.assertEquals("ycs", model.name().value()); - Assertions.assertEquals("zyvoaqa", model.name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java deleted file mode 100644 index f9b563051635..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java +++ /dev/null @@ -1,27 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model - = BinaryData.fromString("{\"value\":\"vehzp\",\"localizedValue\":\"mk\"}").toObject(UsageName.class); - Assertions.assertEquals("vehzp", model.value()); - Assertions.assertEquals("mk", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName().withValue("vehzp").withLocalizedValue("mk"); - model = BinaryData.fromObject(model).toObject(UsageName.class); - Assertions.assertEquals("vehzp", model.value()); - Assertions.assertEquals("mk", model.localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java deleted file mode 100644 index a831bcbf5709..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java +++ /dev/null @@ -1,41 +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.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Usage; -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 UsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"currentValue\":55.734398,\"limit\":3.051567,\"name\":{\"value\":\"qbqxfbbigcfd\",\"localizedValue\":\"fxnfbm\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ContainerAppsApiManager manager = ContainerAppsApiManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().list("qldqabn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(55.734398f, response.iterator().next().currentValue()); - Assertions.assertEquals(3.051567f, response.iterator().next().limit()); - Assertions.assertEquals("qbqxfbbigcfd", response.iterator().next().name().value()); - Assertions.assertEquals("fxnfbm", response.iterator().next().name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index c23c32492ae2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"2a01a815-0c82-4264-9572-64890cd5a3ec\",\"clientId\":\"e22fb5da-0dc2-4e42-a85f-75958f373363\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java deleted file mode 100644 index ebfd835a8ec6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VnetConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VnetConfiguration model = BinaryData.fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"pubntnbatz\",\"dockerBridgeCidr\":\"qs\",\"platformReservedCidr\":\"saaelca\",\"platformReservedDnsIP\":\"cjuhplrvkm\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("pubntnbatz", model.infrastructureSubnetId()); - Assertions.assertEquals("qs", model.dockerBridgeCidr()); - Assertions.assertEquals("saaelca", model.platformReservedCidr()); - Assertions.assertEquals("cjuhplrvkm", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = new VnetConfiguration().withInternal(true) - .withInfrastructureSubnetId("pubntnbatz") - .withDockerBridgeCidr("qs") - .withPlatformReservedCidr("saaelca") - .withPlatformReservedDnsIp("cjuhplrvkm"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("pubntnbatz", model.infrastructureSubnetId()); - Assertions.assertEquals("qs", model.dockerBridgeCidr()); - Assertions.assertEquals("saaelca", model.platformReservedCidr()); - Assertions.assertEquals("cjuhplrvkm", model.platformReservedDnsIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java deleted file mode 100644 index e3efd088bbf0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java +++ /dev/null @@ -1,30 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import org.junit.jupiter.api.Assertions; - -public final class VolumeMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeMount model - = BinaryData.fromString("{\"volumeName\":\"kbwcc\",\"mountPath\":\"jvcdwxlpqekf\",\"subPath\":\"khtj\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("kbwcc", model.volumeName()); - Assertions.assertEquals("jvcdwxlpqekf", model.mountPath()); - Assertions.assertEquals("khtj", model.subPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model = new VolumeMount().withVolumeName("kbwcc").withMountPath("jvcdwxlpqekf").withSubPath("khtj"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("kbwcc", model.volumeName()); - Assertions.assertEquals("jvcdwxlpqekf", model.mountPath()); - Assertions.assertEquals("khtj", model.subPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkflowArtifactsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkflowArtifactsTests.java deleted file mode 100644 index ebeb3ad4e1cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkflowArtifactsTests.java +++ /dev/null @@ -1,29 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkflowArtifactsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkflowArtifacts model = BinaryData.fromString( - "{\"appSettings\":\"datavhycvdimwrzregzg\",\"files\":\"datafutrwpweryekzkd\",\"filesToDelete\":[\"ottaw\",\"yos\"]}") - .toObject(WorkflowArtifacts.class); - Assertions.assertEquals("ottaw", model.filesToDelete().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkflowArtifacts model = new WorkflowArtifacts().withAppSettings("datavhycvdimwrzregzg") - .withFiles("datafutrwpweryekzkd") - .withFilesToDelete(Arrays.asList("ottaw", "yos")); - model = BinaryData.fromObject(model).toObject(WorkflowArtifacts.class); - Assertions.assertEquals("ottaw", model.filesToDelete().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java deleted file mode 100644 index 5be26fb53d93..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java +++ /dev/null @@ -1,45 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":395266959,\"maximumCount\":280610276,\"currentCount\":1048039893},\"id\":\"cunnuzdqumoenodn\",\"name\":\"ienhqhskndnelq\",\"type\":\"aadl\"},{\"properties\":{\"minimumCount\":911130448,\"maximumCount\":1742378408,\"currentCount\":125911630},\"id\":\"yopetxivc\",\"name\":\"rl\",\"type\":\"xnucaephblkwqp\"},{\"properties\":{\"minimumCount\":877535846,\"maximumCount\":1982955476,\"currentCount\":876148319},\"id\":\"jbc\",\"name\":\"vivuzqymtuowo\",\"type\":\"tgitsqhzvbrzc\"}],\"nextLink\":\"anfzndscxmxeatk\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(395266959, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(280610276, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(1048039893, model.value().get(0).properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesCollection model = new WorkloadProfileStatesCollection().withValue(Arrays.asList( - new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(395266959) - .withMaximumCount(280610276) - .withCurrentCount(1048039893)), - new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(911130448) - .withMaximumCount(1742378408) - .withCurrentCount(125911630)), - new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(877535846) - .withMaximumCount(1982955476) - .withCurrentCount(876148319)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(395266959, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(280610276, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(1048039893, model.value().get(0).properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java deleted file mode 100644 index bc45e2c1f8df..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java +++ /dev/null @@ -1,34 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesInner model = BinaryData.fromString( - "{\"properties\":{\"minimumCount\":1574361412,\"maximumCount\":1879583811,\"currentCount\":1943838526},\"id\":\"ibqbnaomhjrm\",\"name\":\"u\",\"type\":\"maxljalfihcj\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1574361412, model.properties().minimumCount()); - Assertions.assertEquals(1879583811, model.properties().maximumCount()); - Assertions.assertEquals(1943838526, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model = new WorkloadProfileStatesInner() - .withProperties(new WorkloadProfileStatesProperties().withMinimumCount(1574361412) - .withMaximumCount(1879583811) - .withCurrentCount(1943838526)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1574361412, model.properties().minimumCount()); - Assertions.assertEquals(1879583811, model.properties().maximumCount()); - Assertions.assertEquals(1943838526, model.properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java deleted file mode 100644 index 235993e005a0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java +++ /dev/null @@ -1,32 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesProperties model = BinaryData - .fromString("{\"minimumCount\":491283548,\"maximumCount\":619212156,\"currentCount\":367738618}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(491283548, model.minimumCount()); - Assertions.assertEquals(619212156, model.maximumCount()); - Assertions.assertEquals(367738618, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = new WorkloadProfileStatesProperties().withMinimumCount(491283548) - .withMaximumCount(619212156) - .withCurrentCount(367738618); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(491283548, model.minimumCount()); - Assertions.assertEquals(619212156, model.maximumCount()); - Assertions.assertEquals(367738618, model.currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java deleted file mode 100644 index f58bd8de9066..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java +++ /dev/null @@ -1,38 +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.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfile model = BinaryData.fromString( - "{\"name\":\"zragpg\",\"enableFips\":false,\"workloadProfileType\":\"t\",\"minimumCount\":737806246,\"maximumCount\":135335326}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("zragpg", model.name()); - Assertions.assertEquals(false, model.enableFips()); - Assertions.assertEquals("t", model.workloadProfileType()); - Assertions.assertEquals(737806246, model.minimumCount()); - Assertions.assertEquals(135335326, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = new WorkloadProfile().withName("zragpg") - .withEnableFips(false) - .withWorkloadProfileType("t") - .withMinimumCount(737806246) - .withMaximumCount(135335326); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("zragpg", model.name()); - Assertions.assertEquals(false, model.enableFips()); - Assertions.assertEquals("t", model.workloadProfileType()); - Assertions.assertEquals(737806246, model.minimumCount()); - Assertions.assertEquals(135335326, model.maximumCount()); - } -}