diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 2232b6d6f39ac..53fdd356e9c8f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.1 (2023-06-08) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index 94de788c2cfa0..b8ee4919d7933 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. Package tag package-preview-2022-11. 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-preview-2023-04. 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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-appcontainers - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index 0bb6a1435adab..c943186cdcaae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -60,6 +60,8 @@ - [ListByResourceGroup](#containerapps_listbyresourcegroup) - [ListCustomHostnameAnalysis](#containerapps_listcustomhostnameanalysis) - [ListSecrets](#containerapps_listsecrets) +- [Start](#containerapps_start) +- [Stop](#containerapps_stop) - [Update](#containerapps_update) ## ContainerAppsAuthConfigs @@ -164,13 +166,17 @@ ## Operations - [List](#operations_list) + +## ResourceProvider + +- [JobExecution](#resourceprovider_jobexecution) ### AvailableWorkloadProfiles_Get ```java /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. @@ -189,7 +195,7 @@ public final class AvailableWorkloadProfilesGetSamples { /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -211,7 +217,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -243,7 +249,7 @@ public final class CertificatesCreateOrUpdateSamples { /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -265,7 +271,7 @@ public final class CertificatesDeleteSamples { /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -287,7 +293,7 @@ public final class CertificatesGetSamples { /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -311,7 +317,7 @@ import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -350,7 +356,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for ConnectedEnvironments CheckNameAvailability. */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -380,7 +386,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -412,7 +418,7 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /** Samples for ConnectedEnvironments Delete. */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. @@ -432,7 +438,7 @@ public final class ConnectedEnvironmentsDeleteSamples { /** Samples for ConnectedEnvironments GetByResourceGroup. */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -454,7 +460,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /** Samples for ConnectedEnvironments List. */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. @@ -474,7 +480,7 @@ public final class ConnectedEnvironmentsListSamples { /** Samples for ConnectedEnvironments ListByResourceGroup. */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -494,7 +500,7 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { /** Samples for ConnectedEnvironments Update. */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -516,7 +522,7 @@ 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/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -543,7 +549,7 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /** Samples for ConnectedEnvironmentsCertificates Delete. */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -565,7 +571,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /** Samples for ConnectedEnvironmentsCertificates Get. */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -587,7 +593,7 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { /** Samples for ConnectedEnvironmentsCertificates List. */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -613,7 +619,7 @@ import java.util.Map; /** Samples for ConnectedEnvironmentsCertificates Update. */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -653,7 +659,7 @@ import java.util.Arrays; /** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -690,7 +696,7 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /** Samples for ConnectedEnvironmentsDaprComponents Delete. */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -711,7 +717,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /** Samples for ConnectedEnvironmentsDaprComponents Get. */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -732,7 +738,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /** Samples for ConnectedEnvironmentsDaprComponents List. */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -753,7 +759,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { /** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -779,7 +785,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -811,7 +817,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /** Samples for ConnectedEnvironmentsStorages Delete. */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -833,7 +839,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { /** Samples for ConnectedEnvironmentsStorages Get. */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -855,7 +861,7 @@ public final class ConnectedEnvironmentsStoragesGetSamples { /** Samples for ConnectedEnvironmentsStorages List. */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -898,6 +904,8 @@ import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; 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.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; @@ -909,7 +917,7 @@ import java.util.Map; /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -986,7 +994,8 @@ public final class ContainerAppsCreateOrUpdateSamples { .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) .withTemplate( new Template() .withInitContainers( @@ -1033,12 +1042,19 @@ public final class ContainerAppsCreateOrUpdateSamples { .withCustom( new CustomScaleRule() .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds( + Arrays + .asList( + new ServiceBind() + .withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -1099,7 +1115,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. @@ -1181,7 +1197,7 @@ public final class ContainerAppsCreateOrUpdateSamples { /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -1200,7 +1216,7 @@ public final class ContainerAppsDeleteSamples { /** Samples for ContainerApps GetAuthToken. */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -1220,7 +1236,7 @@ public final class ContainerAppsGetAuthTokenSamples { /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1241,7 +1257,7 @@ public final class ContainerAppsGetByResourceGroupSamples { /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -1261,7 +1277,7 @@ public final class ContainerAppsListSamples { /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -1281,7 +1297,7 @@ public final class ContainerAppsListByResourceGroupSamples { /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -1303,7 +1319,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1317,6 +1333,44 @@ public final class ContainerAppsListSecretsSamples { } ``` +### ContainerApps_Start + +```java +/** Samples for ContainerApps Start. */ +public final class ContainerAppsStartSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-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/2023-04-01-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 @@ -1341,6 +1395,8 @@ import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; 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; @@ -1351,7 +1407,7 @@ import java.util.Map; /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -1418,7 +1474,8 @@ public final class ContainerAppsUpdateSamples { .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) .withTemplate( new Template() .withInitContainers( @@ -1463,7 +1520,14 @@ public final class ContainerAppsUpdateSamples { .withCustom( new CustomScaleRule() .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) + .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(); } @@ -1493,7 +1557,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -1528,7 +1592,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -1550,7 +1614,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -1572,7 +1636,7 @@ public final class ContainerAppsAuthConfigsGetSamples { /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -1594,7 +1658,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /** Samples for ContainerAppsDiagnostics GetDetector. */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -1620,7 +1684,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { /** Samples for ContainerAppsDiagnostics GetRevision. */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1643,7 +1707,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { /** Samples for ContainerAppsDiagnostics GetRoot. */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1664,7 +1728,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { /** Samples for ContainerAppsDiagnostics ListDetectors. */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. @@ -1686,7 +1750,7 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { /** Samples for ContainerAppsDiagnostics ListRevisions. */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1708,7 +1772,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -1735,7 +1799,7 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -1757,7 +1821,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -1780,7 +1844,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -1803,7 +1867,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1826,7 +1890,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1848,7 +1912,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -1875,7 +1939,7 @@ import com.azure.resourcemanager.appcontainers.models.RegistryInfo; /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -1894,15 +1958,17 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { new GithubActionConfiguration() .withRegistryInfo( new RegistryInfo() - .withRegistryUrl("xwang971reg.azurecr.io") - .withRegistryUsername("xwang971reg") + .withRegistryUrl("test-registry.azurecr.io") + .withRegistryUsername("test-registry") .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials( new AzureCredentials() .withClientId("") .withClientSecret("fakeTokenPlaceholder") - .withTenantId("")) + .withTenantId("") + .withKind("feaderated")) .withContextPath("./") + .withGithubPersonalAccessToken("fakeTokenPlaceholder") .withImage("image/tag")) .create(); } @@ -1915,7 +1981,7 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -1937,7 +2003,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -1959,7 +2025,7 @@ public final class ContainerAppsSourceControlsGetSamples { /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -1985,7 +2051,7 @@ import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -2018,7 +2084,7 @@ public final class DaprComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -2058,7 +2124,7 @@ public final class DaprComponentsCreateOrUpdateSamples { /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -2079,7 +2145,7 @@ public final class DaprComponentsDeleteSamples { /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -2094,7 +2160,7 @@ public final class DaprComponentsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -2116,7 +2182,7 @@ public final class DaprComponentsGetSamples { /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -2135,7 +2201,7 @@ public final class DaprComponentsListSamples { /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -2154,6 +2220,8 @@ public final class DaprComponentsListSecretsSamples { ### 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; @@ -2161,16 +2229,84 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHt import com.azure.resourcemanager.appcontainers.models.ContainerResources; 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.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import java.io.IOException; import java.util.Arrays; /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_CreateorUpdate_EventTrigger.json + */ + /** + * Sample code: Create or Update Container Apps Job With Event Driven Trigger. + * + * @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") + .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))))))) + .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(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -2238,7 +2374,7 @@ public final class JobsCreateOrUpdateSamples { /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. @@ -2257,7 +2393,7 @@ public final class JobsDeleteSamples { /** Samples for Jobs GetByResourceGroup. */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. @@ -2276,7 +2412,7 @@ public final class JobsGetByResourceGroupSamples { /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. @@ -2296,7 +2432,7 @@ public final class JobsListSamples { /** Samples for Jobs ListByResourceGroup. */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Jobs_ListByResourceGroup.json */ /** * Sample code: List Container Apps Jobs by resource group. @@ -2316,7 +2452,7 @@ public final class JobsListByResourceGroupSamples { /** Samples for Jobs ListSecrets. */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. @@ -2341,7 +2477,7 @@ import java.util.Arrays; /** Samples for Jobs Start. */ public final class JobsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -2382,7 +2518,7 @@ public final class JobsStartSamples { /** Samples for Jobs StopExecution. */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. @@ -2399,14 +2535,10 @@ public final class JobsStopExecutionSamples { ### Jobs_StopMultipleExecutions ```java -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; -import java.util.Arrays; - /** Samples for Jobs StopMultipleExecutions. */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -2415,19 +2547,7 @@ public final class JobsStopMultipleExecutionsSamples { */ public static void terminateMultipleContainerAppsJob( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .jobs() - .stopMultipleExecutions( - "rg", - "testcontainerAppsJob0", - new JobExecutionNamesCollection() - .withValue( - Arrays - .asList( - new JobExecutionBaseInner().withName("jobExecution-27944453"), - new JobExecutionBaseInner().withName("jobExecution-27944452"), - new JobExecutionBaseInner().withName("jobExecution-27944451"))), - com.azure.core.util.Context.NONE); + manager.jobs().stopMultipleExecutions("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); } } ``` @@ -2453,7 +2573,7 @@ import java.util.Arrays; /** Samples for Jobs Update. */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -2524,7 +2644,7 @@ public final class JobsUpdateSamples { /** Samples for JobsExecutions List. */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. @@ -2547,7 +2667,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperti /** Samples for ManagedCertificates CreateOrUpdate. */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -2576,7 +2696,7 @@ public final class ManagedCertificatesCreateOrUpdateSamples { /** Samples for ManagedCertificates Delete. */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -2598,7 +2718,7 @@ public final class ManagedCertificatesDeleteSamples { /** Samples for ManagedCertificates Get. */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -2620,7 +2740,7 @@ public final class ManagedCertificatesGetSamples { /** Samples for ManagedCertificates List. */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. @@ -2644,7 +2764,7 @@ import java.util.Map; /** Samples for ManagedCertificates Update. */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. @@ -2681,7 +2801,7 @@ public final class ManagedCertificatesUpdateSamples { /** Samples for ManagedEnvironmentDiagnostics GetDetector. */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -2707,7 +2827,7 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -2729,6 +2849,8 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.Mtls; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Arrays; @@ -2736,7 +2858,7 @@ import java.util.Arrays; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. @@ -2790,7 +2912,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -2838,6 +2960,8 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withMinimumCount(3) .withMaximumCount(6), new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) + .withPeerAuthentication( + new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) .create(); } } @@ -2849,7 +2973,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -2869,7 +2993,7 @@ public final class ManagedEnvironmentsDeleteSamples { /** Samples for ManagedEnvironments GetAuthToken. */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -2889,7 +3013,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -2910,7 +3034,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -2930,7 +3054,7 @@ public final class ManagedEnvironmentsListSamples { /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -2950,7 +3074,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -2976,7 +3100,7 @@ import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -3012,7 +3136,7 @@ public final class ManagedEnvironmentsUpdateSamples { /** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -3037,7 +3161,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageP /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -3069,7 +3193,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -3091,7 +3215,7 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -3113,7 +3237,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -3137,7 +3261,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -3158,7 +3282,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -3184,7 +3308,7 @@ public final class NamespacesCheckNameAvailabilitySamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -3197,3 +3321,24 @@ public final class OperationsListSamples { } ``` +### ResourceProvider_JobExecution + +```java +/** Samples for ResourceProvider JobExecution. */ +public final class ResourceProviderJobExecutionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Execution_Get.json + */ + /** + * Sample code: Get a single Job Execution. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .resourceProviders() + .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index ee970f0d809f1..8725a957919ce 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. Package tag package-preview-2022-11. + 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-preview-2023-04. https://github.com/Azure/azure-sdk-for-java 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 f190c61f5ca65..2b70acb507419 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 @@ -48,6 +48,7 @@ import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.NamespacesImpl; import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersImpl; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; import com.azure.resourcemanager.appcontainers.models.BillingMeters; import com.azure.resourcemanager.appcontainers.models.Certificates; @@ -71,6 +72,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.Namespaces; import com.azure.resourcemanager.appcontainers.models.Operations; +import com.azure.resourcemanager.appcontainers.models.ResourceProviders; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -96,10 +98,6 @@ public final class ContainerAppsApiManager { private ContainerApps containerApps; - private Jobs jobs; - - private JobsExecutions jobsExecutions; - private ContainerAppsRevisions containerAppsRevisions; private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; @@ -112,6 +110,12 @@ public final class ContainerAppsApiManager { private Operations operations; + private Jobs jobs; + + private JobsExecutions jobsExecutions; + + private ResourceProviders resourceProviders; + private ManagedEnvironments managedEnvironments; private Certificates certificates; @@ -291,7 +295,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -450,30 +454,6 @@ public ContainerApps containerApps() { return containerApps; } - /** - * Gets the resource collection API of Jobs. It manages Job. - * - * @return Resource collection API of Jobs. - */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - return jobs; - } - - /** - * Gets the resource collection API of JobsExecutions. - * - * @return Resource collection API of JobsExecutions. - */ - public JobsExecutions jobsExecutions() { - if (this.jobsExecutions == null) { - this.jobsExecutions = new JobsExecutionsImpl(clientObject.getJobsExecutions(), this); - } - return jobsExecutions; - } - /** * Gets the resource collection API of ContainerAppsRevisions. * @@ -551,6 +531,42 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of Jobs. It manages Job. + * + * @return Resource collection API of Jobs. + */ + public Jobs jobs() { + if (this.jobs == null) { + this.jobs = new JobsImpl(clientObject.getJobs(), this); + } + return jobs; + } + + /** + * Gets the resource collection API of JobsExecutions. + * + * @return Resource collection API of JobsExecutions. + */ + public JobsExecutions jobsExecutions() { + if (this.jobsExecutions == null) { + this.jobsExecutions = new JobsExecutionsImpl(clientObject.getJobsExecutions(), this); + } + return jobsExecutions; + } + + /** + * Gets the resource collection API of ResourceProviders. + * + * @return Resource collection API of ResourceProviders. + */ + public ResourceProviders resourceProviders() { + if (this.resourceProviders == null) { + this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); + } + return resourceProviders; + } + /** * Gets the resource collection API of ManagedEnvironments. It manages ManagedEnvironment. * 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 10d1ee0a3b4da..03bef3cfa47b8 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 @@ -100,20 +100,6 @@ public interface ContainerAppsApiClient { */ ContainerAppsClient getContainerApps(); - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the JobsExecutionsClient object to access its operations. - * - * @return the JobsExecutionsClient object. - */ - JobsExecutionsClient getJobsExecutions(); - /** * Gets the ContainerAppsRevisionsClient object to access its operations. * @@ -156,6 +142,27 @@ public interface ContainerAppsApiClient { */ OperationsClient getOperations(); + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + JobsClient getJobs(); + + /** + * Gets the JobsExecutionsClient object to access its operations. + * + * @return the JobsExecutionsClient object. + */ + JobsExecutionsClient getJobsExecutions(); + + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + ResourceProvidersClient getResourceProviders(); + /** * Gets the ManagedEnvironmentsClient object to access its operations. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java index ebedd1eb1be57..42624e5ff627c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java @@ -392,4 +392,124 @@ Response getAuthTokenWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName); + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppInner> beginStart( + String resourceGroupName, String containerAppName); + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppInner> beginStart( + String resourceGroupName, String containerAppName, Context context); + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner start(String resourceGroupName, String containerAppName); + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner start(String resourceGroupName, String containerAppName, Context context); + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppInner> beginStop( + String resourceGroupName, String containerAppName); + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppInner> beginStop( + String resourceGroupName, String containerAppName, Context context); + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner stop(String resourceGroupName, String containerAppName); + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner stop(String resourceGroupName, String containerAppName, Context context); } 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 5ca3298761c48..2f94f31367352 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 @@ -15,7 +15,6 @@ import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; @@ -76,7 +75,7 @@ public interface JobsClient { * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -91,7 +90,7 @@ public interface JobsClient { * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -105,7 +104,7 @@ public interface JobsClient { * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -121,7 +120,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,7 +137,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -153,7 +152,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +168,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -183,7 +182,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -198,7 +197,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -211,7 +210,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -227,7 +226,7 @@ SyncPoller, JobInner> beginCreateOrUpdate( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -245,7 +244,7 @@ SyncPoller, JobInner> beginUpdate( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,7 +263,7 @@ SyncPoller, JobInner> beginUpdate( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -281,7 +280,7 @@ SyncPoller, JobInner> beginUpdate( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,7 +296,7 @@ SyncPoller, JobInner> beginUpdate( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -313,7 +312,7 @@ SyncPoller, JobExecutionBaseInner> beginStart( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,7 +329,7 @@ SyncPoller, JobExecutionBaseInner> beginStart( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -345,7 +344,7 @@ SyncPoller, JobExecutionBaseInner> beginStart( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,7 +361,7 @@ JobExecutionBaseInner start( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -378,7 +377,7 @@ SyncPoller, Void> beginStopExecution( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -395,7 +394,7 @@ SyncPoller, Void> beginStopExecution( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -409,7 +408,7 @@ SyncPoller, Void> beginStopExecution( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -424,8 +423,7 @@ SyncPoller, Void> beginStopExecution( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -434,14 +432,13 @@ SyncPoller, Void> beginStopExecution( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ContainerAppJobExecutionsInner> beginStopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName); + String resourceGroupName, String jobName); /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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 @@ -451,14 +448,13 @@ SyncPoller, ContainerAppJobExecutions */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ContainerAppJobExecutionsInner> beginStopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context); + String resourceGroupName, String jobName, Context context); /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -466,15 +462,13 @@ SyncPoller, ContainerAppJobExecutions * @return container App executions collection ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppJobExecutionsInner stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName); + ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName); /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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 @@ -483,14 +477,13 @@ ContainerAppJobExecutionsInner stopMultipleExecutions( * @return container App executions collection ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppJobExecutionsInner stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context); + ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName, Context context); /** * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -506,7 +499,7 @@ Response listSecretsWithResponse( * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java index 7b5284f29e51d..402658e9be846 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java @@ -16,7 +16,7 @@ public interface JobsExecutionsClient { * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -30,7 +30,7 @@ public interface JobsExecutionsClient { * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java new file mode 100644 index 0000000000000..9b59268f6d084 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java @@ -0,0 +1,46 @@ +// Copyright (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.JobExecutionInner; + +/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +public interface ResourceProvidersClient { + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response jobExecutionWithResponse( + String resourceGroupName, String jobName, String jobExecutionName, Context context); + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName); +} 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 116681ecc04d4..dbebc66d46a42 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 @@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Container Apps Jobs execution. */ +/** Container Apps Job execution. */ @Fluent public final class JobExecutionInner { /* @@ -44,7 +44,7 @@ public final class JobExecutionInner { private OffsetDateTime startTime; /* - * Job execution start time. + * Job execution end time. */ @JsonProperty(value = "endTime") private OffsetDateTime endTime; @@ -149,7 +149,7 @@ public JobExecutionInner withStartTime(OffsetDateTime startTime) { } /** - * Get the endTime property: Job execution start time. + * Get the endTime property: Job execution end time. * * @return the endTime value. */ @@ -158,7 +158,7 @@ public OffsetDateTime endTime() { } /** - * Set the endTime property: Job execution start time. + * Set the endTime property: Job execution end time. * * @param endTime the endTime value to set. * @return the JobExecutionInner object itself. 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 f3c137f21723b..897faf511a692 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 @@ -12,6 +12,7 @@ import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; @@ -380,6 +381,30 @@ public ManagedEnvironmentInner withInfrastructureResourceGroup(String infrastruc return this; } + /** + * Get the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @return the peerAuthentication value. + */ + public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { + return this.innerProperties() == null ? null : this.innerProperties().peerAuthentication(); + } + + /** + * Set the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @param peerAuthentication the peerAuthentication value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withPeerAuthentication( + ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withPeerAuthentication(peerAuthentication); + 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 d36af4c8d7aea..f14479db3aa57 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 @@ -10,6 +10,7 @@ import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; @@ -112,6 +113,12 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "infrastructureResourceGroup") private String infrastructureResourceGroup; + /* + * Peer authentication settings for the Managed Environment + */ + @JsonProperty(value = "peerAuthentication") + private ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication; + /** Creates an instance of ManagedEnvironmentProperties class. */ public ManagedEnvironmentProperties() { } @@ -372,6 +379,27 @@ public ManagedEnvironmentProperties withInfrastructureResourceGroup(String infra return this; } + /** + * Get the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @return the peerAuthentication value. + */ + public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { + return this.peerAuthentication; + } + + /** + * Set the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @param peerAuthentication the peerAuthentication value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withPeerAuthentication( + ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { + this.peerAuthentication = peerAuthentication; + return this; + } + /** * Validates the instance. * @@ -396,5 +424,8 @@ public void validate() { if (daprConfiguration() != null) { daprConfiguration().validate(); } + if (peerAuthentication() != null) { + peerAuthentication().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java index 5dfd654823430..4238788b5f097 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -58,6 +59,24 @@ public OffsetDateTime createdTime() { return this.innerProperties() == null ? null : this.innerProperties().createdTime(); } + /** + * Get the runningState property: Current running state of the replica. + * + * @return the runningState value. + */ + public ContainerAppReplicaRunningState runningState() { + return this.innerProperties() == null ? null : this.innerProperties().runningState(); + } + + /** + * Get the runningStateDetails property: The details of replica current running state. + * + * @return the runningStateDetails value. + */ + public String runningStateDetails() { + return this.innerProperties() == null ? null : this.innerProperties().runningStateDetails(); + } + /** * Get the containers property: The containers collection under a replica. * @@ -81,6 +100,29 @@ public ReplicaInner withContainers(List containers) { return this; } + /** + * Get the initContainers property: The init containers collection under a replica. + * + * @return the initContainers value. + */ + public List initContainers() { + return this.innerProperties() == null ? null : this.innerProperties().initContainers(); + } + + /** + * Set the initContainers property: The init containers collection under a replica. + * + * @param initContainers the initContainers value to set. + * @return the ReplicaInner object itself. + */ + public ReplicaInner withInitContainers(List initContainers) { + if (this.innerProperties() == null) { + this.innerProperties = new ReplicaProperties(); + } + this.innerProperties().withInitContainers(initContainers); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java index 1ddc5027cdc99..0d3eed1784a79 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -19,12 +20,30 @@ public final class ReplicaProperties { @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime createdTime; + /* + * Current running state of the replica + */ + @JsonProperty(value = "runningState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerAppReplicaRunningState runningState; + + /* + * The details of replica current running state + */ + @JsonProperty(value = "runningStateDetails", access = JsonProperty.Access.WRITE_ONLY) + private String runningStateDetails; + /* * The containers collection under a replica. */ @JsonProperty(value = "containers") private List containers; + /* + * The init containers collection under a replica. + */ + @JsonProperty(value = "initContainers") + private List initContainers; + /** Creates an instance of ReplicaProperties class. */ public ReplicaProperties() { } @@ -38,6 +57,24 @@ public OffsetDateTime createdTime() { return this.createdTime; } + /** + * Get the runningState property: Current running state of the replica. + * + * @return the runningState value. + */ + public ContainerAppReplicaRunningState runningState() { + return this.runningState; + } + + /** + * Get the runningStateDetails property: The details of replica current running state. + * + * @return the runningStateDetails value. + */ + public String runningStateDetails() { + return this.runningStateDetails; + } + /** * Get the containers property: The containers collection under a replica. * @@ -58,6 +95,26 @@ public ReplicaProperties withContainers(List containers) { return this; } + /** + * Get the initContainers property: The init containers collection under a replica. + * + * @return the initContainers value. + */ + public List initContainers() { + return this.initContainers; + } + + /** + * Set the initContainers property: The init containers collection under a replica. + * + * @param initContainers the initContainers value to set. + * @return the ReplicaProperties object itself. + */ + public ReplicaProperties withInitContainers(List initContainers) { + this.initContainers = initContainers; + return this; + } + /** * Validates the instance. * @@ -67,5 +124,8 @@ public void validate() { if (containers() != null) { containers().forEach(e -> e.validate()); } + if (initContainers() != null) { + initContainers().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java index b69a3c85c6339..5d542a067ba11 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; +import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -142,6 +143,15 @@ public RevisionProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the runningState property: Current running state of the revision. + * + * @return the runningState value. + */ + public RevisionRunningState runningState() { + return this.innerProperties() == null ? null : this.innerProperties().runningState(); + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java index a11ef7a98b972..64782de6f21c2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; +import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -77,6 +78,12 @@ public final class RevisionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private RevisionProvisioningState provisioningState; + /* + * Current running state of the revision + */ + @JsonProperty(value = "runningState", access = JsonProperty.Access.WRITE_ONLY) + private RevisionRunningState runningState; + /** Creates an instance of RevisionProperties class. */ public RevisionProperties() { } @@ -173,6 +180,15 @@ public RevisionProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the runningState property: Current running state of the revision. + * + * @return the runningState value. + */ + public RevisionRunningState runningState() { + return this.runningState; + } + /** * Validates the instance. * 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 0fce8f4c58cc0..a56a23c9a4394 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 @@ -251,6 +251,22 @@ public ContainerAppAuthToken getAuthToken() { return serviceManager.containerApps().getAuthToken(resourceGroupName, containerAppName); } + public ContainerApp start() { + return serviceManager.containerApps().start(resourceGroupName, containerAppName); + } + + public ContainerApp start(Context context) { + return serviceManager.containerApps().start(resourceGroupName, containerAppName, context); + } + + public ContainerApp stop() { + return serviceManager.containerApps().stop(resourceGroupName, containerAppName); + } + + public ContainerApp stop(Context context) { + return serviceManager.containerApps().stop(resourceGroupName, containerAppName, context); + } + public ContainerAppImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; 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 d0691b5bd6b90..9f6f050ddabb5 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 @@ -46,6 +46,7 @@ import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; +import com.azure.resourcemanager.appcontainers.fluent.ResourceProvidersClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -226,30 +227,6 @@ public ContainerAppsClient getContainerApps() { return this.containerApps; } - /** The JobsClient object to access its operations. */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - public JobsClient getJobs() { - return this.jobs; - } - - /** The JobsExecutionsClient object to access its operations. */ - private final JobsExecutionsClient jobsExecutions; - - /** - * Gets the JobsExecutionsClient object to access its operations. - * - * @return the JobsExecutionsClient object. - */ - public JobsExecutionsClient getJobsExecutions() { - return this.jobsExecutions; - } - /** The ContainerAppsRevisionsClient object to access its operations. */ private final ContainerAppsRevisionsClient containerAppsRevisions; @@ -322,6 +299,42 @@ public OperationsClient getOperations() { return this.operations; } + /** The JobsClient object to access its operations. */ + private final JobsClient jobs; + + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + public JobsClient getJobs() { + return this.jobs; + } + + /** The JobsExecutionsClient object to access its operations. */ + private final JobsExecutionsClient jobsExecutions; + + /** + * Gets the JobsExecutionsClient object to access its operations. + * + * @return the JobsExecutionsClient object. + */ + public JobsExecutionsClient getJobsExecutions() { + return this.jobsExecutions; + } + + /** The ResourceProvidersClient object to access its operations. */ + private final ResourceProvidersClient resourceProviders; + + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; + } + /** The ManagedEnvironmentsClient object to access its operations. */ private final ManagedEnvironmentsClient managedEnvironments; @@ -428,7 +441,7 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-11-01-preview"; + this.apiVersion = "2023-04-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); this.billingMeters = new BillingMetersClientImpl(this); @@ -437,14 +450,15 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); this.containerApps = new ContainerAppsClientImpl(this); - this.jobs = new JobsClientImpl(this); - this.jobsExecutions = new JobsExecutionsClientImpl(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.operations = new OperationsClientImpl(this); + this.jobs = new JobsClientImpl(this); + this.jobsExecutions = new JobsExecutionsClientImpl(this); + this.resourceProviders = new ResourceProvidersClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.managedCertificates = new ManagedCertificatesClientImpl(this); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java index c3119a5e81b39..31d17e3abca06 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java @@ -200,6 +200,34 @@ Mono> getAuthToken( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> start( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> stop( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -1926,6 +1954,486 @@ public ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String return getAuthTokenWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); } + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(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 + .start( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + containerAppName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync( + 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 + .start( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + containerAppName, + accept, + context); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link PollerFlux} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppInner> beginStartAsync( + String resourceGroupName, String containerAppName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, containerAppName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ContainerAppInner.class, + ContainerAppInner.class, + this.client.getContext()); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link PollerFlux} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppInner> beginStartAsync( + String resourceGroupName, String containerAppName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = startWithResponseAsync(resourceGroupName, containerAppName, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppInner> beginStart( + String resourceGroupName, String containerAppName) { + return this.beginStartAsync(resourceGroupName, containerAppName).getSyncPoller(); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppInner> beginStart( + String resourceGroupName, String containerAppName, Context context) { + return this.beginStartAsync(resourceGroupName, containerAppName, context).getSyncPoller(); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String containerAppName) { + return beginStartAsync(resourceGroupName, containerAppName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String containerAppName, Context context) { + return beginStartAsync(resourceGroupName, containerAppName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner start(String resourceGroupName, String containerAppName) { + return startAsync(resourceGroupName, containerAppName).block(); + } + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner start(String resourceGroupName, String containerAppName, Context context) { + return startAsync(resourceGroupName, containerAppName, context).block(); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync(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 + .stop( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + containerAppName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> stopWithResponseAsync( + 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 + .stop( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + containerAppName, + accept, + context); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link PollerFlux} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppInner> beginStopAsync( + String resourceGroupName, String containerAppName) { + Mono>> mono = stopWithResponseAsync(resourceGroupName, containerAppName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ContainerAppInner.class, + ContainerAppInner.class, + this.client.getContext()); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link PollerFlux} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppInner> beginStopAsync( + String resourceGroupName, String containerAppName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = stopWithResponseAsync(resourceGroupName, containerAppName, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppInner> beginStop( + String resourceGroupName, String containerAppName) { + return this.beginStopAsync(resourceGroupName, containerAppName).getSyncPoller(); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 the {@link SyncPoller} for polling of container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppInner> beginStop( + String resourceGroupName, String containerAppName, Context context) { + return this.beginStopAsync(resourceGroupName, containerAppName, context).getSyncPoller(); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String containerAppName) { + return beginStopAsync(resourceGroupName, containerAppName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String containerAppName, Context context) { + return beginStopAsync(resourceGroupName, containerAppName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner stop(String resourceGroupName, String containerAppName) { + return stopAsync(resourceGroupName, containerAppName).block(); + } + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner stop(String resourceGroupName, String containerAppName, Context context) { + return stopAsync(resourceGroupName, containerAppName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java index 2487493c7ff6a..19f3b1c802036 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java @@ -161,6 +161,42 @@ public ContainerAppAuthToken getAuthToken(String resourceGroupName, String conta } } + public ContainerApp start(String resourceGroupName, String containerAppName) { + ContainerAppInner inner = this.serviceClient().start(resourceGroupName, containerAppName); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + + public ContainerApp start(String resourceGroupName, String containerAppName, Context context) { + ContainerAppInner inner = this.serviceClient().start(resourceGroupName, containerAppName, context); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + + public ContainerApp stop(String resourceGroupName, String containerAppName) { + ContainerAppInner inner = this.serviceClient().stop(resourceGroupName, containerAppName); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + + public ContainerApp stop(String resourceGroupName, String containerAppName, Context context) { + ContainerAppInner inner = this.serviceClient().stop(resourceGroupName, containerAppName, context); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + public ContainerApp getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 633889c12d1fd..27d5fc2a4da4d 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 @@ -13,7 +13,6 @@ import com.azure.resourcemanager.appcontainers.models.Job; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; import com.azure.resourcemanager.appcontainers.models.JobPatchPropertiesProperties; @@ -206,13 +205,12 @@ public JobExecutionBase start(JobExecutionTemplate template, Context context) { return serviceManager.jobs().start(resourceGroupName, jobName, template, context); } - public ContainerAppJobExecutions stopMultipleExecutions(JobExecutionNamesCollection jobExecutionName) { - return serviceManager.jobs().stopMultipleExecutions(resourceGroupName, jobName, jobExecutionName); + public ContainerAppJobExecutions stopMultipleExecutions() { + return serviceManager.jobs().stopMultipleExecutions(resourceGroupName, jobName); } - public ContainerAppJobExecutions stopMultipleExecutions( - JobExecutionNamesCollection jobExecutionName, Context context) { - return serviceManager.jobs().stopMultipleExecutions(resourceGroupName, jobName, jobExecutionName, context); + public ContainerAppJobExecutions stopMultipleExecutions(Context context) { + return serviceManager.jobs().stopMultipleExecutions(resourceGroupName, jobName, context); } public Response listSecretsWithResponse(Context context) { 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 a80dbbdbcba04..32c8ead6a3c09 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 @@ -38,7 +38,6 @@ import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; import com.azure.resourcemanager.appcontainers.models.JobsCollection; @@ -193,7 +192,6 @@ Mono>> stopMultipleExecutions( @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("jobName") String jobName, - @BodyParam("application/json") JobExecutionNamesCollection jobExecutionName, @HeaderParam("Accept") String accept, Context context); @@ -544,7 +542,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Con * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -592,7 +590,7 @@ private Mono> getByResourceGroupWithResponseAsync(String reso * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -639,7 +637,7 @@ private Mono> getByResourceGroupWithResponseAsync( * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -655,7 +653,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, String * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -672,7 +670,7 @@ public Response getByResourceGroupWithResponse( * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -687,7 +685,7 @@ public JobInner getByResourceGroup(String resourceGroupName, String jobName) { * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -742,7 +740,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -795,7 +793,7 @@ private Mono>> createOrUpdateWithResponseAsync( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -817,7 +815,7 @@ private PollerFlux, JobInner> beginCreateOrUpdateAsync( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -841,7 +839,7 @@ private PollerFlux, JobInner> beginCreateOrUpdateAsync( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -858,7 +856,7 @@ public SyncPoller, JobInner> beginCreateOrUpdate( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -876,7 +874,7 @@ public SyncPoller, JobInner> beginCreateOrUpdate( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -894,7 +892,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String jobN * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -914,7 +912,7 @@ private Mono createOrUpdateAsync( * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -930,7 +928,7 @@ public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInne * Create or Update a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -947,7 +945,7 @@ public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInne * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -994,7 +992,7 @@ private Mono>> deleteWithResponseAsync(String resource * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1040,7 +1038,7 @@ private Mono>> deleteWithResponseAsync( * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1059,7 +1057,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1080,7 +1078,7 @@ private PollerFlux, Void> beginDeleteAsync( * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1095,7 +1093,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1111,7 +1109,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1126,7 +1124,7 @@ private Mono deleteAsync(String resourceGroupName, String jobName) { * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1144,7 +1142,7 @@ private Mono deleteAsync(String resourceGroupName, String jobName, Context * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1158,7 +1156,7 @@ public void delete(String resourceGroupName, String jobName) { * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -1175,7 +1173,7 @@ public void delete(String resourceGroupName, String jobName, Context context) { *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1232,7 +1230,7 @@ private Mono>> updateWithResponseAsync( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1287,7 +1285,7 @@ private Mono>> updateWithResponseAsync( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1310,7 +1308,7 @@ private PollerFlux, JobInner> beginUpdateAsync( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1336,7 +1334,7 @@ private PollerFlux, JobInner> beginUpdateAsync( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1355,7 +1353,7 @@ public SyncPoller, JobInner> beginUpdate( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1375,7 +1373,7 @@ public SyncPoller, JobInner> beginUpdate( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1395,7 +1393,7 @@ private Mono updateAsync(String resourceGroupName, String jobName, Job *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1417,7 +1415,7 @@ private Mono updateAsync( *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1435,7 +1433,7 @@ public JobInner update(String resourceGroupName, String jobName, JobPatchPropert *

Patches a Container Apps Job using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1452,7 +1450,7 @@ public JobInner update(String resourceGroupName, String jobName, JobPatchPropert * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1507,7 +1505,7 @@ private Mono>> startWithResponseAsync( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1560,7 +1558,7 @@ private Mono>> startWithResponseAsync( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1585,7 +1583,7 @@ private PollerFlux, JobExecutionBaseInner> beg * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1608,7 +1606,7 @@ private PollerFlux, JobExecutionBaseInner> beg * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1625,7 +1623,7 @@ public SyncPoller, JobExecutionBaseInner> begi * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1643,7 +1641,7 @@ public SyncPoller, JobExecutionBaseInner> begi * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1662,7 +1660,7 @@ private Mono startAsync( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1682,7 +1680,7 @@ private Mono startAsync( * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1698,7 +1696,7 @@ public JobExecutionBaseInner start(String resourceGroupName, String jobName, Job * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1716,7 +1714,7 @@ public JobExecutionBaseInner start( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1770,7 +1768,7 @@ private Mono>> stopExecutionWithResponseAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1822,7 +1820,7 @@ private Mono>> stopExecutionWithResponseAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1844,7 +1842,7 @@ private PollerFlux, Void> beginStopExecutionAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1867,7 +1865,7 @@ private PollerFlux, Void> beginStopExecutionAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1884,7 +1882,7 @@ public SyncPoller, Void> beginStopExecution( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1902,7 +1900,7 @@ public SyncPoller, Void> beginStopExecution( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1920,7 +1918,7 @@ private Mono stopExecutionAsync(String resourceGroupName, String jobName, * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1940,7 +1938,7 @@ private Mono stopExecutionAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1955,7 +1953,7 @@ public void stopExecution(String resourceGroupName, String jobName, String jobEx * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1971,8 +1969,7 @@ public void stopExecution(String resourceGroupName, String jobName, String jobEx * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -1981,7 +1978,7 @@ public void stopExecution(String resourceGroupName, String jobName, String jobEx */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopMultipleExecutionsWithResponseAsync( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName) { + String resourceGroupName, String jobName) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2001,12 +1998,6 @@ private Mono>> stopMultipleExecutionsWithResponseAsync if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - if (jobExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); - } else { - jobExecutionName.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -2018,7 +2009,6 @@ private Mono>> stopMultipleExecutionsWithResponseAsync resourceGroupName, this.client.getApiVersion(), jobName, - jobExecutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -2028,8 +2018,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2039,7 +2028,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopMultipleExecutionsWithResponseAsync( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context) { + String resourceGroupName, String jobName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -2059,12 +2048,6 @@ private Mono>> stopMultipleExecutionsWithResponseAsync if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - if (jobExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); - } else { - jobExecutionName.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -2074,7 +2057,6 @@ private Mono>> stopMultipleExecutionsWithResponseAsync resourceGroupName, this.client.getApiVersion(), jobName, - jobExecutionName, accept, context); } @@ -2083,8 +2065,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2092,10 +2073,8 @@ private Mono>> stopMultipleExecutionsWithResponseAsync */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ContainerAppJobExecutionsInner> - beginStopMultipleExecutionsAsync( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName) { - Mono>> mono = - stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName, jobExecutionName); + beginStopMultipleExecutionsAsync(String resourceGroupName, String jobName) { + Mono>> mono = stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName); return this .client .getLroResult( @@ -2110,8 +2089,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2120,11 +2098,10 @@ private Mono>> stopMultipleExecutionsWithResponseAsync */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ContainerAppJobExecutionsInner> - beginStopMultipleExecutionsAsync( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context) { + beginStopMultipleExecutionsAsync(String resourceGroupName, String jobName, Context context) { context = this.client.mergeContext(context); Mono>> mono = - stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context); + stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName, context); return this .client .getLroResult( @@ -2139,8 +2116,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2148,17 +2124,15 @@ private Mono>> stopMultipleExecutionsWithResponseAsync */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ContainerAppJobExecutionsInner> - beginStopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName) { - return this.beginStopMultipleExecutionsAsync(resourceGroupName, jobName, jobExecutionName).getSyncPoller(); + beginStopMultipleExecutions(String resourceGroupName, String jobName) { + return this.beginStopMultipleExecutionsAsync(resourceGroupName, jobName).getSyncPoller(); } /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2167,28 +2141,23 @@ private Mono>> stopMultipleExecutionsWithResponseAsync */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ContainerAppJobExecutionsInner> - beginStopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context) { - return this - .beginStopMultipleExecutionsAsync(resourceGroupName, jobName, jobExecutionName, context) - .getSyncPoller(); + beginStopMultipleExecutions(String resourceGroupName, String jobName, Context context) { + return this.beginStopMultipleExecutionsAsync(resourceGroupName, jobName, context).getSyncPoller(); } /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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 container App executions collection ARM resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopMultipleExecutionsAsync( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName) { - return beginStopMultipleExecutionsAsync(resourceGroupName, jobName, jobExecutionName) + private Mono stopMultipleExecutionsAsync(String resourceGroupName, String jobName) { + return beginStopMultipleExecutionsAsync(resourceGroupName, jobName) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2197,8 +2166,7 @@ private Mono stopMultipleExecutionsAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2207,8 +2175,8 @@ private Mono stopMultipleExecutionsAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopMultipleExecutionsAsync( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context) { - return beginStopMultipleExecutionsAsync(resourceGroupName, jobName, jobExecutionName, context) + String resourceGroupName, String jobName, Context context) { + return beginStopMultipleExecutionsAsync(resourceGroupName, jobName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -2217,25 +2185,22 @@ private Mono stopMultipleExecutionsAsync( * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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 container App executions collection ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppJobExecutionsInner stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName) { - return stopMultipleExecutionsAsync(resourceGroupName, jobName, jobExecutionName).block(); + public ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName) { + return stopMultipleExecutionsAsync(resourceGroupName, jobName).block(); } /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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. @@ -2244,15 +2209,15 @@ public ContainerAppJobExecutionsInner stopMultipleExecutions( */ @ServiceMethod(returns = ReturnType.SINGLE) public ContainerAppJobExecutionsInner stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context) { - return stopMultipleExecutionsAsync(resourceGroupName, jobName, jobExecutionName, context).block(); + String resourceGroupName, String jobName, Context context) { + return stopMultipleExecutionsAsync(resourceGroupName, jobName, context).block(); } /** * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -2301,7 +2266,7 @@ private Mono> listSecretsWithResponseAsync( * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -2348,7 +2313,7 @@ private Mono> listSecretsWithResponseAsync( * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -2364,7 +2329,7 @@ private Mono listSecretsAsync(String resourceGroupNam * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -2381,7 +2346,7 @@ public Response listSecretsWithResponse( * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java index e5cc9746895e1..6bf912ce7b4b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java @@ -86,7 +86,7 @@ Mono> listNext( * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -146,7 +146,7 @@ private Mono> listSinglePageAsync( * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,7 +204,7 @@ private Mono> listSinglePageAsync( * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -222,7 +222,7 @@ private PagedFlux listAsync(String resourceGroupName, String * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -240,7 +240,7 @@ private PagedFlux listAsync(String resourceGroupName, String * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -260,7 +260,7 @@ private PagedFlux listAsync( * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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. @@ -276,7 +276,7 @@ public PagedIterable list(String resourceGroupName, String jo * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 b1baaaeff51d2..27e1df3f37047 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 @@ -17,7 +17,6 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; import com.azure.resourcemanager.appcontainers.models.Job; import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.azure.resourcemanager.appcontainers.models.JobSecretsCollection; import com.azure.resourcemanager.appcontainers.models.Jobs; @@ -113,10 +112,8 @@ public void stopExecution(String resourceGroupName, String jobName, String jobEx this.serviceClient().stopExecution(resourceGroupName, jobName, jobExecutionName, context); } - public ContainerAppJobExecutions stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName) { - ContainerAppJobExecutionsInner inner = - this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName, jobExecutionName); + public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName) { + ContainerAppJobExecutionsInner inner = this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName); if (inner != null) { return new ContainerAppJobExecutionsImpl(inner, this.manager()); } else { @@ -124,10 +121,9 @@ public ContainerAppJobExecutions stopMultipleExecutions( } } - public ContainerAppJobExecutions stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context) { + public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName, Context context) { ContainerAppJobExecutionsInner inner = - this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName, jobExecutionName, context); + this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName, context); if (inner != null) { return new ContainerAppJobExecutionsImpl(inner, this.manager()); } else { 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 88ee143090735..1d0877490ef02 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 @@ -16,6 +16,7 @@ import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; @@ -126,6 +127,10 @@ public String infrastructureResourceGroup() { return this.innerModel().infrastructureResourceGroup(); } + public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { + return this.innerModel().peerAuthentication(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -310,4 +315,10 @@ public ManagedEnvironmentImpl withInfrastructureResourceGroup(String infrastruct this.innerModel().withInfrastructureResourceGroup(infrastructureResourceGroup); return this; } + + public ManagedEnvironmentImpl withPeerAuthentication( + ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { + this.innerModel().withPeerAuthentication(peerAuthentication); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java index cf34ac0584a5b..a9bb940437705 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java @@ -6,6 +6,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.Replica; import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; import java.time.OffsetDateTime; @@ -43,6 +44,14 @@ public OffsetDateTime createdTime() { return this.innerModel().createdTime(); } + public ContainerAppReplicaRunningState runningState() { + return this.innerModel().runningState(); + } + + public String runningStateDetails() { + return this.innerModel().runningStateDetails(); + } + public List containers() { List inner = this.innerModel().containers(); if (inner != null) { @@ -52,6 +61,15 @@ public List containers() { } } + public List initContainers() { + List inner = this.innerModel().initContainers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public ReplicaInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java new file mode 100644 index 0000000000000..02ade665b7195 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java @@ -0,0 +1,227 @@ +// Copyright (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.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.ResourceProvidersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; +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 ResourceProvidersClient. */ +public final class ResourceProvidersClientImpl implements ResourceProvidersClient { + /** The proxy service used to perform REST calls. */ + private final ResourceProvidersService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ResourceProvidersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResourceProvidersClientImpl(ContainerAppsApiClientImpl client) { + this.service = + RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientResourceProviders to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ResourceProvidersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> jobExecution( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("jobName") String jobName, + @PathParam("jobExecutionName") String jobExecutionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> jobExecutionWithResponseAsync( + String resourceGroupName, String jobName, String jobExecutionName) { + 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.")); + } + if (jobExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .jobExecution( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + jobName, + jobExecutionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> jobExecutionWithResponseAsync( + String resourceGroupName, String jobName, String jobExecutionName, 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.")); + } + if (jobExecutionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .jobExecution( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + jobName, + jobExecutionName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono jobExecutionAsync( + String resourceGroupName, String jobName, String jobExecutionName) { + return jobExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response jobExecutionWithResponse( + String resourceGroupName, String jobName, String jobExecutionName, Context context) { + return jobExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context).block(); + } + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName) { + return jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, Context.NONE).getValue(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java new file mode 100644 index 0000000000000..fcec09b561bf8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java @@ -0,0 +1,61 @@ +// Copyright (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.ResourceProvidersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; +import com.azure.resourcemanager.appcontainers.models.JobExecution; +import com.azure.resourcemanager.appcontainers.models.ResourceProviders; + +public final class ResourceProvidersImpl implements ResourceProviders { + private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); + + private final ResourceProvidersClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ResourceProvidersImpl( + ResourceProvidersClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response jobExecutionWithResponse( + String resourceGroupName, String jobName, String jobExecutionName, Context context) { + Response inner = + this.serviceClient().jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new JobExecutionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public JobExecution jobExecution(String resourceGroupName, String jobName, String jobExecutionName) { + JobExecutionInner inner = this.serviceClient().jobExecution(resourceGroupName, jobName, jobExecutionName); + if (inner != null) { + return new JobExecutionImpl(inner, this.manager()); + } else { + return null; + } + } + + private ResourceProvidersClient 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/RevisionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java index 7b42cccf03ba2..cdc5e901abdfd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.appcontainers.models.Revision; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; +import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; import com.azure.resourcemanager.appcontainers.models.Template; import java.time.OffsetDateTime; @@ -79,6 +80,10 @@ public RevisionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public RevisionRunningState runningState() { + return this.innerModel().runningState(); + } + public RevisionInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java index 5d0520f209484..b015b446de0f4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java @@ -11,13 +11,13 @@ @Fluent public final class AppLogsConfiguration { /* - * Logs destination + * Logs destination, can be 'log-analytics', 'azure-monitor' or 'none' */ @JsonProperty(value = "destination") private String destination; /* - * Log Analytics configuration + * Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' */ @JsonProperty(value = "logAnalyticsConfiguration") private LogAnalyticsConfiguration logAnalyticsConfiguration; @@ -27,7 +27,7 @@ public AppLogsConfiguration() { } /** - * Get the destination property: Logs destination. + * Get the destination property: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. * * @return the destination value. */ @@ -36,7 +36,7 @@ public String destination() { } /** - * Set the destination property: Logs destination. + * Set the destination property: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. * * @param destination the destination value to set. * @return the AppLogsConfiguration object itself. @@ -47,7 +47,8 @@ public AppLogsConfiguration withDestination(String destination) { } /** - * Get the logAnalyticsConfiguration property: Log Analytics configuration. + * Get the logAnalyticsConfiguration property: Log Analytics configuration, must only be provided when destination + * is configured as 'log-analytics'. * * @return the logAnalyticsConfiguration value. */ @@ -56,7 +57,8 @@ public LogAnalyticsConfiguration logAnalyticsConfiguration() { } /** - * Set the logAnalyticsConfiguration property: Log Analytics configuration. + * Set the logAnalyticsConfiguration property: Log Analytics configuration, must only be provided when destination + * is configured as 'log-analytics'. * * @param logAnalyticsConfiguration the logAnalyticsConfiguration value to set. * @return the AppLogsConfiguration object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java index 256228a582373..b2c689859bc01 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java @@ -28,6 +28,12 @@ public final class AzureCredentials { @JsonProperty(value = "tenantId") private String tenantId; + /* + * Kind of auth github does for deploying the template + */ + @JsonProperty(value = "kind") + private String kind; + /* * Subscription Id. */ @@ -98,6 +104,26 @@ public AzureCredentials withTenantId(String tenantId) { return this; } + /** + * Get the kind property: Kind of auth github does for deploying the template. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of auth github does for deploying the template. + * + * @param kind the kind value to set. + * @return the AzureCredentials object itself. + */ + public AzureCredentials withKind(String kind) { + this.kind = kind; + return this; + } + /** * Get the subscriptionId property: Subscription Id. * 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 230e78772bb17..98f0b1ad7b070 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 @@ -49,6 +49,12 @@ public final class Configuration { @JsonProperty(value = "maxInactiveRevisions") private Integer maxInactiveRevisions; + /* + * Container App to be a dev Container App Service + */ + @JsonProperty(value = "service") + private Service service; + /** Creates an instance of Configuration class. */ public Configuration() { } @@ -181,6 +187,26 @@ public Configuration withMaxInactiveRevisions(Integer maxInactiveRevisions) { return this; } + /** + * Get the service property: Container App to be a dev Container App Service. + * + * @return the service value. + */ + public Service service() { + return this.service; + } + + /** + * Set the service property: Container App to be a dev Container App Service. + * + * @param service the service value to set. + * @return the Configuration object itself. + */ + public Configuration withService(Service service) { + this.service = service; + return this; + } + /** * Validates the instance. * @@ -199,5 +225,8 @@ public void validate() { if (dapr() != null) { dapr().validate(); } + if (service() != null) { + service().validate(); + } } } 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 49af3cdd62282..e837a28d4a32a 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 @@ -556,4 +556,48 @@ Response listCustomHostnameAnalysisWithResponse( * @return auth token for a container app. */ ContainerAppAuthToken getAuthToken(); + + /** + * Start a container 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. + * @return container App. + */ + ContainerApp start(); + + /** + * Start a 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 container App. + */ + ContainerApp start(Context context); + + /** + * Stop a container 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. + * @return container App. + */ + ContainerApp stop(); + + /** + * Stop a 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 container App. + */ + ContainerApp stop(Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java new file mode 100644 index 0000000000000..e70047c568736 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java @@ -0,0 +1,50 @@ +// Copyright (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 com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Current running state of the container. */ +public final class ContainerAppContainerRunningState extends ExpandableStringEnum { + /** Static value Running for ContainerAppContainerRunningState. */ + public static final ContainerAppContainerRunningState RUNNING = fromString("Running"); + + /** Static value Terminated for ContainerAppContainerRunningState. */ + public static final ContainerAppContainerRunningState TERMINATED = fromString("Terminated"); + + /** Static value Waiting for ContainerAppContainerRunningState. */ + public static final ContainerAppContainerRunningState WAITING = fromString("Waiting"); + + /** + * Creates a new instance of ContainerAppContainerRunningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContainerAppContainerRunningState() { + } + + /** + * Creates or finds a ContainerAppContainerRunningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerAppContainerRunningState. + */ + @JsonCreator + public static ContainerAppContainerRunningState fromString(String name) { + return fromString(name, ContainerAppContainerRunningState.class); + } + + /** + * Gets known ContainerAppContainerRunningState values. + * + * @return known ContainerAppContainerRunningState values. + */ + public static Collection values() { + return values(ContainerAppContainerRunningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java new file mode 100644 index 0000000000000..a480ec43349e9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java @@ -0,0 +1,50 @@ +// Copyright (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 com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Current running state of the replica. */ +public final class ContainerAppReplicaRunningState extends ExpandableStringEnum { + /** Static value Running for ContainerAppReplicaRunningState. */ + public static final ContainerAppReplicaRunningState RUNNING = fromString("Running"); + + /** Static value NotRunning for ContainerAppReplicaRunningState. */ + public static final ContainerAppReplicaRunningState NOT_RUNNING = fromString("NotRunning"); + + /** Static value Unknown for ContainerAppReplicaRunningState. */ + public static final ContainerAppReplicaRunningState UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of ContainerAppReplicaRunningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContainerAppReplicaRunningState() { + } + + /** + * Creates or finds a ContainerAppReplicaRunningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerAppReplicaRunningState. + */ + @JsonCreator + public static ContainerAppReplicaRunningState fromString(String name) { + return fromString(name, ContainerAppReplicaRunningState.class); + } + + /** + * Gets known ContainerAppReplicaRunningState values. + * + * @return known ContainerAppReplicaRunningState values. + */ + public static Collection values() { + return values(ContainerAppReplicaRunningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java index c71a0228f1d2b..2f770f1625746 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java @@ -203,6 +203,60 @@ Response getAuthTokenWithResponse( */ ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName); + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + ContainerApp start(String resourceGroupName, String containerAppName); + + /** + * Start a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + ContainerApp start(String resourceGroupName, String containerAppName, Context context); + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + ContainerApp stop(String resourceGroupName, String containerAppName); + + /** + * Stop a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName 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 container App. + */ + ContainerApp stop(String resourceGroupName, String containerAppName, Context context); + /** * Get the properties of a Container App. * 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 18644f901af7d..2c1cf3be67f4b 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 @@ -28,6 +28,12 @@ public final class GithubActionConfiguration { @JsonProperty(value = "contextPath") private String contextPath; + /* + * One time Github PAT to configure github environment + */ + @JsonProperty(value = "githubPersonalAccessToken") + private String githubPersonalAccessToken; + /* * Image name */ @@ -122,6 +128,26 @@ public GithubActionConfiguration withContextPath(String contextPath) { return this; } + /** + * Get the githubPersonalAccessToken property: One time Github PAT to configure github environment. + * + * @return the githubPersonalAccessToken value. + */ + public String githubPersonalAccessToken() { + return this.githubPersonalAccessToken; + } + + /** + * Set the githubPersonalAccessToken property: One time Github PAT to configure github environment. + * + * @param githubPersonalAccessToken the githubPersonalAccessToken value to set. + * @return the GithubActionConfiguration object itself. + */ + public GithubActionConfiguration withGithubPersonalAccessToken(String githubPersonalAccessToken) { + this.githubPersonalAccessToken = githubPersonalAccessToken; + return this; + } + /** * Get the image property: Image name. * 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 f9af707d3b167..53e46caa7caaf 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 @@ -373,19 +373,16 @@ interface WithProperties { /** * Terminates execution of a running container apps job. * - * @param jobExecutionName List of all job executions that should be stopped. - * @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 executions collection ARM resource. */ - ContainerAppJobExecutions stopMultipleExecutions(JobExecutionNamesCollection jobExecutionName); + ContainerAppJobExecutions stopMultipleExecutions(); /** * Terminates execution of a running container apps job. * - * @param jobExecutionName List of all job executions that should be stopped. * @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 @@ -393,7 +390,7 @@ interface WithProperties { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ - ContainerAppJobExecutions stopMultipleExecutions(JobExecutionNamesCollection jobExecutionName, Context context); + ContainerAppJobExecutions stopMultipleExecutions(Context context); /** * List secrets for a container apps job. 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 350c04b172573..647c2dadb87e7 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 @@ -50,6 +50,12 @@ public final class JobConfiguration { @JsonProperty(value = "scheduleTriggerConfig") private JobConfigurationScheduleTriggerConfig scheduleTriggerConfig; + /* + * Trigger configuration of an event driven job. + */ + @JsonProperty(value = "eventTriggerConfig") + private JobConfigurationEventTriggerConfig eventTriggerConfig; + /* * Collection of private container registry credentials used by a Container apps job */ @@ -184,6 +190,26 @@ public JobConfiguration withScheduleTriggerConfig(JobConfigurationScheduleTrigge return this; } + /** + * Get the eventTriggerConfig property: Trigger configuration of an event driven job. + * + * @return the eventTriggerConfig value. + */ + public JobConfigurationEventTriggerConfig eventTriggerConfig() { + return this.eventTriggerConfig; + } + + /** + * Set the eventTriggerConfig property: Trigger configuration of an event driven job. + * + * @param eventTriggerConfig the eventTriggerConfig value to set. + * @return the JobConfiguration object itself. + */ + public JobConfiguration withEventTriggerConfig(JobConfigurationEventTriggerConfig eventTriggerConfig) { + this.eventTriggerConfig = eventTriggerConfig; + return this; + } + /** * Get the registries property: Collection of private container registry credentials used by a Container apps job. * @@ -224,6 +250,9 @@ public void validate() { if (scheduleTriggerConfig() != null) { scheduleTriggerConfig().validate(); } + if (eventTriggerConfig() != null) { + eventTriggerConfig().validate(); + } if (registries() != null) { registries().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java new file mode 100644 index 0000000000000..d2a7e3053a938 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java @@ -0,0 +1,107 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; + +/** Trigger configuration of an event driven job. */ +@Fluent +public final class JobConfigurationEventTriggerConfig { + /* + * Minimum number of successful replica completions before overall job completion. + */ + @JsonProperty(value = "replicaCompletionCount") + private Integer replicaCompletionCount; + + /* + * Number of parallel replicas of a job that can run at a given time. + */ + @JsonProperty(value = "parallelism") + private Integer parallelism; + + /* + * Scaling configurations for event driven jobs. + */ + @JsonProperty(value = "scale") + private JobScale scale; + + /** Creates an instance of JobConfigurationEventTriggerConfig class. */ + public JobConfigurationEventTriggerConfig() { + } + + /** + * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job + * completion. + * + * @return the replicaCompletionCount value. + */ + public Integer replicaCompletionCount() { + return this.replicaCompletionCount; + } + + /** + * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job + * completion. + * + * @param replicaCompletionCount the replicaCompletionCount value to set. + * @return the JobConfigurationEventTriggerConfig object itself. + */ + public JobConfigurationEventTriggerConfig withReplicaCompletionCount(Integer replicaCompletionCount) { + this.replicaCompletionCount = replicaCompletionCount; + return this; + } + + /** + * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. + * + * @return the parallelism value. + */ + public Integer parallelism() { + return this.parallelism; + } + + /** + * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. + * + * @param parallelism the parallelism value to set. + * @return the JobConfigurationEventTriggerConfig object itself. + */ + public JobConfigurationEventTriggerConfig withParallelism(Integer parallelism) { + this.parallelism = parallelism; + return this; + } + + /** + * Get the scale property: Scaling configurations for event driven jobs. + * + * @return the scale value. + */ + public JobScale scale() { + return this.scale; + } + + /** + * Set the scale property: Scaling configurations for event driven jobs. + * + * @param scale the scale value to set. + * @return the JobConfigurationEventTriggerConfig object itself. + */ + public JobConfigurationEventTriggerConfig withScale(JobScale scale) { + this.scale = scale; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scale() != null) { + scale().validate(); + } + } +} 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 4439c74df2cfd..94a3a816e3c81 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 @@ -45,7 +45,7 @@ public interface JobExecution { OffsetDateTime startTime(); /** - * Gets the endTime property: Job execution start time. + * Gets the endTime property: Job execution end time. * * @return the endTime value. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionNamesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionNamesCollection.java deleted file mode 100644 index 194c4607d0458..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionNamesCollection.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Container App executions names list. */ -@Fluent -public final class JobExecutionNamesCollection { - /* - * Collection of resources. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of JobExecutionNamesCollection class. */ - public JobExecutionNamesCollection() { - } - - /** - * 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 JobExecutionNamesCollection object itself. - */ - public JobExecutionNamesCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model JobExecutionNamesCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobExecutionNamesCollection.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java new file mode 100644 index 0000000000000..efaf34a130321 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java @@ -0,0 +1,132 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Scaling configurations for event driven jobs. */ +@Fluent +public final class JobScale { + /* + * Interval to check each event source in seconds. Defaults to 30s + */ + @JsonProperty(value = "pollingInterval") + private Integer pollingInterval; + + /* + * Minimum number of job executions that are created for a trigger, default 0 + */ + @JsonProperty(value = "minExecutions") + private Integer minExecutions; + + /* + * Maximum number of job executions that are created for a trigger, default 100. + */ + @JsonProperty(value = "maxExecutions") + private Integer maxExecutions; + + /* + * Scaling rules. + */ + @JsonProperty(value = "rules") + private List rules; + + /** Creates an instance of JobScale class. */ + public JobScale() { + } + + /** + * Get the pollingInterval property: Interval to check each event source in seconds. Defaults to 30s. + * + * @return the pollingInterval value. + */ + public Integer pollingInterval() { + return this.pollingInterval; + } + + /** + * Set the pollingInterval property: Interval to check each event source in seconds. Defaults to 30s. + * + * @param pollingInterval the pollingInterval value to set. + * @return the JobScale object itself. + */ + public JobScale withPollingInterval(Integer pollingInterval) { + this.pollingInterval = pollingInterval; + return this; + } + + /** + * Get the minExecutions property: Minimum number of job executions that are created for a trigger, default 0. + * + * @return the minExecutions value. + */ + public Integer minExecutions() { + return this.minExecutions; + } + + /** + * Set the minExecutions property: Minimum number of job executions that are created for a trigger, default 0. + * + * @param minExecutions the minExecutions value to set. + * @return the JobScale object itself. + */ + public JobScale withMinExecutions(Integer minExecutions) { + this.minExecutions = minExecutions; + return this; + } + + /** + * Get the maxExecutions property: Maximum number of job executions that are created for a trigger, default 100. + * + * @return the maxExecutions value. + */ + public Integer maxExecutions() { + return this.maxExecutions; + } + + /** + * Set the maxExecutions property: Maximum number of job executions that are created for a trigger, default 100. + * + * @param maxExecutions the maxExecutions value to set. + * @return the JobScale object itself. + */ + public JobScale withMaxExecutions(Integer maxExecutions) { + this.maxExecutions = maxExecutions; + return this; + } + + /** + * Get the rules property: Scaling rules. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: Scaling rules. + * + * @param rules the rules value to set. + * @return the JobScale object itself. + */ + public JobScale withRules(List rules) { + this.rules = rules; + 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()); + } + } +} 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 new file mode 100644 index 0000000000000..98412e5d0c3e2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java @@ -0,0 +1,133 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Scaling rule. */ +@Fluent +public final class JobScaleRule { + /* + * Scale Rule Name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Type of the scale rule + * eg: azure-servicebus, redis etc. + */ + @JsonProperty(value = "type") + private String type; + + /* + * Metadata properties to describe the scale rule. + */ + @JsonProperty(value = "metadata") + private Object metadata; + + /* + * Authentication secrets for the scale rule. + */ + @JsonProperty(value = "auth") + private List auth; + + /** Creates an instance of JobScaleRule class. */ + public JobScaleRule() { + } + + /** + * Get the name property: Scale Rule Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Scale Rule Name. + * + * @param name the name value to set. + * @return the JobScaleRule object itself. + */ + public JobScaleRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Type of the scale rule eg: azure-servicebus, redis etc. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Type of the scale rule eg: azure-servicebus, redis etc. + * + * @param type the type value to set. + * @return the JobScaleRule object itself. + */ + public JobScaleRule withType(String type) { + this.type = type; + return this; + } + + /** + * Get the metadata property: Metadata properties to describe the scale rule. + * + * @return the metadata value. + */ + public Object metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata properties to describe the scale rule. + * + * @param metadata the metadata value to set. + * @return the JobScaleRule object itself. + */ + public JobScaleRule withMetadata(Object metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the auth property: Authentication secrets for the scale rule. + * + * @return the auth value. + */ + public List auth() { + return this.auth; + } + + /** + * Set the auth property: Authentication secrets for the scale rule. + * + * @param auth the auth value to set. + * @return the JobScaleRule object itself. + */ + public JobScaleRule withAuth(List auth) { + this.auth = auth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (auth() != null) { + auth().forEach(e -> e.validate()); + } + } +} 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 98c5fb30bb4d1..b515a059cfd38 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 @@ -61,7 +61,7 @@ public interface Jobs { * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -75,7 +75,7 @@ public interface Jobs { * Get the properties of a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -88,7 +88,7 @@ public interface Jobs { * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -100,7 +100,7 @@ public interface Jobs { * Delete a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -113,7 +113,7 @@ public interface Jobs { * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -127,7 +127,7 @@ public interface Jobs { * Start a Container Apps Job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param template Properties used to start a job instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,7 +142,7 @@ public interface Jobs { * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request @@ -155,7 +155,7 @@ public interface Jobs { * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,23 +169,20 @@ public interface Jobs { * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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 container App executions collection ARM resource. */ - ContainerAppJobExecutions stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName); + ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName); /** * Terminates execution of a running container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job 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 @@ -193,14 +190,13 @@ ContainerAppJobExecutions stopMultipleExecutions( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ - ContainerAppJobExecutions stopMultipleExecutions( - String resourceGroupName, String jobName, JobExecutionNamesCollection jobExecutionName, Context context); + ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName, Context context); /** * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job 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 @@ -214,7 +210,7 @@ ContainerAppJobExecutions stopMultipleExecutions( * List secrets for a container apps job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java index 2fecb73b3db64..250d6e5c3961f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java @@ -13,7 +13,7 @@ public interface JobsExecutions { * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. @@ -26,7 +26,7 @@ public interface JobsExecutions { * Get a Container Apps Job's executions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 bfc2e4c6bc58d..56aa6fc181030 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 @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Log analytics configuration. */ +/** Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. */ @Fluent public final class LogAnalyticsConfiguration { /* 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 8f71116c110ce..d8e7a54ef30f9 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 @@ -173,6 +173,13 @@ public interface ManagedEnvironment { */ String infrastructureResourceGroup(); + /** + * Gets the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @return the peerAuthentication value. + */ + ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication(); + /** * Gets the region of the resource. * @@ -257,7 +264,8 @@ interface WithCreate DefinitionStages.WithWorkloadProfiles, DefinitionStages.WithKedaConfiguration, DefinitionStages.WithDaprConfiguration, - DefinitionStages.WithInfrastructureResourceGroup { + DefinitionStages.WithInfrastructureResourceGroup, + DefinitionStages.WithPeerAuthentication { /** * Executes the create request. * @@ -403,6 +411,16 @@ interface WithInfrastructureResourceGroup { */ WithCreate withInfrastructureResourceGroup(String infrastructureResourceGroup); } + /** The stage of the ManagedEnvironment definition allowing to specify peerAuthentication. */ + interface WithPeerAuthentication { + /** + * Specifies the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @param peerAuthentication Peer authentication settings for the Managed Environment. + * @return the next definition stage. + */ + WithCreate withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication); + } } /** * Begins update for the ManagedEnvironment resource. @@ -422,7 +440,8 @@ interface Update UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, UpdateStages.WithKedaConfiguration, - UpdateStages.WithDaprConfiguration { + UpdateStages.WithDaprConfiguration, + UpdateStages.WithPeerAuthentication { /** * Executes the update request. * @@ -546,6 +565,16 @@ interface WithDaprConfiguration { */ Update withDaprConfiguration(DaprConfiguration daprConfiguration); } + /** The stage of the ManagedEnvironment update allowing to specify peerAuthentication. */ + interface WithPeerAuthentication { + /** + * Specifies the peerAuthentication property: Peer authentication settings for the Managed Environment. + * + * @param peerAuthentication Peer authentication settings for the Managed Environment. + * @return the next definition stage. + */ + Update withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java new file mode 100644 index 0000000000000..ce20f1532b009 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java @@ -0,0 +1,53 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; + +/** Peer authentication settings for the Managed Environment. */ +@Fluent +public final class ManagedEnvironmentPropertiesPeerAuthentication { + /* + * Mutual TLS authentication settings for the Managed Environment + */ + @JsonProperty(value = "mtls") + private Mtls mtls; + + /** Creates an instance of ManagedEnvironmentPropertiesPeerAuthentication class. */ + public ManagedEnvironmentPropertiesPeerAuthentication() { + } + + /** + * Get the mtls property: Mutual TLS authentication settings for the Managed Environment. + * + * @return the mtls value. + */ + public Mtls mtls() { + return this.mtls; + } + + /** + * Set the mtls property: Mutual TLS authentication settings for the Managed Environment. + * + * @param mtls the mtls value to set. + * @return the ManagedEnvironmentPropertiesPeerAuthentication object itself. + */ + public ManagedEnvironmentPropertiesPeerAuthentication withMtls(Mtls mtls) { + this.mtls = mtls; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mtls() != null) { + mtls().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java new file mode 100644 index 0000000000000..8c66d5f1c720d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java @@ -0,0 +1,50 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration properties for mutual TLS authentication. */ +@Fluent +public final class Mtls { + /* + * Boolean indicating whether the mutual TLS authentication is enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** Creates an instance of Mtls class. */ + public Mtls() { + } + + /** + * Get the enabled property: Boolean indicating whether the mutual TLS authentication is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Boolean indicating whether the mutual TLS authentication is enabled. + * + * @param enabled the enabled value to set. + * @return the Mtls object itself. + */ + public Mtls withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java index 230bb1db0a434..6d183d5126565 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java @@ -46,6 +46,20 @@ public interface Replica { */ OffsetDateTime createdTime(); + /** + * Gets the runningState property: Current running state of the replica. + * + * @return the runningState value. + */ + ContainerAppReplicaRunningState runningState(); + + /** + * Gets the runningStateDetails property: The details of replica current running state. + * + * @return the runningStateDetails value. + */ + String runningStateDetails(); + /** * Gets the containers property: The containers collection under a replica. * @@ -53,6 +67,13 @@ public interface Replica { */ List containers(); + /** + * Gets the initContainers property: The init containers collection under a replica. + * + * @return the initContainers value. + */ + List initContainers(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner object. * 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 cc5137a779d8d..129d1e0ff42b9 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 @@ -40,6 +40,18 @@ public final class ReplicaContainer { @JsonProperty(value = "restartCount") private Integer restartCount; + /* + * Current running state of the container + */ + @JsonProperty(value = "runningState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerAppContainerRunningState runningState; + + /* + * The details of container current running state + */ + @JsonProperty(value = "runningStateDetails", access = JsonProperty.Access.WRITE_ONLY) + private String runningStateDetails; + /* * Log Stream endpoint */ @@ -156,6 +168,24 @@ public ReplicaContainer withRestartCount(Integer restartCount) { return this; } + /** + * Get the runningState property: Current running state of the container. + * + * @return the runningState value. + */ + public ContainerAppContainerRunningState runningState() { + return this.runningState; + } + + /** + * Get the runningStateDetails property: The details of container current running state. + * + * @return the runningStateDetails value. + */ + public String runningStateDetails() { + return this.runningStateDetails; + } + /** * Get the logStreamEndpoint property: Log Stream endpoint. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java new file mode 100644 index 0000000000000..548ce75182790 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java @@ -0,0 +1,41 @@ +// Copyright (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 ResourceProviders. */ +public interface ResourceProviders { + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution along with {@link Response}. + */ + Response jobExecutionWithResponse( + String resourceGroupName, String jobName, String jobExecutionName, Context context); + + /** + * Get details of a single job execution. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param jobExecutionName Job execution 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 details of a single job execution. + */ + JobExecution jobExecution(String resourceGroupName, String jobName, String jobExecutionName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java index 8faab8b965f77..d8a070ce555de 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java @@ -110,6 +110,13 @@ public interface Revision { */ RevisionProvisioningState provisioningState(); + /** + * Gets the runningState property: Current running state of the revision. + * + * @return the runningState value. + */ + RevisionRunningState runningState(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner object. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java new file mode 100644 index 0000000000000..347a898eb5966 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java @@ -0,0 +1,59 @@ +// Copyright (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 com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Current running state of the revision. */ +public final class RevisionRunningState extends ExpandableStringEnum { + /** Static value Running for RevisionRunningState. */ + public static final RevisionRunningState RUNNING = fromString("Running"); + + /** Static value Processing for RevisionRunningState. */ + public static final RevisionRunningState PROCESSING = fromString("Processing"); + + /** Static value Stopped for RevisionRunningState. */ + public static final RevisionRunningState STOPPED = fromString("Stopped"); + + /** Static value Degraded for RevisionRunningState. */ + public static final RevisionRunningState DEGRADED = fromString("Degraded"); + + /** Static value Failed for RevisionRunningState. */ + public static final RevisionRunningState FAILED = fromString("Failed"); + + /** Static value Unknown for RevisionRunningState. */ + public static final RevisionRunningState UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of RevisionRunningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RevisionRunningState() { + } + + /** + * Creates or finds a RevisionRunningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RevisionRunningState. + */ + @JsonCreator + public static RevisionRunningState fromString(String name) { + return fromString(name, RevisionRunningState.class); + } + + /** + * Gets known RevisionRunningState values. + * + * @return known RevisionRunningState values. + */ + public static Collection values() { + return values(RevisionRunningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java index 417502d90267e..08b69ad41a061 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java @@ -7,11 +7,11 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Auth Secrets for Container App Scale Rule. */ +/** Auth Secrets for Scale Rule. */ @Fluent public final class ScaleRuleAuth { /* - * Name of the Container App secret from which to pull the auth params. + * Name of the secret from which to pull the auth params. */ @JsonProperty(value = "secretRef") private String secretRef; @@ -27,7 +27,7 @@ public ScaleRuleAuth() { } /** - * Get the secretRef property: Name of the Container App secret from which to pull the auth params. + * Get the secretRef property: Name of the secret from which to pull the auth params. * * @return the secretRef value. */ @@ -36,7 +36,7 @@ public String secretRef() { } /** - * Set the secretRef property: Name of the Container App secret from which to pull the auth params. + * Set the secretRef property: Name of the secret from which to pull the auth params. * * @param secretRef the secretRef value to set. * @return the ScaleRuleAuth object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java new file mode 100644 index 0000000000000..5673a1e1ce38a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java @@ -0,0 +1,57 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; + +/** Container App to be a dev service. */ +@Fluent +public final class Service { + /* + * Dev ContainerApp service type + */ + @JsonProperty(value = "type", required = true) + private String type; + + /** Creates an instance of Service class. */ + public Service() { + } + + /** + * Get the type property: Dev ContainerApp service type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Dev ContainerApp service type. + * + * @param type the type value to set. + * @return the Service object itself. + */ + public Service withType(String type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property type in model Service")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Service.class); +} 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 new file mode 100644 index 0000000000000..85afd1e257ecb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java @@ -0,0 +1,76 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration to bind a ContainerApp to a dev ContainerApp Service. */ +@Fluent +public final class ServiceBind { + /* + * Resource id of the target service + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /* + * Name of the service bind + */ + @JsonProperty(value = "name") + private String name; + + /** Creates an instance of ServiceBind class. */ + public ServiceBind() { + } + + /** + * 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 ServiceBind object itself. + */ + public ServiceBind withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * 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 ServiceBind object itself. + */ + public ServiceBind withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java index e4bc9d02cee2b..a2ac125099189 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java @@ -20,6 +20,15 @@ public final class Template { @JsonProperty(value = "revisionSuffix") private String revisionSuffix; + /* + * Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be + * non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut + * down). If this value is nil, the default grace period will be used instead. Set this value longer than the + * expected cleanup time for your process. Defaults to 30 seconds. + */ + @JsonProperty(value = "terminationGracePeriodSeconds") + private Long terminationGracePeriodSeconds; + /* * List of specialized containers that run before app containers. */ @@ -44,6 +53,12 @@ public final class Template { @JsonProperty(value = "volumes") private List volumes; + /* + * List of container app services bound to the app + */ + @JsonProperty(value = "serviceBinds") + private List serviceBinds; + /** Creates an instance of Template class. */ public Template() { } @@ -68,6 +83,32 @@ public Template withRevisionSuffix(String revisionSuffix) { return this; } + /** + * Get the terminationGracePeriodSeconds property: Optional duration in seconds the Container App Instance needs to + * terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill + * signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set + * this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + * + * @return the terminationGracePeriodSeconds value. + */ + public Long terminationGracePeriodSeconds() { + return this.terminationGracePeriodSeconds; + } + + /** + * Set the terminationGracePeriodSeconds property: Optional duration in seconds the Container App Instance needs to + * terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill + * signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set + * this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + * + * @param terminationGracePeriodSeconds the terminationGracePeriodSeconds value to set. + * @return the Template object itself. + */ + public Template withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { + this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; + return this; + } + /** * Get the initContainers property: List of specialized containers that run before app containers. * @@ -148,6 +189,26 @@ public Template withVolumes(List volumes) { return this; } + /** + * Get the serviceBinds property: List of container app services bound to the app. + * + * @return the serviceBinds value. + */ + public List serviceBinds() { + return this.serviceBinds; + } + + /** + * Set the serviceBinds property: List of container app services bound to the app. + * + * @param serviceBinds the serviceBinds value to set. + * @return the Template object itself. + */ + public Template withServiceBinds(List serviceBinds) { + this.serviceBinds = serviceBinds; + return this; + } + /** * Validates the instance. * @@ -166,5 +227,8 @@ public void validate() { if (volumes() != null) { volumes().forEach(e -> e.validate()); } + if (serviceBinds() != null) { + serviceBinds().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java index 6443c68645843..c14298b76ec7f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java @@ -36,6 +36,12 @@ public final class Volume { @JsonProperty(value = "secrets") private List secrets; + /* + * Mount options used while mounting the AzureFile. Must be a comma-separated string. + */ + @JsonProperty(value = "mountOptions") + private String mountOptions; + /** Creates an instance of Volume class. */ public Volume() { } @@ -122,6 +128,26 @@ public Volume withSecrets(List secrets) { return this; } + /** + * Get the mountOptions property: Mount options used while mounting the AzureFile. Must be a comma-separated string. + * + * @return the mountOptions value. + */ + public String mountOptions() { + return this.mountOptions; + } + + /** + * Set the mountOptions property: Mount options used while mounting the AzureFile. Must be a comma-separated string. + * + * @param mountOptions the mountOptions value to set. + * @return the Volume object itself. + */ + public Volume withMountOptions(String mountOptions) { + this.mountOptions = mountOptions; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java index d0bcf41692410..ad15f4101e738 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java @@ -22,6 +22,12 @@ public final class VolumeMount { @JsonProperty(value = "mountPath") private String mountPath; + /* + * Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + */ + @JsonProperty(value = "subPath") + private String subPath; + /** Creates an instance of VolumeMount class. */ public VolumeMount() { } @@ -66,6 +72,28 @@ public VolumeMount withMountPath(String mountPath) { return this; } + /** + * Get the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to + * "" (volume's root). + * + * @return the subPath value. + */ + public String subPath() { + return this.subPath; + } + + /** + * Set the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to + * "" (volume's root). + * + * @param subPath the subPath value to set. + * @return the VolumeMount object itself. + */ + public VolumeMount withSubPath(String subPath) { + this.subPath = subPath; + return this; + } + /** * Validates the instance. * 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 20243e5d948e0..c435f1746a7f3 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 @@ -7,7 +7,7 @@ /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 fd7115d30c75d..67bdd2ad5bb37 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 @@ -7,7 +7,7 @@ /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. 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 fda5e3bb44175..32add2044cce2 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 @@ -10,7 +10,7 @@ /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. 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 a2d62e150471f..8565e5be596a1 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 @@ -7,7 +7,7 @@ /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 7afdcc55c2790..c8a4ae516ef7f 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 @@ -7,7 +7,7 @@ /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 19e63d09b955f..802098a5e21b4 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 @@ -7,7 +7,7 @@ /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 7feb0ec28c1c9..dd1b37a527a74 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 @@ -11,7 +11,7 @@ /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 0e16b7396eb57..1ecce19d4ffa7 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 @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. 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 b7a5e96558348..9e3efd70cd473 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsCertificates Delete. */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. 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 b381aaa20863c..cd95826ff3108 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsCertificates Get. */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 3ec2daac8d1bf..bc2be88c089d4 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsCertificates List. */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. 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 b39299b1072d8..cc7cde0e70f6f 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 @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsCertificates Update. */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. 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 17a6b371047a4..315c0fba3e1f7 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 @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments CheckNameAvailability. */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. 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 03967b5e40659..1292624dbdfce 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 @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 b9a22cf21da2e..b8e80e3944e99 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 @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. 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 0abe3cf6854f9..c4a9d7d1e4a83 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents Delete. */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. 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 7ab1c4ef3be0e..3c2a431856235 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents Get. */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. 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 736b94063500f..a4d388a34306f 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents List. */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. 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 9e334d4ba988a..8c866b01522e4 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. 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 c5b90ed3bbe5c..a0f547b5820b0 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments Delete. */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 e322fccc92159..cf435bd4faec4 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments GetByResourceGroup. */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 f0726cba257bb..876c6d9fe9901 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments ListByResourceGroup. */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. 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 d26c49c1d3cec..aad46e0241175 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments List. */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. 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 dfe807dcd2867..b2fda66c62844 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 @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. 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 feaaaba169b23..2467f960be906 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsStorages Delete. */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 ed92a1ade45d0..eca3d765ca1fe 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsStorages Get. */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 7375a18f943ae..f2b7f83d39164 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsStorages List. */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 3c3d4280aa003..d3d098349df79 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 @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments Update. */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 9d49b57556063..aa5616dfadf12 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 @@ -14,7 +14,7 @@ /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 88fc6c0e70275..efd3635381767 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 e486a12bc43cc..73ba415cfadfa 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 6bb2f3420aca9..17ceb2d7d55fe 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 896953945b45d..96531133e95aa 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 @@ -28,6 +28,8 @@ import com.azure.resourcemanager.appcontainers.models.LogLevel; 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.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; @@ -39,7 +41,7 @@ /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -116,7 +118,8 @@ public static void createOrUpdateContainerApp( .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) .withTemplate( new Template() .withInitContainers( @@ -163,12 +166,19 @@ public static void createOrUpdateContainerApp( .withCustom( new CustomScaleRule() .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds( + Arrays + .asList( + new ServiceBind() + .withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -229,7 +239,7 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. 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 9d1b11d976497..94815ad18cbeb 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. 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 e04fe4ea3b33f..9cf6bfa428885 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics GetDetector. */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 2cb9e976e50f6..3f18101e792be 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics GetRevision. */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 5ebdffab7ee88..8ad5d7c93335d 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics GetRoot. */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. 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 2847cbd6efef3..c1b5d5547cc18 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics ListDetectors. */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 5286f512641d4..2eeafe21515aa 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics ListRevisions. */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 46b42e2d7d7e4..ecf4f8c855a71 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps GetAuthToken. */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. 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 1eb2b548d9234..42dcc36193849 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. 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 afc60e55e8a12..24663f443b8a6 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 d70305487a85f..6365b5c657f21 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. 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 2e3fbe9995937..4b8a7a508afef 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 27aa4cf4bb305..b8e9578813a8a 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 @@ -7,7 +7,7 @@ /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. 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 e334879192ce3..aaa684e821065 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 bdb3851b56135..5c8cf44c662a5 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 68498f009b7a2..b184dafbbd040 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 ad54527931783..5b9db284f2f09 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 b892fc57b1d26..5c45031db0126 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 58d1a0cdf8bb8..b226025b0fe67 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 23dada518735c..264ff10cd3d00 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index 2461d4ac6b9e6..c62b5e31ac8be 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 @@ -11,7 +11,7 @@ /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -30,15 +30,17 @@ public static void createOrUpdateContainerAppSourceControl( new GithubActionConfiguration() .withRegistryInfo( new RegistryInfo() - .withRegistryUrl("xwang971reg.azurecr.io") - .withRegistryUsername("xwang971reg") + .withRegistryUrl("test-registry.azurecr.io") + .withRegistryUsername("test-registry") .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials( new AzureCredentials() .withClientId("") .withClientSecret("fakeTokenPlaceholder") - .withTenantId("")) + .withTenantId("") + .withKind("feaderated")) .withContextPath("./") + .withGithubPersonalAccessToken("fakeTokenPlaceholder") .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 61c7ffd028f3d..be001ea1e11ac 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. 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 ffe21a2a4964c..84a73234c6139 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 8c683848f9ddc..6d37cb149d6ab 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 @@ -7,7 +7,7 @@ /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 new file mode 100644 index 0000000000000..540feff12233a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) 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 ContainerApps Start. */ +public final class ContainerAppsStartSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-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); + } +} 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 new file mode 100644 index 0000000000000..6772e314694af --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) 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 ContainerApps Stop. */ +public final class ContainerAppsStopSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-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); + } +} 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 c83d5caa22bbe..126fa0a9d6660 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 @@ -25,6 +25,8 @@ import com.azure.resourcemanager.appcontainers.models.LogLevel; 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; @@ -35,7 +37,7 @@ /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -102,7 +104,8 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withHttpMaxRequestSize(10) .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) .withTemplate( new Template() .withInitContainers( @@ -147,7 +150,14 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withCustom( new CustomScaleRule() .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) + .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(); } 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 f54bbfd72586f..d3da093a120c1 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 @@ -12,7 +12,7 @@ /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -45,7 +45,7 @@ public static void createOrUpdateDaprComponentWithSecrets( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. 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 28f5c3ce9a1b2..bd4893db2acb7 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 @@ -7,7 +7,7 @@ /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 0bb32eddcde32..be79c353bb64b 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 @@ -7,7 +7,7 @@ /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -22,7 +22,7 @@ public static void getDaprComponentWithSecretStoreComponent( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 54769a039ba4e..2cf0047a545b1 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 @@ -7,7 +7,7 @@ /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 446140bc74fa1..e6a4f47784dc6 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 @@ -7,7 +7,7 @@ /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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/JobsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java index 6a978ce20f51b..0d7c55d733acf 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 @@ -4,6 +4,8 @@ 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.Container; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; @@ -11,16 +13,84 @@ import com.azure.resourcemanager.appcontainers.models.ContainerResources; 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.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import java.io.IOException; import java.util.Arrays; /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_CreateorUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_CreateorUpdate_EventTrigger.json + */ + /** + * Sample code: Create or Update Container Apps Job With Event Driven Trigger. + * + * @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") + .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))))))) + .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(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. 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 e542ced67cc3c..fd2cae8808427 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 @@ -7,7 +7,7 @@ /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. 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 5ca014a9fc6c4..4c4a19c2d34ec 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 @@ -7,7 +7,7 @@ /** Samples for JobsExecutions List. */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. 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 0564077bf0c09..76c438f1a8830 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 @@ -7,7 +7,7 @@ /** Samples for Jobs GetByResourceGroup. */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps 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 3d5ebe1e05584..463cff617ffaf 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 @@ -7,7 +7,7 @@ /** Samples for Jobs ListByResourceGroup. */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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/JobsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java index 54b085f655071..ee47506e096bc 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 @@ -7,7 +7,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Jobs_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 5b44a58d0d99f..fd57aad810872 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 @@ -7,7 +7,7 @@ /** Samples for Jobs ListSecrets. */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. 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 af656a8947c4f..5b263f7e638b3 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 @@ -12,7 +12,7 @@ /** Samples for Jobs Start. */ public final class JobsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. 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 6d47d7aadcd15..0a53297d4d568 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 @@ -7,7 +7,7 @@ /** Samples for Jobs StopExecution. */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. 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 0b634d3537fd7..3d90e03df442d 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 @@ -4,14 +4,10 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; -import java.util.Arrays; - /** Samples for Jobs StopMultipleExecutions. */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -20,18 +16,6 @@ public final class JobsStopMultipleExecutionsSamples { */ public static void terminateMultipleContainerAppsJob( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .jobs() - .stopMultipleExecutions( - "rg", - "testcontainerAppsJob0", - new JobExecutionNamesCollection() - .withValue( - Arrays - .asList( - new JobExecutionBaseInner().withName("jobExecution-27944453"), - new JobExecutionBaseInner().withName("jobExecution-27944452"), - new JobExecutionBaseInner().withName("jobExecution-27944451"))), - 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/JobsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java index 20bcea1a443b1..1c9f49e080946 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 @@ -22,7 +22,7 @@ /** Samples for Jobs Update. */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. 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 9695bbd944581..d29233eec8364 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 @@ -10,7 +10,7 @@ /** Samples for ManagedCertificates CreateOrUpdate. */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 d36229a0ca29a..bc33d2abbe98d 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 @@ -7,7 +7,7 @@ /** Samples for ManagedCertificates Delete. */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 1dc1b1f3123af..36258394827f3 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 @@ -7,7 +7,7 @@ /** Samples for ManagedCertificates Get. */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 688f546880e47..860d9e5b4a359 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 @@ -7,7 +7,7 @@ /** Samples for ManagedCertificates List. */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. 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 05683a33f2f95..8dd8a869a6224 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 @@ -11,7 +11,7 @@ /** Samples for ManagedCertificates Update. */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 9b93d65c18404..dbd3fa2083349 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentDiagnostics GetDetector. */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 5c8d96149b4f2..22c8b5b6e6b14 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java index bf678b059c055..8b244ac725ce6 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 @@ -7,6 +7,8 @@ import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.Mtls; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Arrays; @@ -14,7 +16,7 @@ /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. @@ -68,7 +70,7 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -116,6 +118,8 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .withMinimumCount(3) .withMaximumCount(6), new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) + .withPeerAuthentication( + new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) .create(); } } 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 e2d498e9e7b18..397541625d286 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 301eda03c2397..c653708ed3c13 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 4fab8c0765f14..e831f1dcca31a 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments GetAuthToken. */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 4610b1cdede4e..cca074cffd9bc 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 3e769980ac7a5..e1109e6cc6cb0 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. 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 f4576ae4674d1..65c3105bf7830 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. 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 7dabc8f21bcc6..10d3772b555cc 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. 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 82c32d794747c..cad9801d11443 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 @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. 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 c7b98e0c5c377..657dee3beea22 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 188abd50ff546..51934958f8b03 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/ManagedEnvironmentsStorages_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/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 64f07a38bf3e8..bda3fbc378975 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 @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 85f95e3215585..5baaaf4267a7d 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 @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 fd0c52949c05c..231c64abc7f48 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 @@ -9,7 +9,7 @@ /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -30,7 +30,7 @@ public static void certificatesCheckNameAvailability( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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 8a9c358610b3b..2ade91a79679b 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 @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/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/ResourceProviderJobExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java new file mode 100644 index 0000000000000..0d41f32d5b81c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) 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 ResourceProvider JobExecution. */ +public final class ResourceProviderJobExecutionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/examples/Job_Execution_Get.json + */ + /** + * Sample code: Get a single Job Execution. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .resourceProviders() + .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + } +} 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 5ea62dd4ffb44..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.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.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\":[\"rbnwbxgjvtbvpy\",\"szdnr\",\"jq\",\"uhmuouqfprwzwbn\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("rbnwbxgjvtbvpy", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model = - new AllowedAudiencesValidation() - .withAllowedAudiences(Arrays.asList("rbnwbxgjvtbvpy", "szdnr", "jq", "uhmuouqfprwzwbn")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("rbnwbxgjvtbvpy", 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 d830785954456..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.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.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\":[\"ddhsgcbacphe\",\"koty\",\"qgoulznd\"],\"identities\":[\"wyqkgfgibm\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("ddhsgcbacphe", model.groups().get(0)); - Assertions.assertEquals("wyqkgfgibm", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model = - new AllowedPrincipals() - .withGroups(Arrays.asList("ddhsgcbacphe", "koty", "qgoulznd")) - .withIdentities(Arrays.asList("wyqkgfgibm")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("ddhsgcbacphe", model.groups().get(0)); - Assertions.assertEquals("wyqkgfgibm", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java deleted file mode 100644 index eb6bce22d16dd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.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.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import java.util.Arrays; - -public final class AuthConfigCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthConfigCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"xpyb\",\"name\":\"zm\",\"type\":\"hmtzopbsphrup\"},{\"properties\":{},\"id\":\"jhphoyc\",\"name\":\"sx\",\"type\":\"obhdxbmtqioqjze\"},{\"properties\":{},\"id\":\"wnoi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}],\"nextLink\":\"mbpazlobcufpdzn\"}") - .toObject(AuthConfigCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthConfigCollection model = - new AuthConfigCollection() - .withValue(Arrays.asList(new AuthConfigInner(), new AuthConfigInner(), new AuthConfigInner())); - model = BinaryData.fromObject(model).toObject(AuthConfigCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java deleted file mode 100644 index 2bd2f4ca5288a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AuthConfigInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthConfigInner model = - BinaryData - .fromString( - "{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"jnqglhqgnu\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"ywifsqesaag\",\"excludedPaths\":[\"glzlhjxrifkwmrv\",\"tsizntocipaoua\"]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"nygj\",\"fjddeqs\",\"deupewnwrei\"]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"rh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"}") - .toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthConfigInner model = - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("jnqglhqgnu")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("ywifsqesaag") - .withExcludedPaths(Arrays.asList("glzlhjxrifkwmrv", "tsizntocipaoua"))) - .withIdentityProviders(new IdentityProviders().withCustomOpenIdConnectProviders(mapOf())) - .withLogin( - new Login() - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("nygj", "fjddeqs", "deupewnwrei"))) - .withHttpSettings(new HttpSettings().withRequireHttps(false)); - model = BinaryData.fromObject(model).toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @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/AuthConfigPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java deleted file mode 100644 index efa0380c112aa..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigProperties; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.CustomOpenIdConnectProvider; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import com.azure.resourcemanager.appcontainers.models.Twitter; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AuthConfigPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthConfigProperties model = - BinaryData - .fromString( - "{\"platform\":{\"enabled\":true,\"runtimeVersion\":\"sjtxukcdmp\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"uanzwuxzdx\",\"excludedPaths\":[\"rlhm\",\"hfpmrqobmtukknr\",\"rtihfxtijbpz\",\"gnwzsymglzufc\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":false,\"graphApiVersion\":\"cbjy\"},\"gitHub\":{\"enabled\":false},\"google\":{\"enabled\":true},\"twitter\":{\"enabled\":true},\"apple\":{\"enabled\":false},\"azureStaticWebApps\":{\"enabled\":false},\"customOpenIdConnectProviders\":{\"y\":{\"enabled\":false}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"b\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"vd\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"tfwvukxgaudc\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"jcny\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"htnapczwlokjyem\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"pjoxzjnch\",\"customProtoHeaderName\":\"jspodmailzyde\"}}}") - .toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthConfigProperties model = - new AuthConfigProperties() - .withPlatform(new AuthPlatform().withEnabled(true).withRuntimeVersion("sjtxukcdmp")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("uanzwuxzdx") - .withExcludedPaths(Arrays.asList("rlhm", "hfpmrqobmtukknr", "rtihfxtijbpz", "gnwzsymglzufc"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory().withEnabled(false).withIsAutoProvisioned(true)) - .withFacebook(new Facebook().withEnabled(false).withGraphApiVersion("cbjy")) - .withGitHub(new GitHub().withEnabled(false)) - .withGoogle(new Google().withEnabled(true)) - .withTwitter(new Twitter().withEnabled(true)) - .withApple(new Apple().withEnabled(false)) - .withAzureStaticWebApps(new AzureStaticWebApps().withEnabled(false)) - .withCustomOpenIdConnectProviders( - mapOf("y", new CustomOpenIdConnectProvider().withEnabled(false)))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("b")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("vd")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("tfwvukxgaudc")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("jcny"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("htnapczwlokjyem")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("pjoxzjnch") - .withCustomProtoHeaderName("jspodmailzyde"))); - model = BinaryData.fromObject(model).toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @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/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 016df91d979a8..0000000000000 --- 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\":true,\"runtimeVersion\":\"yahux\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("yahux"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", 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 c29d4f3eb479f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.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.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\":\"cknfnwmbtmvpd\",\"isDataAction\":true,\"display\":{\"provider\":\"tzaefedx\",\"resource\":\"ch\",\"operation\":\"hk\",\"description\":\"rjdqnsdfzp\"},\"origin\":\"tg\"}],\"nextLink\":\"lkdghr\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("cknfnwmbtmvpd", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("tzaefedx", model.value().get(0).display().provider()); - Assertions.assertEquals("ch", model.value().get(0).display().resource()); - Assertions.assertEquals("hk", model.value().get(0).display().operation()); - Assertions.assertEquals("rjdqnsdfzp", model.value().get(0).display().description()); - Assertions.assertEquals("tg", model.value().get(0).origin()); - Assertions.assertEquals("lkdghr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = - new AvailableOperations() - .withValue( - Arrays - .asList( - new OperationDetailInner() - .withName("cknfnwmbtmvpd") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("tzaefedx") - .withResource("ch") - .withOperation("hk") - .withDescription("rjdqnsdfzp")) - .withOrigin("tg"))) - .withNextLink("lkdghr"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("cknfnwmbtmvpd", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("tzaefedx", model.value().get(0).display().provider()); - Assertions.assertEquals("ch", model.value().get(0).display().resource()); - Assertions.assertEquals("hk", model.value().get(0).display().operation()); - Assertions.assertEquals("rjdqnsdfzp", model.value().get(0).display().description()); - Assertions.assertEquals("tg", model.value().get(0).origin()); - Assertions.assertEquals("lkdghr", 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 23aa3f6dcf839..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.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.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\":\"fbowskanyk\",\"properties\":{\"category\":\"cuiywgqyw\",\"applicability\":\"LocationDefault\",\"cores\":974991639,\"memoryGiB\":1069077696,\"displayName\":\"zgpphrcgyncocpe\"},\"id\":\"vmmcoofs\",\"name\":\"lzevgbmqjqab\",\"type\":\"y\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("fbowskanyk", model.location()); - Assertions.assertEquals("cuiywgqyw", model.properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.properties().applicability()); - Assertions.assertEquals(974991639, model.properties().cores()); - Assertions.assertEquals(1069077696, model.properties().memoryGiB()); - Assertions.assertEquals("zgpphrcgyncocpe", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = - new AvailableWorkloadProfileInner() - .withLocation("fbowskanyk") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("cuiywgqyw") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(974991639) - .withMemoryGiB(1069077696) - .withDisplayName("zgpphrcgyncocpe")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("fbowskanyk", model.location()); - Assertions.assertEquals("cuiywgqyw", model.properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.properties().applicability()); - Assertions.assertEquals(974991639, model.properties().cores()); - Assertions.assertEquals(1069077696, model.properties().memoryGiB()); - Assertions.assertEquals("zgpphrcgyncocpe", 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 693b7c45a1da1..0000000000000 --- 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\":\"ivkwlzuvccfwnfnb\",\"applicability\":\"LocationDefault\",\"cores\":2055969856,\"memoryGiB\":198217735,\"displayName\":\"bxetqgtzxdpn\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(2055969856, model.cores()); - Assertions.assertEquals(198217735, model.memoryGiB()); - Assertions.assertEquals("bxetqgtzxdpn", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model = - new AvailableWorkloadProfileProperties() - .withCategory("ivkwlzuvccfwnfnb") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(2055969856) - .withMemoryGiB(198217735) - .withDisplayName("bxetqgtzxdpn"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("ivkwlzuvccfwnfnb", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(2055969856, model.cores()); - Assertions.assertEquals(198217735, model.memoryGiB()); - Assertions.assertEquals("bxetqgtzxdpn", 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 086c04bd86e14..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.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.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\":\"gmaajrm\",\"properties\":{\"category\":\"wzrlovmclwhij\",\"applicability\":\"Custom\",\"cores\":1491222167,\"memoryGiB\":1583993126,\"displayName\":\"aqsqsycbkbfk\"},\"id\":\"kdkexxp\",\"name\":\"ofmx\",\"type\":\"x\"},{\"location\":\"jpgd\",\"properties\":{\"category\":\"c\",\"applicability\":\"LocationDefault\",\"cores\":1303757459,\"memoryGiB\":193768750,\"displayName\":\"uexhdzx\"},\"id\":\"qeojnxqbzvddntw\",\"name\":\"deicbtwnpzao\",\"type\":\"vuhrhcffcyddgl\"},{\"location\":\"t\",\"properties\":{\"category\":\"kw\",\"applicability\":\"Custom\",\"cores\":1516038621,\"memoryGiB\":775876395,\"displayName\":\"ciwqvhk\"},\"id\":\"xuigdtopbobj\",\"name\":\"ghmewuam\",\"type\":\"uhrzayvvt\"},{\"location\":\"vdfgiotk\",\"properties\":{\"category\":\"tqxln\",\"applicability\":\"Custom\",\"cores\":1542158785,\"memoryGiB\":719588208,\"displayName\":\"nxkrx\"},\"id\":\"mi\",\"name\":\"tthzrvqd\",\"type\":\"abhjybi\"}],\"nextLink\":\"h\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("gmaajrm", model.value().get(0).location()); - Assertions.assertEquals("wzrlovmclwhij", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1491222167, model.value().get(0).properties().cores()); - Assertions.assertEquals(1583993126, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("aqsqsycbkbfk", 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("gmaajrm") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("wzrlovmclwhij") - .withApplicability(Applicability.CUSTOM) - .withCores(1491222167) - .withMemoryGiB(1583993126) - .withDisplayName("aqsqsycbkbfk")), - new AvailableWorkloadProfileInner() - .withLocation("jpgd") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("c") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1303757459) - .withMemoryGiB(193768750) - .withDisplayName("uexhdzx")), - new AvailableWorkloadProfileInner() - .withLocation("t") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("kw") - .withApplicability(Applicability.CUSTOM) - .withCores(1516038621) - .withMemoryGiB(775876395) - .withDisplayName("ciwqvhk")), - new AvailableWorkloadProfileInner() - .withLocation("vdfgiotk") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("tqxln") - .withApplicability(Applicability.CUSTOM) - .withCores(1542158785) - .withMemoryGiB(719588208) - .withDisplayName("nxkrx")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("gmaajrm", model.value().get(0).location()); - Assertions.assertEquals("wzrlovmclwhij", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1491222167, model.value().get(0).properties().cores()); - Assertions.assertEquals(1583993126, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("aqsqsycbkbfk", 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 55567fa8c3c7a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"qnmcjngzqdqx\",\"properties\":{\"category\":\"wgnyfusfzsvtui\",\"applicability\":\"Custom\",\"cores\":566108141,\"memoryGiB\":1502257649,\"displayName\":\"cfhmlrqryxyn\"},\"id\":\"zrdpsovwxznptgoe\",\"name\":\"ybbabpfhvfsl\",\"type\":\"vntjlrigjk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("waz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qnmcjngzqdqx", response.iterator().next().location()); - Assertions.assertEquals("wgnyfusfzsvtui", response.iterator().next().properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, response.iterator().next().properties().applicability()); - Assertions.assertEquals(566108141, response.iterator().next().properties().cores()); - Assertions.assertEquals(1502257649, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals("cfhmlrqryxyn", 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 1e4f124939058..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.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.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\":[\"jkjlxofpdvhpfx\",\"ypininm\",\"yhuybbkpod\"],\"disableWWWAuthenticate\":true}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("jkjlxofpdvhpfx", 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("jkjlxofpdvhpfx", "ypininm", "yhuybbkpod")) - .withDisableWwwAuthenticate(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("jkjlxofpdvhpfx", 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/AzureActiveDirectoryValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java deleted file mode 100644 index 11d61bdb7a2c6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureActiveDirectoryValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureActiveDirectoryValidation model = - BinaryData - .fromString( - "{\"jwtClaimChecks\":{\"allowedGroups\":[\"nuvamiheogna\",\"xzxtheo\",\"usivye\"],\"allowedClientApplications\":[\"iqihn\",\"un\",\"bwjzr\"]},\"allowedAudiences\":[\"gxg\",\"spemvtzfk\",\"fublj\"],\"defaultAuthorizationPolicy\":{\"allowedPrincipals\":{\"groups\":[\"ofjaeqjhqjb\",\"s\",\"msmjqulngsntn\"],\"identities\":[\"kzgcwrwcl\",\"xwrljdouskcqvkoc\",\"cjdkwtnhxbnjbi\"]},\"allowedApplications\":[\"rglssainqpj\",\"nzl\",\"jfm\",\"pee\"]}}") - .toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("nuvamiheogna", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("iqihn", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("gxg", model.allowedAudiences().get(0)); - Assertions.assertEquals("ofjaeqjhqjb", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("kzgcwrwcl", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("rglssainqpj", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureActiveDirectoryValidation model = - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("nuvamiheogna", "xzxtheo", "usivye")) - .withAllowedClientApplications(Arrays.asList("iqihn", "un", "bwjzr"))) - .withAllowedAudiences(Arrays.asList("gxg", "spemvtzfk", "fublj")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("ofjaeqjhqjb", "s", "msmjqulngsntn")) - .withIdentities(Arrays.asList("kzgcwrwcl", "xwrljdouskcqvkoc", "cjdkwtnhxbnjbi"))) - .withAllowedApplications(Arrays.asList("rglssainqpj", "nzl", "jfm", "pee"))); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("nuvamiheogna", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("iqihn", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("gxg", model.allowedAudiences().get(0)); - Assertions.assertEquals("ofjaeqjhqjb", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("kzgcwrwcl", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("rglssainqpj", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } -} 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 584ef95d2fbf1..0000000000000 --- 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\":\"ymzidn\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("ymzidn", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("ymzidn"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("ymzidn", 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 9513a77820a5f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.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.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\":\"mijcmmxdcufufs\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mijcmmxdcufufs", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = - new AzureStaticWebApps() - .withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("mijcmmxdcufufs")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mijcmmxdcufufs", 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 dbe0377c9fc08..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.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; - -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\":[{\"location\":\"qwxrjfeallnw\",\"properties\":{\"category\":\"isnjampmngnz\",\"meterType\":\"xaqwoochcbonqv\",\"displayName\":\"vlrxnjeaseiph\"},\"id\":\"f\",\"name\":\"okeyyienj\",\"type\":\"dlwtgrhpdj\"},{\"location\":\"umasxazjpq\",\"properties\":{\"category\":\"ualhbxxhejj\",\"meterType\":\"v\",\"displayName\":\"dgwdslfhot\"},\"id\":\"cynpwlbjnp\",\"name\":\"acfta\",\"type\":\"ehxnltyfsop\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("qwxrjfeallnw", model.value().get(0).location()); - Assertions.assertEquals("isnjampmngnz", model.value().get(0).properties().category()); - Assertions.assertEquals("xaqwoochcbonqv", model.value().get(0).properties().meterType()); - Assertions.assertEquals("vlrxnjeaseiph", 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("qwxrjfeallnw") - .withProperties( - new BillingMeterProperties() - .withCategory("isnjampmngnz") - .withMeterType("xaqwoochcbonqv") - .withDisplayName("vlrxnjeaseiph")), - new BillingMeter() - .withLocation("umasxazjpq") - .withProperties( - new BillingMeterProperties() - .withCategory("ualhbxxhejj") - .withMeterType("v") - .withDisplayName("dgwdslfhot")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("qwxrjfeallnw", model.value().get(0).location()); - Assertions.assertEquals("isnjampmngnz", model.value().get(0).properties().category()); - Assertions.assertEquals("xaqwoochcbonqv", model.value().get(0).properties().meterType()); - Assertions.assertEquals("vlrxnjeaseiph", 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 896238f2a0979..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.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.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\":\"fqweykhmene\",\"meterType\":\"yexfwh\",\"displayName\":\"cibvyvdcsitynn\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("fqweykhmene", model.category()); - Assertions.assertEquals("yexfwh", model.meterType()); - Assertions.assertEquals("cibvyvdcsitynn", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = - new BillingMeterProperties() - .withCategory("fqweykhmene") - .withMeterType("yexfwh") - .withDisplayName("cibvyvdcsitynn"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("fqweykhmene", model.category()); - Assertions.assertEquals("yexfwh", model.meterType()); - Assertions.assertEquals("cibvyvdcsitynn", 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 33b6601de5372..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.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.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( - "{\"location\":\"suesnzw\",\"properties\":{\"category\":\"bavo\",\"meterType\":\"zdmohctbqvu\",\"displayName\":\"xdn\"},\"id\":\"vo\",\"name\":\"gujjugwdkcglh\",\"type\":\"lazjdyggdtjixhbk\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("suesnzw", model.location()); - Assertions.assertEquals("bavo", model.properties().category()); - Assertions.assertEquals("zdmohctbqvu", model.properties().meterType()); - Assertions.assertEquals("xdn", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model = - new BillingMeter() - .withLocation("suesnzw") - .withProperties( - new BillingMeterProperties() - .withCategory("bavo") - .withMeterType("zdmohctbqvu") - .withDisplayName("xdn")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("suesnzw", model.location()); - Assertions.assertEquals("bavo", model.properties().category()); - Assertions.assertEquals("zdmohctbqvu", model.properties().meterType()); - Assertions.assertEquals("xdn", 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 8b8f3f703b7a9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BillingMetersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"aabzmif\",\"id\":\"znmmaxrizkzobgo\",\"name\":\"xlhslnel\",\"type\":\"ieixynllxe\"},{\"location\":\"crojp\",\"id\":\"hcawjutifdwfmv\",\"name\":\"gorqjbttzh\",\"type\":\"aglkafhon\"},{\"location\":\"ujeickp\",\"id\":\"p\",\"name\":\"pmxelnwcltyje\",\"type\":\"ex\"},{\"location\":\"lfmk\",\"id\":\"azuawx\",\"name\":\"z\",\"type\":\"puamwabzxr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("kyrioovzid", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("aabzmif", response.value().get(0).location()); - } -} 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 6fb32c1ab4149..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.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.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\":{\"flz\":\"ukgri\",\"qzahmgkbrp\":\"fbxzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("ukgri", model.tags().get("flz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = - new CertificatePatch() - .withTags( - mapOf("flz", "ukgri", "qzahmgkbrp", "fbxzpuzycisp", "hibnuqqkpika", "y", "buynhijggm", "rgvtqag")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("ukgri", model.tags().get("flz")); - } - - @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 aa98618186f8a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("klinhmdptysprq", "gnzxojpslsvj", "pli", 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 692d3ffcf8f7b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.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.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\":\"idokgjlj\",\"type\":\"xgvcl\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("idokgjlj", model.name()); - Assertions.assertEquals("xgvcl", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("idokgjlj").withType("xgvcl"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("idokgjlj", model.name()); - Assertions.assertEquals("xgvcl", 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 747841faabc2a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.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.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\":true,\"reason\":\"Invalid\",\"message\":\"ghkjeszzhbi\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("ghkjeszzhbi", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.INVALID) - .withMessage("ghkjeszzhbi"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("ghkjeszzhbi", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java deleted file mode 100644 index f63d1c6cf7fe8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ConnectedEnvironmentCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectedEnvironmentCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"ctehfiqscjey\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InfrastructureSetupInProgress\",\"deploymentErrors\":\"gqhcjrefovg\",\"defaultDomain\":\"qsl\",\"staticIp\":\"yvxyqjp\",\"daprAIConnectionString\":\"attpngjcrcczsq\"},\"location\":\"vmdajvnysou\",\"tags\":{\"yhltrpmopjmcm\":\"canoaeupf\"},\"id\":\"tuo\",\"name\":\"thfuiuaodsfcpkvx\",\"type\":\"dpuozmyz\"},{\"extendedLocation\":{\"name\":\"gf\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Waiting\",\"deploymentErrors\":\"iu\",\"defaultDomain\":\"ktwh\",\"staticIp\":\"xw\",\"daprAIConnectionString\":\"wqsmbsur\"},\"location\":\"moryocfsfksym\",\"tags\":{\"o\":\"stkiiuxhqyud\"},\"id\":\"rq\",\"name\":\"b\",\"type\":\"oczvy\"},{\"extendedLocation\":{\"name\":\"rvkdvjsllrm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentErrors\":\"kpnpulexxbczwtr\",\"defaultDomain\":\"iqzbq\",\"staticIp\":\"sovmyokacspkwl\",\"daprAIConnectionString\":\"dobpxjmflbvvn\"},\"location\":\"kcciwwzjuqkhr\",\"tags\":{\"ghsauuimjmvxied\":\"iwkuofos\",\"byao\":\"ugidyjrr\",\"xc\":\"v\",\"hocohslkev\":\"onpc\"},\"id\":\"eggzfb\",\"name\":\"hfmvfaxkffe\",\"type\":\"ithlvmezyvshxm\"},{\"extendedLocation\":{\"name\":\"bzoggigrx\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentErrors\":\"xjnspy\",\"defaultDomain\":\"tko\",\"staticIp\":\"kouknvudwtiu\",\"daprAIConnectionString\":\"ldngkpoci\"},\"location\":\"yxoegukgjnp\",\"tags\":{\"zntypmrb\":\"gygev\",\"ydnfyhxdeoejz\":\"izcdrqjsd\"},\"id\":\"cwif\",\"name\":\"jttgzf\",\"type\":\"ishc\"}],\"nextLink\":\"hajdeyeamdpha\"}") - .toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("vmdajvnysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ctehfiqscjey", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("yvxyqjp", model.value().get(0).staticIp()); - Assertions.assertEquals("attpngjcrcczsq", model.value().get(0).daprAIConnectionString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectedEnvironmentCollection model = - new ConnectedEnvironmentCollection() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentInner() - .withLocation("vmdajvnysou") - .withTags(mapOf("yhltrpmopjmcm", "canoaeupf")) - .withExtendedLocation( - new ExtendedLocation() - .withName("ctehfiqscjey") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("yvxyqjp") - .withDaprAIConnectionString("attpngjcrcczsq"), - new ConnectedEnvironmentInner() - .withLocation("moryocfsfksym") - .withTags(mapOf("o", "stkiiuxhqyud")) - .withExtendedLocation( - new ExtendedLocation() - .withName("gf") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("xw") - .withDaprAIConnectionString("wqsmbsur"), - new ConnectedEnvironmentInner() - .withLocation("kcciwwzjuqkhr") - .withTags( - mapOf( - "ghsauuimjmvxied", - "iwkuofos", - "byao", - "ugidyjrr", - "xc", - "v", - "hocohslkev", - "onpc")) - .withExtendedLocation( - new ExtendedLocation() - .withName("rvkdvjsllrm") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("sovmyokacspkwl") - .withDaprAIConnectionString("dobpxjmflbvvn"), - new ConnectedEnvironmentInner() - .withLocation("yxoegukgjnp") - .withTags(mapOf("zntypmrb", "gygev", "ydnfyhxdeoejz", "izcdrqjsd")) - .withExtendedLocation( - new ExtendedLocation() - .withName("bzoggigrx") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("kouknvudwtiu") - .withDaprAIConnectionString("ldngkpoci"))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("vmdajvnysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ctehfiqscjey", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("yvxyqjp", model.value().get(0).staticIp()); - Assertions.assertEquals("attpngjcrcczsq", model.value().get(0).daprAIConnectionString()); - } - - @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/ConnectedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 69d4f25b81809..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.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.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -import java.util.Arrays; - -public final class ConnectedEnvironmentStoragesCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"jn\",\"name\":\"bckhsmtxpsi\",\"type\":\"btfhvpesaps\"},{\"properties\":{},\"id\":\"mhjjdhtldwkyzx\",\"name\":\"utknc\",\"type\":\"scwsv\"},{\"properties\":{},\"id\":\"ogtwrupqsxvnmi\",\"name\":\"ykvceoveil\",\"type\":\"vnotyfjfcnj\"}]}") - .toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectedEnvironmentStoragesCollectionInner model = - new ConnectedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } -} 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 9cc21bac44eaa..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("vefloccsrmozihmi", "g", "wtxxpkyjcx", 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 f904722176c1d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"yxgvelfcld\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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( - "vru", - "nz", - new CheckNameAvailabilityRequest().withName("gehkfkimrtixokff").withType("inljqepqwhixmo"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("yxgvelfcld", 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 00147374ccd32..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("qhd", "nxaulk", "akdkifmjnnawtqab", 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 c9150412d0722..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"n\",\"value\":\"xpxiwfcngjs\"},{\"name\":\"sii\",\"value\":\"mkzjvkviir\"},{\"name\":\"fgrwsdpgratzvz\",\"value\":\"lbyvictctbrxkjzw\"},{\"name\":\"xff\",\"value\":\"hkwfbkgozxwop\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("xuckpggqoweyir", "hlisngw", "lqqmpiz", 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 4b1332e0a927f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("zcezelfwyfwl", "xjwet", 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 77fb12bfaa97d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("ao", "jrmzvupor", "zdfuydzvkfvxcnqm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListWithResponseMockTests.java deleted file mode 100644 index fb72723e28158..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsStoragesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"nfprnjletlxs\",\"name\":\"rpddouifamo\",\"type\":\"aziynknlqwzdv\"},{\"id\":\"hxqszdtmaajquh\",\"name\":\"xylrjvmtygjbmz\",\"type\":\"ospspshckf\"},{\"id\":\"pms\",\"name\":\"bpssdfp\",\"type\":\"yogtieyujtvczkcn\"},{\"id\":\"x\",\"name\":\"unjdx\",\"type\":\"glnkvxlxpagl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ConnectedEnvironmentStoragesCollection response = - manager - .connectedEnvironmentsStorages() - .listWithResponse("jztczytqj", "w", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java deleted file mode 100644 index 1f879658a4203..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"pabgyeps\",\"type\":\"CustomLocation\"},\"identity\":{\"principalId\":\"deac39aa-9334-4790-9a00-fe048007174c\",\"tenantId\":\"b656fa7f-7420-413a-96d5-b297ef5d799b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"managedBy\":\"ywpmueefjzwfqkq\",\"properties\":{\"provisioningState\":\"Succeeded\",\"managedEnvironmentId\":\"uyonobglaoc\",\"environmentId\":\"tcc\",\"workloadProfileName\":\"yudxytlmoy\",\"latestRevisionName\":\"vwfudwpzntxhd\",\"latestReadyRevisionName\":\"lrqjbhckfr\",\"latestRevisionFqdn\":\"rxsbkyvp\",\"customDomainVerificationId\":\"anuzbpzkafkuw\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"bmehh\"},\"location\":\"yvjusrtslhsp\",\"tags\":{\"elmqk\":\"emaofmxagkvt\",\"hcdhmdual\":\"hahvljuahaq\",\"vfadmws\":\"exq\",\"lf\":\"crgvxpvgom\"},\"id\":\"isgwbnbbeldawkz\",\"name\":\"ali\",\"type\":\"urqhaka\"},{\"extendedLocation\":{\"name\":\"shsfwxosowzxcu\",\"type\":\"CustomLocation\"},\"identity\":{\"principalId\":\"9ca3190e-abc0-4e85-8548-56f3a19fed28\",\"tenantId\":\"63bcc451-5ebd-45a1-8787-75bc7ba93963\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"managedBy\":\"ebwpucwwfvo\",\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"uecivyhz\",\"environmentId\":\"uojgj\",\"workloadProfileName\":\"jueiotwmcdytd\",\"latestRevisionName\":\"it\",\"latestReadyRevisionName\":\"rjaw\",\"latestRevisionFqdn\":\"wgxhn\",\"customDomainVerificationId\":\"kxfbkpycgklwndn\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"whvylw\"},\"location\":\"tdhxujznbmpowuwp\",\"tags\":{\"alupjm\":\"lve\",\"iplrbpbewtghfgb\":\"hfxobbcswsrtj\",\"wxzvlvqhjkb\":\"c\",\"iebwwaloayqcgwrt\":\"gibtnm\"},\"id\":\"j\",\"name\":\"zg\",\"type\":\"yzm\"},{\"extendedLocation\":{\"name\":\"ongmtsa\",\"type\":\"CustomLocation\"},\"identity\":{\"principalId\":\"6656014a-be86-4d71-ad48-13196d61eb24\",\"tenantId\":\"ffaaeb45-4006-4757-beee-682e025e56f7\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"managedBy\":\"srknftguv\",\"properties\":{\"provisioningState\":\"Deleting\",\"managedEnvironmentId\":\"rwmdyvxqtay\",\"environmentId\":\"ww\",\"workloadProfileName\":\"yqbexrmcqibycno\",\"latestRevisionName\":\"knme\",\"latestReadyRevisionName\":\"sgzvahapjyzhpv\",\"latestRevisionFqdn\":\"zcjrvxdjzlmwlx\",\"customDomainVerificationId\":\"ug\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"awjvzunluthnnp\"},\"location\":\"xipeilpjzuaejx\",\"tags\":{\"pwo\":\"tskzbbtdzumveek\",\"fpbsjyofdxl\":\"uh\",\"ttouwaboekqvkel\":\"us\"},\"id\":\"smv\",\"name\":\"xwyjsflhhc\",\"type\":\"aln\"},{\"extendedLocation\":{\"name\":\"isxyawjoyaqcslyj\",\"type\":\"CustomLocation\"},\"identity\":{\"principalId\":\"97813a8e-f400-4824-87f3-35b8b42025f2\",\"tenantId\":\"b6dca7a5-f52d-4d76-8a33-ab158f1d62ad\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"managedBy\":\"znelixhnrztfolh\",\"properties\":{\"provisioningState\":\"Succeeded\",\"managedEnvironmentId\":\"alaulppggdtpnapn\",\"environmentId\":\"ropuhpigv\",\"workloadProfileName\":\"ylgqgitxmedjvcsl\",\"latestRevisionName\":\"qwwncw\",\"latestReadyRevisionName\":\"hxg\",\"latestRevisionFqdn\":\"rmgucnap\",\"customDomainVerificationId\":\"eoellwptfdygp\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"ceopzfqrhhuaopp\"},\"location\":\"qeqxo\",\"tags\":{\"moizpos\":\"ahzxctobgbk\",\"rmfqjhhkxbpvj\":\"mgrcfbu\",\"xjyngudivk\":\"mjh\"},\"id\":\"tswb\",\"name\":\"qzvszjf\",\"type\":\"uvjfdxxive\"}],\"nextLink\":\"t\"}") - .toObject(ContainerAppCollection.class); - Assertions.assertEquals("yvjusrtslhsp", model.value().get(0).location()); - Assertions.assertEquals("emaofmxagkvt", model.value().get(0).tags().get("elmqk")); - Assertions.assertEquals("pabgyeps", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ywpmueefjzwfqkq", model.value().get(0).managedBy()); - Assertions.assertEquals("uyonobglaoc", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("tcc", model.value().get(0).environmentId()); - Assertions.assertEquals("yudxytlmoy", model.value().get(0).workloadProfileName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppCollection model = - new ContainerAppCollection() - .withValue( - Arrays - .asList( - new ContainerAppInner() - .withLocation("yvjusrtslhsp") - .withTags( - mapOf( - "elmqk", - "emaofmxagkvt", - "hcdhmdual", - "hahvljuahaq", - "vfadmws", - "exq", - "lf", - "crgvxpvgom")) - .withExtendedLocation( - new ExtendedLocation() - .withName("pabgyeps") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedBy("ywpmueefjzwfqkq") - .withManagedEnvironmentId("uyonobglaoc") - .withEnvironmentId("tcc") - .withWorkloadProfileName("yudxytlmoy"), - new ContainerAppInner() - .withLocation("tdhxujznbmpowuwp") - .withTags( - mapOf( - "alupjm", - "lve", - "iplrbpbewtghfgb", - "hfxobbcswsrtj", - "wxzvlvqhjkb", - "c", - "iebwwaloayqcgwrt", - "gibtnm")) - .withExtendedLocation( - new ExtendedLocation() - .withName("shsfwxosowzxcu") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withManagedBy("ebwpucwwfvo") - .withManagedEnvironmentId("uecivyhz") - .withEnvironmentId("uojgj") - .withWorkloadProfileName("jueiotwmcdytd"), - new ContainerAppInner() - .withLocation("xipeilpjzuaejx") - .withTags(mapOf("pwo", "tskzbbtdzumveek", "fpbsjyofdxl", "uh", "ttouwaboekqvkel", "us")) - .withExtendedLocation( - new ExtendedLocation() - .withName("ongmtsa") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedBy("srknftguv") - .withManagedEnvironmentId("rwmdyvxqtay") - .withEnvironmentId("ww") - .withWorkloadProfileName("yqbexrmcqibycno"), - new ContainerAppInner() - .withLocation("qeqxo") - .withTags( - mapOf("moizpos", "ahzxctobgbk", "rmfqjhhkxbpvj", "mgrcfbu", "xjyngudivk", "mjh")) - .withExtendedLocation( - new ExtendedLocation() - .withName("isxyawjoyaqcslyj") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withManagedBy("znelixhnrztfolh") - .withManagedEnvironmentId("alaulppggdtpnapn") - .withEnvironmentId("ropuhpigv") - .withWorkloadProfileName("ylgqgitxmedjvcsl"))); - model = BinaryData.fromObject(model).toObject(ContainerAppCollection.class); - Assertions.assertEquals("yvjusrtslhsp", model.value().get(0).location()); - Assertions.assertEquals("emaofmxagkvt", model.value().get(0).tags().get("elmqk")); - Assertions.assertEquals("pabgyeps", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ywpmueefjzwfqkq", model.value().get(0).managedBy()); - Assertions.assertEquals("uyonobglaoc", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("tcc", model.value().get(0).environmentId()); - Assertions.assertEquals("yudxytlmoy", model.value().get(0).workloadProfileName()); - } - - @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/ContainerAppJobExecutionsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java deleted file mode 100644 index 98842c878d133..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.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.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -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\":\"uo\",\"id\":\"inyflnorwmduvwp\",\"type\":\"vxwmygd\",\"status\":\"Failed\",\"startTime\":\"2021-01-04T00:18:57Z\",\"endTime\":\"2021-06-03T06:53:08Z\",\"template\":{\"containers\":[],\"initContainers\":[]}},{\"name\":\"pnnbjc\",\"id\":\"gibbdaxc\",\"type\":\"fozauorsuk\",\"status\":\"Failed\",\"startTime\":\"2021-09-20T10:27:45Z\",\"endTime\":\"2021-03-26T17:33:57Z\",\"template\":{\"containers\":[],\"initContainers\":[]}},{\"name\":\"uuepzlrphwzsoldw\",\"id\":\"uqdunvmnnrwrbi\",\"type\":\"ktalywjhhgdnhxms\",\"status\":\"Succeeded\",\"startTime\":\"2021-07-20T04:17:10Z\",\"endTime\":\"2021-04-28T21:19:50Z\",\"template\":{\"containers\":[],\"initContainers\":[]}}],\"nextLink\":\"dufiq\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("uo", model.value().get(0).name()); - Assertions.assertEquals("inyflnorwmduvwp", model.value().get(0).id()); - Assertions.assertEquals("vxwmygd", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T00:18:57Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-03T06:53:08Z"), 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("uo") - .withId("inyflnorwmduvwp") - .withType("vxwmygd") - .withStartTime(OffsetDateTime.parse("2021-01-04T00:18:57Z")) - .withEndTime(OffsetDateTime.parse("2021-06-03T06:53:08Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers(Arrays.asList()) - .withInitContainers(Arrays.asList())), - new JobExecutionInner() - .withName("pnnbjc") - .withId("gibbdaxc") - .withType("fozauorsuk") - .withStartTime(OffsetDateTime.parse("2021-09-20T10:27:45Z")) - .withEndTime(OffsetDateTime.parse("2021-03-26T17:33:57Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers(Arrays.asList()) - .withInitContainers(Arrays.asList())), - new JobExecutionInner() - .withName("uuepzlrphwzsoldw") - .withId("uqdunvmnnrwrbi") - .withType("ktalywjhhgdnhxms") - .withStartTime(OffsetDateTime.parse("2021-07-20T04:17:10Z")) - .withEndTime(OffsetDateTime.parse("2021-04-28T21:19:50Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers(Arrays.asList()) - .withInitContainers(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("uo", model.value().get(0).name()); - Assertions.assertEquals("inyflnorwmduvwp", model.value().get(0).id()); - Assertions.assertEquals("vxwmygd", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T00:18:57Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-03T06:53:08Z"), 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 31012207af69c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.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.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\":\"rjaltolmncw\",\"value\":\"obqwcsdbnwdcfh\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("rjaltolmncw", model.name()); - Assertions.assertEquals("obqwcsdbnwdcfh", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model = - new ContainerAppProbeHttpGetHttpHeadersItem().withName("rjaltolmncw").withValue("obqwcsdbnwdcfh"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("rjaltolmncw", model.name()); - Assertions.assertEquals("obqwcsdbnwdcfh", 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 47d319ccaeb09..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.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.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\":\"xrbuukzclew\",\"httpHeaders\":[{\"name\":\"lw\",\"value\":\"aztz\"},{\"name\":\"ofncckwyfzqwhxxb\",\"value\":\"yq\"}],\"path\":\"zfeqztppri\",\"port\":1872827948,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("xrbuukzclew", model.host()); - Assertions.assertEquals("lw", model.httpHeaders().get(0).name()); - Assertions.assertEquals("aztz", model.httpHeaders().get(0).value()); - Assertions.assertEquals("zfeqztppri", model.path()); - Assertions.assertEquals(1872827948, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model = - new ContainerAppProbeHttpGet() - .withHost("xrbuukzclew") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("lw").withValue("aztz"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ofncckwyfzqwhxxb").withValue("yq"))) - .withPath("zfeqztppri") - .withPort(1872827948) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("xrbuukzclew", model.host()); - Assertions.assertEquals("lw", model.httpHeaders().get(0).name()); - Assertions.assertEquals("aztz", model.httpHeaders().get(0).value()); - Assertions.assertEquals("zfeqztppri", model.path()); - Assertions.assertEquals(1872827948, 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 2364e8c64daac..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.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.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\":\"qdpfuvglsbjjca\",\"port\":615108235}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("qdpfuvglsbjjca", model.host()); - Assertions.assertEquals(615108235, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model = - new ContainerAppProbeTcpSocket().withHost("qdpfuvglsbjjca").withPort(615108235); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("qdpfuvglsbjjca", model.host()); - Assertions.assertEquals(615108235, 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 218388bdddaf9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.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.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\":1997229408,\"httpGet\":{\"host\":\"jlfltkacjvefkdlf\",\"httpHeaders\":[{\"name\":\"ggkfpagaowpul\",\"value\":\"qblylsyxkqj\"},{\"name\":\"sjervti\",\"value\":\"gxsds\"}],\"path\":\"e\",\"port\":1182322128,\"scheme\":\"HTTPS\"},\"initialDelaySeconds\":1594763587,\"periodSeconds\":71389459,\"successThreshold\":1389741266,\"tcpSocket\":{\"host\":\"pnqi\",\"port\":1460158080},\"terminationGracePeriodSeconds\":8477504172478535951,\"timeoutSeconds\":887231612,\"type\":\"Startup\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1997229408, model.failureThreshold()); - Assertions.assertEquals("jlfltkacjvefkdlf", model.httpGet().host()); - Assertions.assertEquals("ggkfpagaowpul", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qblylsyxkqj", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("e", model.httpGet().path()); - Assertions.assertEquals(1182322128, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(1594763587, model.initialDelaySeconds()); - Assertions.assertEquals(71389459, model.periodSeconds()); - Assertions.assertEquals(1389741266, model.successThreshold()); - Assertions.assertEquals("pnqi", model.tcpSocket().host()); - Assertions.assertEquals(1460158080, model.tcpSocket().port()); - Assertions.assertEquals(8477504172478535951L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(887231612, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = - new ContainerAppProbe() - .withFailureThreshold(1997229408) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("jlfltkacjvefkdlf") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("ggkfpagaowpul") - .withValue("qblylsyxkqj"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("sjervti") - .withValue("gxsds"))) - .withPath("e") - .withPort(1182322128) - .withScheme(Scheme.HTTPS)) - .withInitialDelaySeconds(1594763587) - .withPeriodSeconds(71389459) - .withSuccessThreshold(1389741266) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("pnqi").withPort(1460158080)) - .withTerminationGracePeriodSeconds(8477504172478535951L) - .withTimeoutSeconds(887231612) - .withType(Type.STARTUP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1997229408, model.failureThreshold()); - Assertions.assertEquals("jlfltkacjvefkdlf", model.httpGet().host()); - Assertions.assertEquals("ggkfpagaowpul", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qblylsyxkqj", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("e", model.httpGet().path()); - Assertions.assertEquals(1182322128, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(1594763587, model.initialDelaySeconds()); - Assertions.assertEquals(71389459, model.periodSeconds()); - Assertions.assertEquals(1389741266, model.successThreshold()); - Assertions.assertEquals("pnqi", model.tcpSocket().host()); - Assertions.assertEquals(1460158080, model.tcpSocket().port()); - Assertions.assertEquals(8477504172478535951L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(887231612, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index e08f6e145e877..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateWithResponseMockTests.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.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.nio.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"rrqwexjk\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"jwogqqnobpudc\",\"excludedPaths\":[]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"exaoguya\",\"name\":\"p\",\"type\":\"dsdaultxijjumf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AuthConfig response = - manager - .containerAppsAuthConfigs() - .define("tmzlbiojlv") - .withExistingContainerApp("sbostzel", "dlat") - .withPlatform(new AuthPlatform().withEnabled(true).withRuntimeVersion("neqvcwwyyurmo")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("prsnmokayzejn") - .withExcludedPaths(Arrays.asList())) - .withIdentityProviders(new IdentityProviders().withCustomOpenIdConnectProviders(mapOf())) - .withLogin( - new Login() - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList())) - .withHttpSettings(new HttpSettings().withRequireHttps(false)) - .create(); - - Assertions.assertEquals(false, response.platform().enabled()); - Assertions.assertEquals("rrqwexjk", response.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, response.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("jwogqqnobpudc", response.globalValidation().redirectToProvider()); - Assertions.assertEquals(false, response.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals(false, response.httpSettings().requireHttps()); - } - - @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/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java deleted file mode 100644 index a55cd823d7b3f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("zdix", "mqpnoda", "opqhewjptmc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetWithResponseMockTests.java deleted file mode 100644 index 7054c314e7c4b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"zlmcmuapcvhdb\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"xeyskonqzinkfkbg\",\"excludedPaths\":[]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"kbzefezrxcczurt\",\"name\":\"e\",\"type\":\"pqxbkwvzgnzvdf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AuthConfig response = - manager - .containerAppsAuthConfigs() - .getWithResponse("qqihedsvqwthmk", "ibcysihsgqc", "dhohsdtmcdzsuf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.platform().enabled()); - Assertions.assertEquals("zlmcmuapcvhdb", response.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, response.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("xeyskonqzinkfkbg", response.globalValidation().redirectToProvider()); - Assertions.assertEquals(true, response.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals(false, response.httpSettings().requireHttps()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java deleted file mode 100644 index 016ccb751433a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"xhcmavmqfoudo\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"yprotwyp\",\"excludedPaths\":[]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"mdtzfjltfvnzc\",\"name\":\"jtotpvopvpbd\",\"type\":\"zq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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.containerAppsAuthConfigs().listByContainerApp("bnn", "stgnl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(false, response.iterator().next().platform().enabled()); - Assertions.assertEquals("xhcmavmqfoudo", response.iterator().next().platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, - response.iterator().next().globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("yprotwyp", response.iterator().next().globalValidation().redirectToProvider()); - Assertions.assertEquals(false, response.iterator().next().login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals(false, response.iterator().next().httpSettings().requireHttps()); - } -} 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 9e719e59fac6e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("fqhppubowsep", "fgkmtdhern", 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 9d0c0f72100c4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"metadata\":{\"id\":\"rrleaesinuqt\",\"name\":\"qobbpihehcec\",\"description\":\"mrqbrjbbmpxdlv\",\"author\":\"frexcrseqw\",\"category\":\"s\",\"supportTopicList\":[],\"analysisTypes\":[],\"type\":\"gzhxog\",\"score\":17.946411},\"dataset\":[],\"status\":{\"message\":\"jkxibda\",\"statusId\":1760793907},\"dataProviderMetadata\":{\"providerName\":\"dyomkxfbv\",\"propertyBag\":[]}},\"id\":\"dy\",\"name\":\"rhpw\",\"type\":\"gddeimaw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("dwqslsrhmpqvw", "skondcbrwimu", "qejo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jkxibda", response.properties().status().message()); - Assertions.assertEquals(1760793907, response.properties().status().statusId()); - Assertions.assertEquals("dyomkxfbv", response.properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionWithResponseMockTests.java deleted file mode 100644 index a431c77495795..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsGetRevisionWithResponseMockTests { - @Test - public void testGetRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"createdTime\":\"2021-03-28T21:21:50Z\",\"lastActiveTime\":\"2021-02-04T02:41:34Z\",\"fqdn\":\"ae\",\"template\":{\"revisionSuffix\":\"gfbukklelss\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":true,\"replicas\":2024574994,\"trafficWeight\":967931451,\"provisioningError\":\"rlsmdesqplpvmjc\",\"healthState\":\"None\",\"provisioningState\":\"Deprovisioning\"},\"id\":\"dyvt\",\"name\":\"owx\",\"type\":\"gpiudeug\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Revision response = - manager - .containerAppsDiagnostics() - .getRevisionWithResponse("swankltytmh", "roznnhdrlktgj", "sggux", com.azure.core.util.Context.NONE) - .getValue(); - } -} 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 50cfe04546b37..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"hvthlaiwdcxsm\",\"name\":\"zhzdtxetlgydlhqv\",\"description\":\"npxybafiq\",\"author\":\"aarbgjekg\",\"category\":\"lbyulidwcwvmze\",\"supportTopicList\":[],\"analysisTypes\":[],\"type\":\"fhjirwgdnqzbrfk\",\"score\":60.33164},\"dataset\":[],\"status\":{\"message\":\"ksjcitdigs\",\"statusId\":915906581},\"dataProviderMetadata\":{\"providerName\":\"jplkeu\",\"propertyBag\":[]}},\"id\":\"tomflrytswfpf\",\"name\":\"dgycxnmskwhqjjy\",\"type\":\"lurlpshhkvp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("dwv", "phcnzqtpj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ksjcitdigs", response.iterator().next().properties().status().message()); - Assertions.assertEquals(915906581, response.iterator().next().properties().status().statusId()); - Assertions - .assertEquals("jplkeu", response.iterator().next().properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java deleted file mode 100644 index 39621b8c51fcc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-03-23T05:18:45Z\",\"lastActiveTime\":\"2021-11-13T01:29:14Z\",\"fqdn\":\"xwc\",\"template\":{\"revisionSuffix\":\"ikytwvczcswka\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":true,\"replicas\":1982138435,\"trafficWeight\":1835258535,\"provisioningError\":\"wrnfxtgdd\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"n\",\"name\":\"naoyank\",\"type\":\"oe\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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() - .listRevisions("o", "gkkumuikjcj", "aztb", 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 320a10edee218..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Replica; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests { - @Test - public void testGetReplicaWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"createdTime\":\"2021-06-14T18:40:43Z\",\"containers\":[]},\"id\":\"je\",\"name\":\"jklntikyj\",\"type\":\"zkdbqzolx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("z", "iblkujr", "lfojuidjp", "uyjucejikzo", com.azure.core.util.Context.NONE) - .getValue(); - } -} 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 50652169fb7be..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasListReplicasWithResponseMockTests { - @Test - public void testListReplicasWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"zzzwy\",\"name\":\"afitlhguynuchlg\",\"type\":\"ltxdwhmozu\"},{\"id\":\"vlnsnnjz\",\"name\":\"pafolp\",\"type\":\"mwamxqzragpgdph\"},{\"id\":\"ulajvlejchc\",\"name\":\"rlzk\",\"type\":\"mzlanru\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("zvhqjwtrhtgvg", "pcrrk", "lawjmjsmwrok", 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 8c3a344006316..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsActivateRevisionWithResponseMockTests { - @Test - public void testActivateRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("cjuhplrvkm", "cwmjvlg", "ggcvk", 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 b01d3e5ba3cf1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests { - @Test - public void testDeactivateRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("y", "izrzb", "psfxsf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionWithResponseMockTests.java deleted file mode 100644 index 5103b54e07fb6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsGetRevisionWithResponseMockTests { - @Test - public void testGetRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"createdTime\":\"2021-04-15T14:06:06Z\",\"lastActiveTime\":\"2021-03-12T11:11:22Z\",\"fqdn\":\"qotoihiqakydiwfb\",\"template\":{\"revisionSuffix\":\"pzdqtvhcspod\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":754247044,\"trafficWeight\":1379010451,\"provisioningError\":\"eb\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"oichdlpnfpubnt\",\"name\":\"batzviqsows\",\"type\":\"aelcat\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Revision response = - manager - .containerAppsRevisions() - .getRevisionWithResponse("rryejylmbkzudnig", "fihotj", "wlpxuzzjg", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java deleted file mode 100644 index b681ed8eb4461..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-03-23T11:42:29Z\",\"lastActiveTime\":\"2021-03-02T09:42:18Z\",\"fqdn\":\"yych\",\"template\":{\"revisionSuffix\":\"jlpjrtwszhv\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":true,\"replicas\":482080314,\"trafficWeight\":1209936502,\"provisioningError\":\"wrbfdpyflubh\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioning\"},\"id\":\"cuyzlwhhmemhoocl\",\"name\":\"tnpqmemczjk\",\"type\":\"mykyujxsglhs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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 - .containerAppsRevisions() - .listRevisions("eallklmtkhlo", "kxxpvbrd", "jmzsyzfh", 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 27c07a12b06dc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsRestartRevisionWithResponseMockTests { - @Test - public void testRestartRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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( - "ztlvtmvagbwidqlv", "ukoveofi", "rvjfnmjmvlw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java deleted file mode 100644 index 570e8a77eaf0d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"bbklqpxzuca\",\"branch\":\"ddwwnlzafwxudgnh\",\"githubActionConfiguration\":{\"contextPath\":\"talvnbwgp\",\"image\":\"meluclvdjj\",\"publishType\":\"yrdnqod\",\"os\":\"hhxhq\",\"runtimeStack\":\"qnvzoqgyipemch\",\"runtimeVersion\":\"v\"}},\"id\":\"zuejd\",\"name\":\"xptlghwzho\",\"type\":\"ewj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SourceControl response = - manager - .containerAppsSourceControls() - .define("ypsjoq") - .withExistingContainerApp("yglqdhmrjzral", "xpjb") - .withRepoUrl("yhfqzvsqxfxje") - .withBranch("cmpzqjhhhqx") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("acoyvivbsizusjs") - .withImage("bscm") - .withPublishType("zijiufehgmv") - .withOs("nwyvq") - .withRuntimeStack("rerlniy") - .withRuntimeVersion("lyfwxzutg")) - .create(); - - Assertions.assertEquals("bbklqpxzuca", response.repoUrl()); - Assertions.assertEquals("ddwwnlzafwxudgnh", response.branch()); - Assertions.assertEquals("talvnbwgp", response.githubActionConfiguration().contextPath()); - Assertions.assertEquals("meluclvdjj", response.githubActionConfiguration().image()); - Assertions.assertEquals("yrdnqod", response.githubActionConfiguration().publishType()); - Assertions.assertEquals("hhxhq", response.githubActionConfiguration().os()); - Assertions.assertEquals("qnvzoqgyipemch", response.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("v", response.githubActionConfiguration().runtimeVersion()); - } -} 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 1974296cc1754..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("ot", "jzcfyjzptwr", "ohapqinfsz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetWithResponseMockTests.java deleted file mode 100644 index da82b1b2f3b6f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"ggiycwkdtaawxwf\",\"branch\":\"aumrrqmbzmqkrat\",\"githubActionConfiguration\":{\"contextPath\":\"jsi\",\"image\":\"irkfpksokdgo\",\"publishType\":\"wijymr\",\"os\":\"guzozkyew\",\"runtimeStack\":\"nzhhhqos\",\"runtimeVersion\":\"fjkutycyarnroo\"}},\"id\":\"uabzoghkt\",\"name\":\"pyc\",\"type\":\"hcoeocnhzq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SourceControl response = - manager - .containerAppsSourceControls() - .getWithResponse("wbjijkgq", "nhmbkez", "jauj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ggiycwkdtaawxwf", response.repoUrl()); - Assertions.assertEquals("aumrrqmbzmqkrat", response.branch()); - Assertions.assertEquals("jsi", response.githubActionConfiguration().contextPath()); - Assertions.assertEquals("irkfpksokdgo", response.githubActionConfiguration().image()); - Assertions.assertEquals("wijymr", response.githubActionConfiguration().publishType()); - Assertions.assertEquals("guzozkyew", response.githubActionConfiguration().os()); - Assertions.assertEquals("nzhhhqos", response.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("fjkutycyarnroo", response.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java deleted file mode 100644 index 02bee82353e9a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"amrdixtrekidswys\",\"branch\":\"ruffgllukk\",\"githubActionConfiguration\":{\"contextPath\":\"hrpqhv\",\"image\":\"lcouqehbhbcdszir\",\"publishType\":\"an\",\"os\":\"ypmbltoormkfq\",\"runtimeStack\":\"xldykalsygaolnjp\",\"runtimeVersion\":\"bmjk\"}},\"id\":\"bjgsjjxxahmrn\",\"name\":\"dzyqe\",\"type\":\"xyivpinbm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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 - .containerAppsSourceControls() - .listByContainerApp("oldtvevboclzhz", "knyuxgvttxpn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("amrdixtrekidswys", response.iterator().next().repoUrl()); - Assertions.assertEquals("ruffgllukk", response.iterator().next().branch()); - Assertions.assertEquals("hrpqhv", response.iterator().next().githubActionConfiguration().contextPath()); - Assertions.assertEquals("lcouqehbhbcdszir", response.iterator().next().githubActionConfiguration().image()); - Assertions.assertEquals("an", response.iterator().next().githubActionConfiguration().publishType()); - Assertions.assertEquals("ypmbltoormkfq", response.iterator().next().githubActionConfiguration().os()); - Assertions - .assertEquals("xldykalsygaolnjp", response.iterator().next().githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("bmjk", response.iterator().next().githubActionConfiguration().runtimeVersion()); - } -} 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 f4a3fbc4780eb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.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.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\":80.3093826636541,\"memory\":\"jsjqbjhhyx\",\"ephemeralStorage\":\"wlycoduhpkxkg\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(80.3093826636541D, model.cpu()); - Assertions.assertEquals("jsjqbjhhyx", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(80.3093826636541D).withMemory("jsjqbjhhyx"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(80.3093826636541D, model.cpu()); - Assertions.assertEquals("jsjqbjhhyx", 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 4506f7b8a8454..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.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.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\":\"IdentityProviderDerived\",\"timeToExpiration\":\"oq\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("oq", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("oq"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("oq", 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 c17c7c55ff473..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.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.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\":\"fouyf\",\"bindingType\":\"Disabled\",\"certificateId\":\"cpwi\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("fouyf", model.name()); - Assertions.assertEquals(BindingType.DISABLED, model.bindingType()); - Assertions.assertEquals("cpwi", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = - new CustomDomain().withName("fouyf").withBindingType(BindingType.DISABLED).withCertificateId("cpwi"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("fouyf", model.name()); - Assertions.assertEquals(BindingType.DISABLED, model.bindingType()); - Assertions.assertEquals("cpwi", model.certificateId()); - } -} 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 d80d7e57c58fb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("maonurj", "umghihpvecmsl", "lbl", 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 88905d4bf651c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"drtc\",\"value\":\"kdqkkyihzt\"},{\"name\":\"qm\",\"value\":\"zgwldoychillcec\"},{\"name\":\"huwaoaguhic\",\"value\":\"lizst\"},{\"name\":\"sjvh\",\"value\":\"eftkwqe\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("jxl", "bsjuscvsfx", "gctmgxuupbezq", 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 396200b5e7abf..0000000000000 --- 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 b848af3ea0e5b..0000000000000 --- 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\":\"ghxpkdw\",\"value\":\"aiuebbaumnyqu\"}").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 443810696c1a7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.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.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\":\"sxnkjzkdeslpvlo\",\"value\":\"i\"}]}") - .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/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index bbc41ea99258b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.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.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\":false,\"appId\":\"pbtg\",\"appProtocol\":\"grpc\",\"appPort\":1911820344,\"httpReadBufferSize\":2105060368,\"httpMaxRequestSize\":1273171944,\"logLevel\":\"debug\",\"enableApiLogging\":false}") - .toObject(Dapr.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pbtg", model.appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.appProtocol()); - Assertions.assertEquals(1911820344, model.appPort()); - Assertions.assertEquals(2105060368, model.httpReadBufferSize()); - Assertions.assertEquals(1273171944, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = - new Dapr() - .withEnabled(false) - .withAppId("pbtg") - .withAppProtocol(AppProtocol.GRPC) - .withAppPort(1911820344) - .withHttpReadBufferSize(2105060368) - .withHttpMaxRequestSize(1273171944) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(false); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pbtg", model.appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.appProtocol()); - Assertions.assertEquals(1911820344, model.appPort()); - Assertions.assertEquals(2105060368, model.httpReadBufferSize()); - Assertions.assertEquals(1273171944, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, 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 676aea23a125a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.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.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\":[\"cdgea\"],\"identities\":[\"phut\",\"cndvkaozwyiftyhx\",\"urokft\"]},\"allowedApplications\":[\"lniwpwcukjfkgiaw\",\"klryplwck\",\"asy\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("cdgea", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("phut", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("lniwpwcukjfkgiaw", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model = - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("cdgea")) - .withIdentities(Arrays.asList("phut", "cndvkaozwyiftyhx", "urokft"))) - .withAllowedApplications(Arrays.asList("lniwpwcukjfkgiaw", "klryplwck", "asy")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("cdgea", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("phut", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("lniwpwcukjfkgiaw", model.allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java deleted file mode 100644 index c5a3a7be2ee20..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.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.DefaultErrorResponseError; - -public final class DefaultErrorResponseErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultErrorResponseError model = - BinaryData.fromString("{\"innererror\":\"stxgc\"}").toObject(DefaultErrorResponseError.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultErrorResponseError model = new DefaultErrorResponseError(); - model = BinaryData.fromObject(model).toObject(DefaultErrorResponseError.class); - } -} 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 409b9cb9e1a1a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.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.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\":\"ecuijpxtxs\",\"value\":\"prtujwsawdd\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("ecuijpxtxs", model.name()); - Assertions.assertEquals("prtujwsawdd", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model = - new DiagnosticDataProviderMetadataPropertyBagItem().withName("ecuijpxtxs").withValue("prtujwsawdd"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("ecuijpxtxs", model.name()); - Assertions.assertEquals("prtujwsawdd", 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 e7b0bc6b35141..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.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.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\":\"eammxqiekkkzddr\",\"propertyBag\":[{\"name\":\"ojbmxv\",\"value\":\"refdee\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("eammxqiekkkzddr", model.providerName()); - Assertions.assertEquals("ojbmxv", model.propertyBag().get(0).name()); - Assertions.assertEquals("refdee", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = - new DiagnosticDataProviderMetadata() - .withProviderName("eammxqiekkkzddr") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("ojbmxv") - .withValue("refdee"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("eammxqiekkkzddr", model.providerName()); - Assertions.assertEquals("ojbmxv", model.propertyBag().get(0).name()); - Assertions.assertEquals("refdee", 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 5fc10f457c7c8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.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.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\":\"na\",\"dataType\":\"ybbjjidjksyx\",\"columnType\":\"xvxevblbjednljla\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("na", model.columnName()); - Assertions.assertEquals("ybbjjidjksyx", model.dataType()); - Assertions.assertEquals("xvxevblbjednljla", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = - new DiagnosticDataTableResponseColumn() - .withColumnName("na") - .withDataType("ybbjjidjksyx") - .withColumnType("xvxevblbjednljla"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("na", model.columnName()); - Assertions.assertEquals("ybbjjidjksyx", model.dataType()); - Assertions.assertEquals("xvxevblbjednljla", 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 fb8bb02967719..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.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.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\":\"tqlkz\",\"columns\":[{\"columnName\":\"itgvkx\",\"dataType\":\"yqdrf\",\"columnType\":\"cealzxwh\"},{\"columnName\":\"nsymoyqhlwigd\",\"dataType\":\"bkbxgomfa\",\"columnType\":\"wasqvdaeyyg\"},{\"columnName\":\"akjsqz\",\"dataType\":\"bezkgimsidxasic\",\"columnType\":\"yvvjskgfmo\"}],\"rows\":[\"datahpqgatjeaahhvj\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("tqlkz", model.tableName()); - Assertions.assertEquals("itgvkx", model.columns().get(0).columnName()); - Assertions.assertEquals("yqdrf", model.columns().get(0).dataType()); - Assertions.assertEquals("cealzxwh", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = - new DiagnosticDataTableResponseObject() - .withTableName("tqlkz") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("itgvkx") - .withDataType("yqdrf") - .withColumnType("cealzxwh"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nsymoyqhlwigd") - .withDataType("bkbxgomfa") - .withColumnType("wasqvdaeyyg"), - new DiagnosticDataTableResponseColumn() - .withColumnName("akjsqz") - .withDataType("bezkgimsidxasic") - .withColumnType("yvvjskgfmo"))) - .withRows(Arrays.asList("datahpqgatjeaahhvj")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("tqlkz", model.tableName()); - Assertions.assertEquals("itgvkx", model.columns().get(0).columnName()); - Assertions.assertEquals("yqdrf", model.columns().get(0).dataType()); - Assertions.assertEquals("cealzxwh", 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 9f6ee3a65ab3a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.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.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\":183271176,\"title\":\"ulxunsmjbnkpp\",\"description\":\"nenlsvxeizzg\",\"isVisible\":false}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(183271176, model.type()); - Assertions.assertEquals("ulxunsmjbnkpp", model.title()); - Assertions.assertEquals("nenlsvxeizzg", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = - new DiagnosticRendering() - .withType(183271176) - .withTitle("ulxunsmjbnkpp") - .withDescription("nenlsvxeizzg") - .withIsVisible(false); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(183271176, model.type()); - Assertions.assertEquals("ulxunsmjbnkpp", model.title()); - Assertions.assertEquals("nenlsvxeizzg", model.description()); - Assertions.assertEquals(false, 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 c4428bf341f4d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.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.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = - BinaryData - .fromString("{\"id\":\"neqsxvmh\",\"pesId\":\"uzjyihsasbhudypo\"}") - .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 f7c49ca54f09a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.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.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import java.util.Arrays; - -public final class DiagnosticsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"dataset\":[]},\"id\":\"bylyrfgia\",\"name\":\"tcojocqwo\",\"type\":\"fnzjvusfzldm\"}],\"nextLink\":\"uxylfsbtkadpy\"}") - .toObject(DiagnosticsCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsCollectionInner model = - new DiagnosticsCollectionInner() - .withValue( - Arrays - .asList( - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties().withDataset(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - } -} 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 6fbf31ab4b546..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.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.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\":\"emslynsqyrp\",\"columns\":[{\"columnName\":\"rlttymsjnygqdnfw\",\"dataType\":\"dzgtil\",\"columnType\":\"hnfhqlyvijouwi\"},{\"columnName\":\"xoyzunbix\",\"dataType\":\"ti\",\"columnType\":\"cpwpg\"}],\"rows\":[\"datacivtsoxfrkenxp\"]},\"renderingProperties\":{\"type\":891711284,\"title\":\"rpmpdnqqskaw\",\"description\":\"qvmmbn\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("emslynsqyrp", model.table().tableName()); - Assertions.assertEquals("rlttymsjnygqdnfw", model.table().columns().get(0).columnName()); - Assertions.assertEquals("dzgtil", model.table().columns().get(0).dataType()); - Assertions.assertEquals("hnfhqlyvijouwi", model.table().columns().get(0).columnType()); - Assertions.assertEquals(891711284, model.renderingProperties().type()); - Assertions.assertEquals("rpmpdnqqskaw", model.renderingProperties().title()); - Assertions.assertEquals("qvmmbn", 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("emslynsqyrp") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("rlttymsjnygqdnfw") - .withDataType("dzgtil") - .withColumnType("hnfhqlyvijouwi"), - new DiagnosticDataTableResponseColumn() - .withColumnName("xoyzunbix") - .withDataType("ti") - .withColumnType("cpwpg"))) - .withRows(Arrays.asList("datacivtsoxfrkenxp"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(891711284) - .withTitle("rpmpdnqqskaw") - .withDescription("qvmmbn") - .withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("emslynsqyrp", model.table().tableName()); - Assertions.assertEquals("rlttymsjnygqdnfw", model.table().columns().get(0).columnName()); - Assertions.assertEquals("dzgtil", model.table().columns().get(0).dataType()); - Assertions.assertEquals("hnfhqlyvijouwi", model.table().columns().get(0).columnType()); - Assertions.assertEquals(891711284, model.renderingProperties().type()); - Assertions.assertEquals("rpmpdnqqskaw", model.renderingProperties().title()); - Assertions.assertEquals("qvmmbn", 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 d45e3c831c46b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.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.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\":\"rxgkne\",\"name\":\"yinzqodfvpgs\",\"description\":\"xgsg\",\"author\":\"fgzdjtxvz\",\"category\":\"bqvgaqv\",\"supportTopicList\":[{\"id\":\"cqusr\",\"pesId\":\"etnwsdtutnw\"}],\"analysisTypes\":[\"ycvuzhyrmewipmv\",\"k\",\"xukuqgsj\",\"xundxgk\"],\"type\":\"wzhhzjhfjmhvvmuv\",\"score\":15.738064}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("ycvuzhyrmewipmv", 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("ycvuzhyrmewipmv", "k", "xukuqgsj", "xundxgk")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("ycvuzhyrmewipmv", 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 1f5c687832313..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.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.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -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\":\"btgkbugrjqctoj\",\"name\":\"isofieypefojyqd\",\"description\":\"u\",\"author\":\"cp\",\"category\":\"wkhihihlhzdsqt\",\"supportTopicList\":[],\"analysisTypes\":[\"nowc\",\"hfgmvecactxm\",\"oteyowc\",\"uqovekqvgqouwif\"],\"type\":\"pjwyiv\",\"score\":50.420834},\"dataset\":[{},{}],\"status\":{\"message\":\"phuagrttikteusq\",\"statusId\":1626546819},\"dataProviderMetadata\":{\"providerName\":\"klxubyja\",\"propertyBag\":[]}},\"id\":\"fblcq\",\"name\":\"u\",\"type\":\"bgq\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("nowc", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("phuagrttikteusq", model.properties().status().message()); - Assertions.assertEquals(1626546819, model.properties().status().statusId()); - Assertions.assertEquals("klxubyja", model.properties().dataProviderMetadata().providerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsInner model = - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList()) - .withAnalysisTypes(Arrays.asList("nowc", "hfgmvecactxm", "oteyowc", "uqovekqvgqouwif"))) - .withDataset(Arrays.asList(new DiagnosticsDataApiResponse(), new DiagnosticsDataApiResponse())) - .withStatus(new DiagnosticsStatus().withMessage("phuagrttikteusq").withStatusId(1626546819)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("klxubyja") - .withPropertyBag(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("nowc", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("phuagrttikteusq", model.properties().status().message()); - Assertions.assertEquals(1626546819, model.properties().status().statusId()); - Assertions.assertEquals("klxubyja", model.properties().dataProviderMetadata().providerName()); - } -} 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 383569006d555..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.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\":\"talmett\",\"name\":\"gdslqxihhrmoo\",\"description\":\"qseypxiutcxa\",\"author\":\"hyrpetogebjoxs\",\"category\":\"vnh\",\"supportTopicList\":[{\"id\":\"q\",\"pesId\":\"kzjcjbtrgae\"},{\"id\":\"vibr\",\"pesId\":\"jsto\"},{\"id\":\"eitpkxztmo\",\"pesId\":\"klf\"}],\"analysisTypes\":[\"gfcwqmpimaqxzhem\",\"yhohujswtwkozzwc\"],\"type\":\"kb\",\"score\":85.47861},\"dataset\":[{\"table\":{\"tableName\":\"jwltlwtjjgu\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":663696450,\"title\":\"vkcdmxzr\",\"description\":\"aimlnwiaaom\",\"isVisible\":false}},{\"table\":{\"tableName\":\"z\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":1226042956,\"title\":\"wwnpj\",\"description\":\"fz\",\"isVisible\":false}},{\"table\":{\"tableName\":\"wahfbousnfepgfew\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":1791330628,\"title\":\"ncxykxhdjhlimm\",\"description\":\"x\",\"isVisible\":true}}],\"status\":{\"message\":\"orxvxcjzhqiz\",\"statusId\":444626662},\"dataProviderMetadata\":{\"providerName\":\"gqscj\",\"propertyBag\":[{\"name\":\"juhdqazkmtgguwpi\",\"value\":\"ajc\"},{\"name\":\"m\",\"value\":\"hfcf\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("gfcwqmpimaqxzhem", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("jwltlwtjjgu", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(663696450, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("vkcdmxzr", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("aimlnwiaaom", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("orxvxcjzhqiz", model.status().message()); - Assertions.assertEquals(444626662, model.status().statusId()); - Assertions.assertEquals("gqscj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("juhdqazkmtgguwpi", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ajc", 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("gfcwqmpimaqxzhem", "yhohujswtwkozzwc"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("jwltlwtjjgu") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(663696450) - .withTitle("vkcdmxzr") - .withDescription("aimlnwiaaom") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("z") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1226042956) - .withTitle("wwnpj") - .withDescription("fz") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("wahfbousnfepgfew") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1791330628) - .withTitle("ncxykxhdjhlimm") - .withDescription("x") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("orxvxcjzhqiz").withStatusId(444626662)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("gqscj") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("juhdqazkmtgguwpi") - .withValue("ajc"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("m") - .withValue("hfcf")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("gfcwqmpimaqxzhem", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("jwltlwtjjgu", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(663696450, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("vkcdmxzr", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("aimlnwiaaom", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("orxvxcjzhqiz", model.status().message()); - Assertions.assertEquals(444626662, model.status().statusId()); - Assertions.assertEquals("gqscj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("juhdqazkmtgguwpi", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ajc", 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 499b5b28233dc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.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.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\":\"srmffeycxcktpiym\",\"statusId\":1764465622}") - .toObject(DiagnosticsStatus.class); - Assertions.assertEquals("srmffeycxcktpiym", model.message()); - Assertions.assertEquals(1764465622, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("srmffeycxcktpiym").withStatusId(1764465622); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("srmffeycxcktpiym", model.message()); - Assertions.assertEquals(1764465622, model.statusId()); - } -} 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 af1e855911c3c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.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.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\":\"zf\",\"type\":\"CustomLocation\"}").toObject(ExtendedLocation.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("zf").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("zf", 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 aa6eac1df7952..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.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.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\":\"NoProxy\",\"customHostHeaderName\":\"bdxkqpxokaj\",\"customProtoHeaderName\":\"npime\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.convention()); - Assertions.assertEquals("bdxkqpxokaj", model.customHostHeaderName()); - Assertions.assertEquals("npime", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("bdxkqpxokaj") - .withCustomProtoHeaderName("npime"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.convention()); - Assertions.assertEquals("bdxkqpxokaj", model.customHostHeaderName()); - Assertions.assertEquals("npime", model.customProtoHeaderName()); - } -} 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 b2936f7beaabb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.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.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\":\"AllowAnonymous\",\"redirectToProvider\":\"qnjaqwix\",\"excludedPaths\":[\"r\",\"zvcputegjvwmfda\",\"scmdvpjhulsuu\",\"mkjozkrwf\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model = - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS) - .withRedirectToProvider("qnjaqwix") - .withExcludedPaths(Arrays.asList("r", "zvcputegjvwmfda", "scmdvpjhulsuu", "mkjozkrwf")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } -} 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 43a0410eb8b69..0000000000000 --- 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\":\"ummajtjaod\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ummajtjaod", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("ummajtjaod"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ummajtjaod", 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 d77d87430fdde..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.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.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\":false,\"routes\":{\"apiPrefix\":\"yulpkudjkr\"},\"forwardProxy\":{\"convention\":\"Custom\",\"customHostHeaderName\":\"hfepgzgqex\",\"customProtoHeaderName\":\"ocxscpaierhhbcs\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("yulpkudjkr", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.forwardProxy().convention()); - Assertions.assertEquals("hfepgzgqex", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("ocxscpaierhhbcs", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model = - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("yulpkudjkr")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("hfepgzgqex") - .withCustomProtoHeaderName("ocxscpaierhhbcs")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("yulpkudjkr", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.forwardProxy().convention()); - Assertions.assertEquals("hfepgzgqex", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("ocxscpaierhhbcs", model.forwardProxy().customProtoHeaderName()); - } -} 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 7bd342097aa1a..0000000000000 --- 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\":\"sticky\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.STICKY, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.STICKY); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.STICKY, 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 96976a1344022..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.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.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\":\"zvqtmnubexkp\",\"description\":\"smond\",\"ipAddressRange\":\"mquxvypo\",\"action\":\"Deny\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("zvqtmnubexkp", model.name()); - Assertions.assertEquals("smond", model.description()); - Assertions.assertEquals("mquxvypo", model.ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = - new IpSecurityRestrictionRule() - .withName("zvqtmnubexkp") - .withDescription("smond") - .withIpAddressRange("mquxvypo") - .withAction(Action.DENY); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("zvqtmnubexkp", model.name()); - Assertions.assertEquals("smond", model.description()); - Assertions.assertEquals("mquxvypo", model.ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.action()); - } -} 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 56aae49c5d952..0000000000000 --- 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\":342609300,\"parallelism\":423959041}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(342609300, model.replicaCompletionCount()); - Assertions.assertEquals(423959041, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model = - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(342609300).withParallelism(423959041); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(342609300, model.replicaCompletionCount()); - Assertions.assertEquals(423959041, 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 06ba354b6e385..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.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.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\":104545862,\"cronExpression\":\"ayvblmhvkzuhbx\",\"parallelism\":1338429110}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(104545862, model.replicaCompletionCount()); - Assertions.assertEquals("ayvblmhvkzuhbx", model.cronExpression()); - Assertions.assertEquals(1338429110, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = - new JobConfigurationScheduleTriggerConfig() - .withReplicaCompletionCount(104545862) - .withCronExpression("ayvblmhvkzuhbx") - .withParallelism(1338429110); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(104545862, model.replicaCompletionCount()); - Assertions.assertEquals("ayvblmhvkzuhbx", model.cronExpression()); - Assertions.assertEquals(1338429110, 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 10de307e462cd..0000000000000 --- 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\":\"rjfut\",\"id\":\"oe\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("rjfut", model.name()); - Assertions.assertEquals("oe", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("rjfut").withId("oe"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("rjfut", model.name()); - Assertions.assertEquals("oe", 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 6516abd1a9a84..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -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\":\"ieuzaofjchvcyyy\",\"id\":\"gdotcubiipuipwo\",\"type\":\"nmacj\",\"status\":\"Failed\",\"startTime\":\"2021-11-17T10:08:40Z\",\"endTime\":\"2021-10-27T20:39:18Z\",\"template\":{\"containers\":[{\"image\":\"m\",\"name\":\"vfgmblrrilby\",\"command\":[],\"args\":[],\"env\":[]},{\"image\":\"ccwr\",\"name\":\"scjfnyns\",\"command\":[],\"args\":[],\"env\":[]}],\"initContainers\":[{\"image\":\"oqytibyowbblgy\",\"name\":\"utp\",\"command\":[],\"args\":[],\"env\":[]},{\"image\":\"ismsksbpimlqolj\",\"name\":\"cgxxlxs\",\"command\":[],\"args\":[],\"env\":[]}]}}") - .toObject(JobExecutionInner.class); - Assertions.assertEquals("ieuzaofjchvcyyy", model.name()); - Assertions.assertEquals("gdotcubiipuipwo", model.id()); - Assertions.assertEquals("nmacj", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T10:08:40Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T20:39:18Z"), model.endTime()); - Assertions.assertEquals("m", model.template().containers().get(0).image()); - Assertions.assertEquals("vfgmblrrilby", model.template().containers().get(0).name()); - Assertions.assertEquals("oqytibyowbblgy", model.template().initContainers().get(0).image()); - Assertions.assertEquals("utp", model.template().initContainers().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionInner model = - new JobExecutionInner() - .withName("ieuzaofjchvcyyy") - .withId("gdotcubiipuipwo") - .withType("nmacj") - .withStartTime(OffsetDateTime.parse("2021-11-17T10:08:40Z")) - .withEndTime(OffsetDateTime.parse("2021-10-27T20:39:18Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("m") - .withName("vfgmblrrilby") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()), - new JobExecutionContainer() - .withImage("ccwr") - .withName("scjfnyns") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("oqytibyowbblgy") - .withName("utp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()), - new JobExecutionContainer() - .withImage("ismsksbpimlqolj") - .withName("cgxxlxs") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(JobExecutionInner.class); - Assertions.assertEquals("ieuzaofjchvcyyy", model.name()); - Assertions.assertEquals("gdotcubiipuipwo", model.id()); - Assertions.assertEquals("nmacj", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T10:08:40Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T20:39:18Z"), model.endTime()); - Assertions.assertEquals("m", model.template().containers().get(0).image()); - Assertions.assertEquals("vfgmblrrilby", model.template().containers().get(0).name()); - Assertions.assertEquals("oqytibyowbblgy", model.template().initContainers().get(0).image()); - Assertions.assertEquals("utp", model.template().initContainers().get(0).name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionNamesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionNamesCollectionTests.java deleted file mode 100644 index f0e5a66eec701..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionNamesCollectionTests.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.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionNamesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionNamesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"ewzcjznmwcp\",\"id\":\"uaadraufactkahzo\"},{\"name\":\"jjziuxxpsh\",\"id\":\"e\"},{\"name\":\"lfg\",\"id\":\"qubkw\"},{\"name\":\"enr\",\"id\":\"utujba\"}]}") - .toObject(JobExecutionNamesCollection.class); - Assertions.assertEquals("ewzcjznmwcp", model.value().get(0).name()); - Assertions.assertEquals("uaadraufactkahzo", model.value().get(0).id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionNamesCollection model = - new JobExecutionNamesCollection() - .withValue( - Arrays - .asList( - new JobExecutionBaseInner().withName("ewzcjznmwcp").withId("uaadraufactkahzo"), - new JobExecutionBaseInner().withName("jjziuxxpsh").withId("e"), - new JobExecutionBaseInner().withName("lfg").withId("qubkw"), - new JobExecutionBaseInner().withName("enr").withId("utujba"))); - model = BinaryData.fromObject(model).toObject(JobExecutionNamesCollection.class); - Assertions.assertEquals("ewzcjznmwcp", model.value().get(0).name()); - Assertions.assertEquals("uaadraufactkahzo", model.value().get(0).id()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionTemplateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionTemplateTests.java deleted file mode 100644 index c39e0992add7d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionTemplateTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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 com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionTemplateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionTemplate model = - BinaryData - .fromString( - "{\"containers\":[{\"image\":\"auutpwoqhihe\",\"name\":\"g\",\"command\":[\"nfqn\",\"cypsxjv\",\"oimwkslirc\"],\"args\":[\"xvydfceacvlhvygd\"],\"env\":[],\"resources\":{\"cpu\":64.9648919138758,\"memory\":\"nawjslbiwkojgcy\",\"ephemeralStorage\":\"sfmznbaeqphc\"}},{\"image\":\"nrnrp\",\"name\":\"huwrykqgaifm\",\"command\":[\"lb\",\"dvk\"],\"args\":[\"jdz\"],\"env\":[],\"resources\":{\"cpu\":47.61854442423811,\"memory\":\"njivolvtnovq\",\"ephemeralStorage\":\"gemjdftuljltdu\"}}],\"initContainers\":[{\"image\":\"tmczuomejwcwwqi\",\"name\":\"nssxmojmsvpk\",\"command\":[\"vk\",\"cfzq\"],\"args\":[\"x\",\"tczheydbsdshmkx\"],\"env\":[],\"resources\":{\"cpu\":47.19244293398387,\"memory\":\"uripltfnhtba\",\"ephemeralStorage\":\"gx\"}},{\"image\":\"rc\",\"name\":\"yklyhpluodpvruud\",\"command\":[\"ibthostgktstvd\"],\"args\":[\"lzedqbcvhzlhplo\",\"qkdlw\",\"qfbumlkxtrqjf\"],\"env\":[],\"resources\":{\"cpu\":43.959664818997865,\"memory\":\"w\",\"ephemeralStorage\":\"wsrt\"}}]}") - .toObject(JobExecutionTemplate.class); - Assertions.assertEquals("auutpwoqhihe", model.containers().get(0).image()); - Assertions.assertEquals("g", model.containers().get(0).name()); - Assertions.assertEquals("nfqn", model.containers().get(0).command().get(0)); - Assertions.assertEquals("xvydfceacvlhvygd", model.containers().get(0).args().get(0)); - Assertions.assertEquals(64.9648919138758D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("nawjslbiwkojgcy", model.containers().get(0).resources().memory()); - Assertions.assertEquals("tmczuomejwcwwqi", model.initContainers().get(0).image()); - Assertions.assertEquals("nssxmojmsvpk", model.initContainers().get(0).name()); - Assertions.assertEquals("vk", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("x", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(47.19244293398387D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("uripltfnhtba", model.initContainers().get(0).resources().memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionTemplate model = - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("auutpwoqhihe") - .withName("g") - .withCommand(Arrays.asList("nfqn", "cypsxjv", "oimwkslirc")) - .withArgs(Arrays.asList("xvydfceacvlhvygd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(64.9648919138758D).withMemory("nawjslbiwkojgcy")), - new JobExecutionContainer() - .withImage("nrnrp") - .withName("huwrykqgaifm") - .withCommand(Arrays.asList("lb", "dvk")) - .withArgs(Arrays.asList("jdz")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(47.61854442423811D).withMemory("njivolvtnovq")))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("tmczuomejwcwwqi") - .withName("nssxmojmsvpk") - .withCommand(Arrays.asList("vk", "cfzq")) - .withArgs(Arrays.asList("x", "tczheydbsdshmkx")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(47.19244293398387D).withMemory("uripltfnhtba")), - new JobExecutionContainer() - .withImage("rc") - .withName("yklyhpluodpvruud") - .withCommand(Arrays.asList("ibthostgktstvd")) - .withArgs(Arrays.asList("lzedqbcvhzlhplo", "qkdlw", "qfbumlkxtrqjf")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(43.959664818997865D).withMemory("w")))); - model = BinaryData.fromObject(model).toObject(JobExecutionTemplate.class); - Assertions.assertEquals("auutpwoqhihe", model.containers().get(0).image()); - Assertions.assertEquals("g", model.containers().get(0).name()); - Assertions.assertEquals("nfqn", model.containers().get(0).command().get(0)); - Assertions.assertEquals("xvydfceacvlhvygd", model.containers().get(0).args().get(0)); - Assertions.assertEquals(64.9648919138758D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("nawjslbiwkojgcy", model.containers().get(0).resources().memory()); - Assertions.assertEquals("tmczuomejwcwwqi", model.initContainers().get(0).image()); - Assertions.assertEquals("nssxmojmsvpk", model.initContainers().get(0).name()); - Assertions.assertEquals("vk", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("x", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(47.19244293398387D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("uripltfnhtba", model.initContainers().get(0).resources().memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsCollectionTests.java deleted file mode 100644 index 20535ffeac408..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsCollectionTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.JobInner; -import com.azure.resourcemanager.appcontainers.models.JobsCollection; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobsCollection model = - BinaryData - .fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"7fdb9895-f7d3-44c8-a956-f6192adce361\",\"tenantId\":\"780f2a97-d89a-4b0e-a9a8-4391bb8dc335\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"xltjcvnhltiu\",\"workloadProfileName\":\"xnavvwxq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"nyowxwlmdjrkvfg\"},\"location\":\"fvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"id\":\"vncjabudurgk\",\"name\":\"kmokz\",\"type\":\"jjklff\"},{\"identity\":{\"principalId\":\"0ebc5a53-e4fd-48c1-88c2-b67adfb9c8cc\",\"tenantId\":\"15217d58-64e4-4461-b41c-6be1793b87d0\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"environmentId\":\"fzeeyebizik\",\"workloadProfileName\":\"uhqlbjbsybbqwrvt\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"pgvmpipaslthaqfx\"},\"location\":\"mwutwbdsre\",\"tags\":{\"d\":\"rhneuyowq\",\"gpikpzimejza\":\"ytisibir\",\"rjqc\":\"lfzxiavrmbzonoki\"},\"id\":\"rgz\",\"name\":\"frl\",\"type\":\"zszrnwoiindfpw\"},{\"identity\":{\"principalId\":\"e9d679f5-2216-498a-bafe-adee2bde0adc\",\"tenantId\":\"8508ac9b-7ec3-48c3-bfd2-8b16e127e3ef\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"lsj\",\"workloadProfileName\":\"hszfjvfb\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"jagrqmqhldvr\"},\"location\":\"iojnalghfkvtv\",\"tags\":{\"rhmzkwpj\":\"sowueluqhhahhx\",\"ughftqsx\":\"wws\"},\"id\":\"qxujxukndxd\",\"name\":\"grjguufzd\",\"type\":\"syqtfi\"},{\"identity\":{\"principalId\":\"8a65a473-6275-43c0-b499-83e3744ef7ec\",\"tenantId\":\"d3fe6990-26c2-4a73-a6e9-e90a4f9e89a1\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"amvpphoszqzudph\",\"workloadProfileName\":\"mvdk\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"cvtbv\"},\"location\":\"yhmtnvyqiat\",\"tags\":{\"zcjaesgvvsccy\":\"pcnp\"},\"id\":\"jguq\",\"name\":\"hwyg\",\"type\":\"lvdnkfx\"}],\"nextLink\":\"emdwzrmuhapfc\"}") - .toObject(JobsCollection.class); - Assertions.assertEquals("fvpdbo", model.value().get(0).location()); - Assertions.assertEquals("izsjqlhkrr", model.value().get(0).tags().get("bdeibqipqk")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("xltjcvnhltiu", model.value().get(0).environmentId()); - Assertions.assertEquals("xnavvwxq", model.value().get(0).workloadProfileName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobsCollection model = - new JobsCollection() - .withValue( - Arrays - .asList( - new JobInner() - .withLocation("fvpdbo") - .withTags( - mapOf( - "bdeibqipqk", - "izsjqlhkrr", - "rwkq", - "hvxndzwmkrefajpj", - "sjabibs", - "yhgbijtjivfx", - "bjxbkzbzk", - "stawfsdjpvkv")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withEnvironmentId("xltjcvnhltiu") - .withWorkloadProfileName("xnavvwxq"), - new JobInner() - .withLocation("mwutwbdsre") - .withTags( - mapOf("d", "rhneuyowq", "gpikpzimejza", "ytisibir", "rjqc", "lfzxiavrmbzonoki")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withEnvironmentId("fzeeyebizik") - .withWorkloadProfileName("uhqlbjbsybbqwrvt"), - new JobInner() - .withLocation("iojnalghfkvtv") - .withTags(mapOf("rhmzkwpj", "sowueluqhhahhx", "ughftqsx", "wws")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withEnvironmentId("lsj") - .withWorkloadProfileName("hszfjvfb"), - new JobInner() - .withLocation("yhmtnvyqiat") - .withTags(mapOf("zcjaesgvvsccy", "pcnp")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withEnvironmentId("amvpphoszqzudph") - .withWorkloadProfileName("mvdk"))); - model = BinaryData.fromObject(model).toObject(JobsCollection.class); - Assertions.assertEquals("fvpdbo", model.value().get(0).location()); - Assertions.assertEquals("izsjqlhkrr", model.value().get(0).tags().get("bdeibqipqk")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("xltjcvnhltiu", model.value().get(0).environmentId()); - Assertions.assertEquals("xnavvwxq", model.value().get(0).workloadProfileName()); - } - - @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/JobsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java deleted file mode 100644 index 363233762c7db..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("fxof", "cjkgdirazftxej", 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 fcb40ff14d395..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsExecutionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"cjimryvwgcwwpbmz\",\"id\":\"esyds\",\"type\":\"efoh\",\"status\":\"Degraded\",\"startTime\":\"2021-09-26T17:40:29Z\",\"endTime\":\"2021-01-07T15:19:45Z\",\"template\":{\"containers\":[],\"initContainers\":[]}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("nqpvwgfstmhqykiz", "d", "saoafcluqvox", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cjimryvwgcwwpbmz", response.iterator().next().name()); - Assertions.assertEquals("esyds", response.iterator().next().id()); - Assertions.assertEquals("efoh", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-26T17:40:29Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-07T15:19:45Z"), response.iterator().next().endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStartMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStartMockTests.java deleted file mode 100644 index 148ef8205b6b0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStartMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import java.nio.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStartMockTests { - @Test - public void testStart() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"name\":\"lhuytxzvtznap\",\"id\":\"annovvoxczytpr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobExecutionBase response = - manager - .jobs() - .start( - "ab", - "dujtmvcope", - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("urbuhhlkyqltq") - .withName("ogtu") - .withCommand(Arrays.asList("fdjktsysidfvclgl", "n", "uijtkbu", "qogsfikayian")) - .withArgs(Arrays.asList("rujtjiqxfzyjq", "tvwkpqhjpenu")) - .withEnv(Arrays.asList()))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("ekewvnqvcdlguauc") - .withName("djwnlaxpunjqi") - .withCommand(Arrays.asList("vvi", "acgxmfcsse", "x", "tvsoxhlwntsj")) - .withArgs(Arrays.asList("sxypruuu", "bnchrsziz", "yuel")) - .withEnv(Arrays.asList()), - new JobExecutionContainer() - .withImage("nb") - .withName("yggagflnlgmt") - .withCommand(Arrays.asList("hzjmucftbyrp", "rohkpigqfusu", "kzmkwklsnoxaxmqe")) - .withArgs(Arrays.asList("h", "jnhgwydyyn")) - .withEnv(Arrays.asList()), - new JobExecutionContainer() - .withImage("gbv") - .withName("anarfdlpukhpyrne") - .withCommand(Arrays.asList("cpeogkhnmgbrou", "ddbhf", "pfpazjzoywjxhpdu")) - .withArgs(Arrays.asList("tacnpqwtehtuev", "hrljy")) - .withEnv(Arrays.asList()), - new JobExecutionContainer() - .withImage("hnsduugwbsreur") - .withName("kfuarenlv") - .withCommand( - Arrays - .asList( - "klnvnafvvkyfede", "jboslcqxypok", "hminqcymczngnbdx", "ewuninvud")) - .withArgs(Arrays.asList("aqdtvqecrqctmxxd")) - .withEnv(Arrays.asList()))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lhuytxzvtznap", response.name()); - Assertions.assertEquals("annovvoxczytpr", response.id()); - } -} 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 747ef52c9171a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStopExecutionMockTests { - @Test - public void testStopExecution() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("nwvroevytlyokrr", "o", "uxvnsasbcrymodi", 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 5635654ef994e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import com.azure.resourcemanager.appcontainers.models.JobExecutionNamesCollection; -import java.nio.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStopMultipleExecutionsMockTests { - @Test - public void testStopMultipleExecutions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"bbnz\",\"id\":\"yknapqofyuicdh\",\"type\":\"dyb\",\"status\":\"Succeeded\",\"startTime\":\"2021-11-26T17:52:15Z\",\"endTime\":\"2021-10-10T21:16:01Z\"},{\"name\":\"dmhm\",\"id\":\"f\",\"type\":\"fmuvapckccr\",\"status\":\"Failed\",\"startTime\":\"2021-07-13T09:03:52Z\",\"endTime\":\"2021-12-04T19:48:14Z\"},{\"name\":\"yukphaimmoiroq\",\"id\":\"shbraga\",\"type\":\"yrmfsvbpav\",\"status\":\"Degraded\",\"startTime\":\"2021-06-03T07:36:41Z\",\"endTime\":\"2021-09-22T17:44:07Z\"}],\"nextLink\":\"nupgahxku\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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( - "rxklobdxnazpmk", - "lmv", - new JobExecutionNamesCollection() - .withValue( - Arrays - .asList( - new JobExecutionBaseInner().withName("xzopjhbzxl").withId("hrdd"), - new JobExecutionBaseInner().withName("fg").withId("ba"))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bbnz", response.value().get(0).name()); - Assertions.assertEquals("yknapqofyuicdh", response.value().get(0).id()); - Assertions.assertEquals("dyb", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T17:52:15Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T21:16:01Z"), 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 e3f5de0b62d8f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.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.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\":[\"gxsabkyq\",\"uujitcjc\"],\"allowedClientApplications\":[\"evndh\",\"rwpdappdsbdkvwrw\",\"feusnhut\",\"eltmrldhugjzzdat\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("gxsabkyq", model.allowedGroups().get(0)); - Assertions.assertEquals("evndh", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("gxsabkyq", "uujitcjc")) - .withAllowedClientApplications( - Arrays.asList("evndh", "rwpdappdsbdkvwrw", "feusnhut", "eltmrldhugjzzdat")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("gxsabkyq", model.allowedGroups().get(0)); - Assertions.assertEquals("evndh", 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 ec11ed4fcf2c9..0000000000000 --- 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\":\"ycy\"}").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/LoginRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java deleted file mode 100644 index 69cc8fb77508c..0000000000000 --- 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\":\"j\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("j", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("j"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("j", 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 05a154978f126..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.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.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\":[\"ktapspwgcuertu\",\"kdosvqw\",\"bmdg\",\"bjf\"]}") - .toObject(LoginScopes.class); - Assertions.assertEquals("ktapspwgcuertu", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("ktapspwgcuertu", "kdosvqw", "bmdg", "bjf")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("ktapspwgcuertu", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java deleted file mode 100644 index 17b7d6a8bdcef..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.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.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Login model = - BinaryData - .fromString( - "{\"routes\":{\"logoutEndpoint\":\"qwpgrjbzn\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"vsnb\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"nmoc\"},\"nonce\":{\"validateNonce\":true,\"nonceExpirationInterval\":\"urzafb\"}}") - .toObject(Login.class); - Assertions.assertEquals("qwpgrjbzn", model.routes().logoutEndpoint()); - Assertions.assertEquals(true, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vsnb", model.allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.cookieExpiration().convention()); - Assertions.assertEquals("nmoc", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(true, model.nonce().validateNonce()); - Assertions.assertEquals("urzafb", model.nonce().nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Login model = - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("qwpgrjbzn")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("vsnb")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("nmoc")) - .withNonce(new Nonce().withValidateNonce(true).withNonceExpirationInterval("urzafb")); - model = BinaryData.fromObject(model).toObject(Login.class); - Assertions.assertEquals("qwpgrjbzn", model.routes().logoutEndpoint()); - Assertions.assertEquals(true, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vsnb", model.allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.cookieExpiration().convention()); - Assertions.assertEquals("nmoc", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(true, model.nonce().validateNonce()); - Assertions.assertEquals("urzafb", model.nonce().nonceExpirationInterval()); - } -} 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 ed47a2f5343dc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.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.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\":{\"emwmdxmebwjs\":\"b\",\"f\":\"jpahlxvea\",\"qcttadijaeukmrsi\":\"xnmwmqtibxyijddt\"}}") - .toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("b", model.tags().get("emwmdxmebwjs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model = - new ManagedCertificatePatch() - .withTags(mapOf("emwmdxmebwjs", "b", "f", "jpahlxvea", "qcttadijaeukmrsi", "xnmwmqtibxyijddt")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("b", model.tags().get("emwmdxmebwjs")); - } - - @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 36c0f82f6bcbc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("jlgvvpase", "sgb", "xantuygdhg", 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 395e22d043b82..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"metadata\":{\"id\":\"geihfql\",\"name\":\"wfiwzcxmj\",\"description\":\"yephmgtvljvrcmyf\",\"author\":\"pgxh\",\"category\":\"omyqwcabvnuileey\",\"supportTopicList\":[],\"analysisTypes\":[],\"type\":\"paugmrmfjlrxwt\",\"score\":38.286144},\"dataset\":[],\"status\":{\"message\":\"vcisiz\",\"statusId\":246607949},\"dataProviderMetadata\":{\"providerName\":\"sx\",\"propertyBag\":[]}},\"id\":\"ive\",\"name\":\"wcgyeewxeiqb\",\"type\":\"smgomguaml\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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( - "ubvphavpmhbrbqgv", "ovpbbttefjoknssq", "zqedikdfrdbi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vcisiz", response.properties().status().message()); - Assertions.assertEquals(246607949, response.properties().status().statusId()); - Assertions.assertEquals("sx", response.properties().dataProviderMetadata().providerName()); - } -} 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 9818be32520d5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests { - @Test - public void testListDetectorsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"wgniipr\",\"name\":\"lvawuwzdufypivls\",\"type\":\"bjpmcubk\"}],\"nextLink\":\"foxx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("ranblwphqlkccu", "gygqwah", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index ac8900e2b3d01..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.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.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; -import java.util.Arrays; - -public final class ManagedEnvironmentStoragesCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"if\",\"name\":\"zhmkdasvflyh\",\"type\":\"xcudchxgsr\"}]}") - .toObject(ManagedEnvironmentStoragesCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentStoragesCollectionInner model = - new ManagedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentStoragesCollectionInner.class); - } -} 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 b65230a4082c7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("nqbnqb", "izxqltgrd", 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 95f78bc13281e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"minimumCount\":620018681,\"maximumCount\":622507993,\"currentCount\":465336840},\"id\":\"xaomzisglrrc\",\"name\":\"ezkhhltnjadhqo\",\"type\":\"wjqo\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("wqagnepzwa", "lsbs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(620018681, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(622507993, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(465336840, 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 8eb183e419374..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("ahxsgxjcmm", "rrscubiwsdrnp", "qwodiffjx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListWithResponseMockTests.java deleted file mode 100644 index 2cbadb2b2de4d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStoragesCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsStoragesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"czhupeukni\",\"name\":\"d\",\"type\":\"y\"},{\"id\":\"pydjfboc\",\"name\":\"v\",\"type\":\"hulrtywikdmhla\"},{\"id\":\"lgbhgauacdi\",\"name\":\"mxu\",\"type\":\"rs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedEnvironmentStoragesCollection response = - manager - .managedEnvironmentsStorages() - .listWithResponse("pmvssehaep", "a", com.azure.core.util.Context.NONE) - .getValue(); - } -} 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 5207d34bb8f1d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.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.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\":\"24eebd10-bf80-4224-a885-dc9084199200\",\"tenantId\":\"3c475488-292b-422c-81d4-240c0898d233\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"cjhwq\":{\"principalId\":\"fcd4ddb6-77d0-4861-9a96-0c321ff8271d\",\"clientId\":\"43c0c199-a1e9-4807-84d3-a12f37c5fbfe\"},\"r\":{\"principalId\":\"d8346bc1-ffe5-4f69-b84d-b7ac8ad8a9c5\",\"clientId\":\"667b8c4d-698b-4d40-b6bc-9beef6128b9c\"},\"wj\":{\"principalId\":\"9602c6fb-0ebf-4759-9052-e11914dd8bd4\",\"clientId\":\"79d13a9b-ad01-41f8-993a-83d259b301d4\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "cjhwq", - new UserAssignedIdentity(), - "r", - new UserAssignedIdentity(), - "wj", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @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/NamespacesCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 67ede25741de6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -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.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NamespacesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"fhfv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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( - "pdwwexymzvlazi", - "bhpwvqsgnyy", - new CheckNameAvailabilityRequest().withName("ziven").withType("pmeyyvpkpatlbijp"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("fhfv", response.message()); - } -} 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 60b177abfdfd9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.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.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\":\"ljavbqid\"}") - .toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("ljavbqid", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("ljavbqid"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("ljavbqid", 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 a8c85b13bc5a3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.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.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\":\"jtckwhdso\",\"scopes\":[\"yip\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("jtckwhdso", model.nameClaimType()); - Assertions.assertEquals("yip", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model = - new OpenIdConnectLogin().withNameClaimType("jtckwhdso").withScopes(Arrays.asList("yip")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("jtckwhdso", model.nameClaimType()); - Assertions.assertEquals("yip", 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 a4775e0a7ad4d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.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.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\":\"uutlwxezwzhok\",\"isDataAction\":true,\"display\":{\"provider\":\"htqlgehgpp\",\"resource\":\"ifhpf\",\"operation\":\"ajvgcxtxjcsheafi\",\"description\":\"tugsresmkssjh\"},\"origin\":\"ftxfkf\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("uutlwxezwzhok", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("htqlgehgpp", model.display().provider()); - Assertions.assertEquals("ifhpf", model.display().resource()); - Assertions.assertEquals("ajvgcxtxjcsheafi", model.display().operation()); - Assertions.assertEquals("tugsresmkssjh", model.display().description()); - Assertions.assertEquals("ftxfkf", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = - new OperationDetailInner() - .withName("uutlwxezwzhok") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("htqlgehgpp") - .withResource("ifhpf") - .withOperation("ajvgcxtxjcsheafi") - .withDescription("tugsresmkssjh")) - .withOrigin("ftxfkf"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("uutlwxezwzhok", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("htqlgehgpp", model.display().provider()); - Assertions.assertEquals("ifhpf", model.display().resource()); - Assertions.assertEquals("ajvgcxtxjcsheafi", model.display().operation()); - Assertions.assertEquals("tugsresmkssjh", model.display().description()); - Assertions.assertEquals("ftxfkf", 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 267cda1225962..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.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.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\":\"gpr\",\"resource\":\"tillucbiqtg\",\"operation\":\"ohmcwsld\",\"description\":\"zetpwbra\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("gpr", model.provider()); - Assertions.assertEquals("tillucbiqtg", model.resource()); - Assertions.assertEquals("ohmcwsld", model.operation()); - Assertions.assertEquals("zetpwbra", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("gpr") - .withResource("tillucbiqtg") - .withOperation("ohmcwsld") - .withDescription("zetpwbra"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("gpr", model.provider()); - Assertions.assertEquals("tillucbiqtg", model.resource()); - Assertions.assertEquals("ohmcwsld", model.operation()); - Assertions.assertEquals("zetpwbra", 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 8cff9abd9b161..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"aoypny\",\"isDataAction\":true,\"display\":{\"provider\":\"cyl\",\"resource\":\"gmnsghpxy\",\"operation\":\"hdrwjjkh\",\"description\":\"omacluzvxnqmhr\"},\"origin\":\"pd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("aoypny", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("cyl", response.iterator().next().display().provider()); - Assertions.assertEquals("gmnsghpxy", response.iterator().next().display().resource()); - Assertions.assertEquals("hdrwjjkh", response.iterator().next().display().operation()); - Assertions.assertEquals("omacluzvxnqmhr", response.iterator().next().display().description()); - Assertions.assertEquals("pd", response.iterator().next().origin()); - } -} 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 620c5f2053bcd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.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.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import java.util.Arrays; - -public final class ReplicaCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-08-22T14:57:30Z\",\"containers\":[]},\"id\":\"yxcdyuibhmfdnbzy\",\"name\":\"vfvfcj\",\"type\":\"aeoisrvh\"},{\"properties\":{\"createdTime\":\"2021-04-23T05:38:58Z\",\"containers\":[]},\"id\":\"ukiscvwmzhw\",\"name\":\"lefaxvxilcbtgn\",\"type\":\"nzeyqxtjj\"},{\"properties\":{\"createdTime\":\"2021-06-09T05:30:24Z\",\"containers\":[]},\"id\":\"ycavodggxdbees\",\"name\":\"ieknl\",\"type\":\"ariaawi\"}]}") - .toObject(ReplicaCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaCollectionInner model = - new ReplicaCollectionInner() - .withValue( - Arrays - .asList( - new ReplicaInner().withContainers(Arrays.asList()), - new ReplicaInner().withContainers(Arrays.asList()), - new ReplicaInner().withContainers(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - } -} 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 db7ff35ded98c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.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.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\":\"u\",\"containerId\":\"prafwgckhoc\",\"ready\":false,\"started\":false,\"restartCount\":2112438286,\"logStreamEndpoint\":\"fqroudas\",\"execEndpoint\":\"vehhrvkbunzozu\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("u", model.name()); - Assertions.assertEquals("prafwgckhoc", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(2112438286, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = - new ReplicaContainer() - .withName("u") - .withContainerId("prafwgckhoc") - .withReady(false) - .withStarted(false) - .withRestartCount(2112438286); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("u", model.name()); - Assertions.assertEquals("prafwgckhoc", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(2112438286, 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 41ff194fdc51c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.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.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-12-02T10:26:58Z\",\"containers\":[{\"name\":\"slevufuztc\",\"containerId\":\"yhjtqedcgzu\",\"ready\":false,\"started\":false,\"restartCount\":201174669,\"logStreamEndpoint\":\"rr\",\"execEndpoint\":\"pglydz\"},{\"name\":\"rvqeevtoepryutn\",\"containerId\":\"tpzdmovzvfvaawzq\",\"ready\":false,\"started\":true,\"restartCount\":318308535,\"logStreamEndpoint\":\"iglaecx\",\"execEndpoint\":\"t\"},{\"name\":\"okpvzm\",\"containerId\":\"t\",\"ready\":true,\"started\":false,\"restartCount\":456968385,\"logStreamEndpoint\":\"irclnpk\",\"execEndpoint\":\"ayzri\"},{\"name\":\"hya\",\"containerId\":\"vjlboxqvk\",\"ready\":false,\"started\":false,\"restartCount\":715260705,\"logStreamEndpoint\":\"ynhdwdigum\",\"execEndpoint\":\"raauzzpt\"}]},\"id\":\"zysdzh\",\"name\":\"zwwva\",\"type\":\"qyuvvfonkp\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("slevufuztc", model.containers().get(0).name()); - Assertions.assertEquals("yhjtqedcgzu", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(201174669, model.containers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("slevufuztc") - .withContainerId("yhjtqedcgzu") - .withReady(false) - .withStarted(false) - .withRestartCount(201174669), - new ReplicaContainer() - .withName("rvqeevtoepryutn") - .withContainerId("tpzdmovzvfvaawzq") - .withReady(false) - .withStarted(true) - .withRestartCount(318308535), - new ReplicaContainer() - .withName("okpvzm") - .withContainerId("t") - .withReady(true) - .withStarted(false) - .withRestartCount(456968385), - new ReplicaContainer() - .withName("hya") - .withContainerId("vjlboxqvk") - .withReady(false) - .withStarted(false) - .withRestartCount(715260705))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("slevufuztc", model.containers().get(0).name()); - Assertions.assertEquals("yhjtqedcgzu", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(201174669, model.containers().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 04929bf1a0636..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.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.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\":\"2020-12-22T06:34:17Z\",\"containers\":[{\"name\":\"vyl\",\"containerId\":\"yavluwmncstt\",\"ready\":false,\"started\":true,\"restartCount\":387251402,\"logStreamEndpoint\":\"ekrsgs\",\"execEndpoint\":\"dhuzqgnjdgk\"},{\"name\":\"scliq\",\"containerId\":\"vhxnk\",\"ready\":true,\"started\":false,\"restartCount\":1432155819,\"logStreamEndpoint\":\"ppnvdxz\",\"execEndpoint\":\"ihfrbbcevqa\"},{\"name\":\"ltd\",\"containerId\":\"fkqojpy\",\"ready\":false,\"started\":true,\"restartCount\":1334213198,\"logStreamEndpoint\":\"ifmzzsd\",\"execEndpoint\":\"brn\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("vyl", model.containers().get(0).name()); - Assertions.assertEquals("yavluwmncstt", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(387251402, model.containers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = - new ReplicaProperties() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("vyl") - .withContainerId("yavluwmncstt") - .withReady(false) - .withStarted(true) - .withRestartCount(387251402), - new ReplicaContainer() - .withName("scliq") - .withContainerId("vhxnk") - .withReady(true) - .withStarted(false) - .withRestartCount(1432155819), - new ReplicaContainer() - .withName("ltd") - .withContainerId("fkqojpy") - .withReady(false) - .withStarted(true) - .withRestartCount(1334213198))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("vyl", model.containers().get(0).name()); - Assertions.assertEquals("yavluwmncstt", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(387251402, model.containers().get(0).restartCount()); - } -} 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 68b07fb16f3fe..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.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.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-06-23T01:08:47Z\",\"lastActiveTime\":\"2021-10-13T12:53:05Z\",\"fqdn\":\"ukxit\",\"active\":false,\"replicas\":451636472,\"trafficWeight\":256938636,\"provisioningError\":\"hrnxrxc\",\"healthState\":\"Healthy\",\"provisioningState\":\"Deprovisioning\"},\"id\":\"vokqdzfv\",\"name\":\"zivj\",\"type\":\"frqttbajlkatnw\"},{\"properties\":{\"createdTime\":\"2021-06-16T21:46:54Z\",\"lastActiveTime\":\"2021-01-10T23:20:49Z\",\"fqdn\":\"kqqfk\",\"active\":true,\"replicas\":71458526,\"trafficWeight\":1380729071,\"provisioningError\":\"igovi\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioned\"},\"id\":\"loazuruocbgoo\",\"name\":\"bteoybf\",\"type\":\"jxakv\"},{\"properties\":{\"createdTime\":\"2021-04-09T20:03:34Z\",\"lastActiveTime\":\"2021-07-01T03:09:37Z\",\"fqdn\":\"dilmyww\",\"active\":false,\"replicas\":583525950,\"trafficWeight\":1117648712,\"provisioningError\":\"abgyvudt\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioned\"},\"id\":\"ihxuuwh\",\"name\":\"j\",\"type\":\"xccybvpa\"},{\"properties\":{\"createdTime\":\"2021-11-06T02:11:56Z\",\"lastActiveTime\":\"2021-10-08T16:55:36Z\",\"fqdn\":\"px\",\"active\":false,\"replicas\":704877183,\"trafficWeight\":167130524,\"provisioningError\":\"tcyohpfkyrk\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioning\"},\"id\":\"gsj\",\"name\":\"mnwqj\",\"type\":\"obaiyhddviaceg\"}],\"nextLink\":\"m\"}") - .toObject(RevisionCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionCollection model = - new RevisionCollection() - .withValue( - Arrays.asList(new RevisionInner(), new RevisionInner(), 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/RevisionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java deleted file mode 100644 index debbe03a2b554..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.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.RevisionInner; - -public final class RevisionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RevisionInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-02-23T02:35:37Z\",\"lastActiveTime\":\"2021-04-21T01:27:36Z\",\"fqdn\":\"emfnczdwvvbal\",\"template\":{\"revisionSuffix\":\"lchpodbzevwrdn\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":1208732585,\"trafficWeight\":195968189,\"provisioningError\":\"tuluq\",\"healthState\":\"Healthy\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"er\",\"name\":\"hp\",\"type\":\"bm\"}") - .toObject(RevisionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionInner model = new RevisionInner(); - model = BinaryData.fromObject(model).toObject(RevisionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java deleted file mode 100644 index 742420eaf4f31..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScaleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Scale model = - BinaryData - .fromString( - "{\"minReplicas\":1591182394,\"maxReplicas\":235845887,\"rules\":[{\"name\":\"utncorm\",\"azureQueue\":{\"queueName\":\"qtvcofudflvkgj\",\"queueLength\":1622767746,\"auth\":[]},\"custom\":{\"type\":\"nqvsaznqnto\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}},{\"name\":\"yc\",\"azureQueue\":{\"queueName\":\"uwjuetaeburuvdmo\",\"queueLength\":293180976,\"auth\":[]},\"custom\":{\"type\":\"wabm\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}}]}") - .toObject(Scale.class); - Assertions.assertEquals(1591182394, model.minReplicas()); - Assertions.assertEquals(235845887, model.maxReplicas()); - Assertions.assertEquals("utncorm", model.rules().get(0).name()); - Assertions.assertEquals("qtvcofudflvkgj", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1622767746, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("nqvsaznqnto", model.rules().get(0).custom().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Scale model = - new Scale() - .withMinReplicas(1591182394) - .withMaxReplicas(235845887) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("utncorm") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("qtvcofudflvkgj") - .withQueueLength(1622767746) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule() - .withType("nqvsaznqnto") - .withMetadata(mapOf()) - .withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())), - new ScaleRule() - .withName("yc") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("uwjuetaeburuvdmo") - .withQueueLength(293180976) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule() - .withType("wabm") - .withMetadata(mapOf()) - .withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(Scale.class); - Assertions.assertEquals(1591182394, model.minReplicas()); - Assertions.assertEquals(235845887, model.maxReplicas()); - Assertions.assertEquals("utncorm", model.rules().get(0).name()); - Assertions.assertEquals("qtvcofudflvkgj", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1622767746, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("nqvsaznqnto", model.rules().get(0).custom().type()); - } - - @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/SourceControlCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java deleted file mode 100644 index aba3c13afc4f9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.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.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.SourceControlCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SourceControlCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SourceControlCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"operationState\":\"Succeeded\",\"repoUrl\":\"qucwyhahnom\",\"branch\":\"kywuhpsvfuu\"},\"id\":\"lwexxwl\",\"name\":\"lniexz\",\"type\":\"rzpgep\"},{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"wwpgdakchzyvlixq\",\"branch\":\"kcxk\"},\"id\":\"nxm\",\"name\":\"suxswqrntvlwijp\",\"type\":\"ttexoqqpwcyyufmh\"},{\"properties\":{\"operationState\":\"Succeeded\",\"repoUrl\":\"wmqs\",\"branch\":\"cdqzhlctddu\"},\"id\":\"dyfpchrqbnj\",\"name\":\"rcgegydcwboxjum\",\"type\":\"qqoli\"}],\"nextLink\":\"raiouaubrjtl\"}") - .toObject(SourceControlCollection.class); - Assertions.assertEquals("qucwyhahnom", model.value().get(0).repoUrl()); - Assertions.assertEquals("kywuhpsvfuu", model.value().get(0).branch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SourceControlCollection model = - new SourceControlCollection() - .withValue( - Arrays - .asList( - new SourceControlInner().withRepoUrl("qucwyhahnom").withBranch("kywuhpsvfuu"), - new SourceControlInner().withRepoUrl("wwpgdakchzyvlixq").withBranch("kcxk"), - new SourceControlInner().withRepoUrl("wmqs").withBranch("cdqzhlctddu"))); - model = BinaryData.fromObject(model).toObject(SourceControlCollection.class); - Assertions.assertEquals("qucwyhahnom", model.value().get(0).repoUrl()); - Assertions.assertEquals("kywuhpsvfuu", model.value().get(0).branch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java deleted file mode 100644 index 9e7c99227944b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.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.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class SourceControlInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SourceControlInner model = - BinaryData - .fromString( - "{\"properties\":{\"operationState\":\"Failed\",\"repoUrl\":\"oj\",\"branch\":\"giflrzpasccbiu\",\"githubActionConfiguration\":{\"contextPath\":\"yjdfqwmky\",\"image\":\"ufdvruz\",\"publishType\":\"zojhpctfnmd\",\"os\":\"tngfdgugeyzihgr\",\"runtimeStack\":\"ui\",\"runtimeVersion\":\"bsnmfpph\"}},\"id\":\"eevy\",\"name\":\"yhsgz\",\"type\":\"czbgomfgbeg\"}") - .toObject(SourceControlInner.class); - Assertions.assertEquals("oj", model.repoUrl()); - Assertions.assertEquals("giflrzpasccbiu", model.branch()); - Assertions.assertEquals("yjdfqwmky", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("ufdvruz", model.githubActionConfiguration().image()); - Assertions.assertEquals("zojhpctfnmd", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("tngfdgugeyzihgr", model.githubActionConfiguration().os()); - Assertions.assertEquals("ui", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("bsnmfpph", model.githubActionConfiguration().runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SourceControlInner model = - new SourceControlInner() - .withRepoUrl("oj") - .withBranch("giflrzpasccbiu") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("yjdfqwmky") - .withImage("ufdvruz") - .withPublishType("zojhpctfnmd") - .withOs("tngfdgugeyzihgr") - .withRuntimeStack("ui") - .withRuntimeVersion("bsnmfpph")); - model = BinaryData.fromObject(model).toObject(SourceControlInner.class); - Assertions.assertEquals("oj", model.repoUrl()); - Assertions.assertEquals("giflrzpasccbiu", model.branch()); - Assertions.assertEquals("yjdfqwmky", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("ufdvruz", model.githubActionConfiguration().image()); - Assertions.assertEquals("zojhpctfnmd", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("tngfdgugeyzihgr", model.githubActionConfiguration().os()); - Assertions.assertEquals("ui", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("bsnmfpph", model.githubActionConfiguration().runtimeVersion()); - } -} 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 91e9c07fa1aaa..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.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.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\":\"cpdggkzzlvmbmp\",\"weight\":2116317811,\"latestRevision\":false,\"label\":\"vuefywsbpfvmwyh\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("cpdggkzzlvmbmp", model.revisionName()); - Assertions.assertEquals(2116317811, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("vuefywsbpfvmwyh", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = - new TrafficWeight() - .withRevisionName("cpdggkzzlvmbmp") - .withWeight(2116317811) - .withLatestRevision(false) - .withLabel("vuefywsbpfvmwyh"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("cpdggkzzlvmbmp", model.revisionName()); - Assertions.assertEquals(2116317811, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("vuefywsbpfvmwyh", model.label()); - } -} 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 20660bae53c83..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.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.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"5e001e1e-765d-4075-8582-42bb83913ac9\",\"clientId\":\"3ea212a6-f110-4c99-8cbd-7003ba82190a\"}") - .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 6070a1a5bf75d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.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.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\":\"tgsfja\",\"dockerBridgeCidr\":\"slhhxudbxv\",\"platformReservedCidr\":\"htnsi\",\"platformReservedDnsIP\":\"dhzmmesckdlp\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("tgsfja", model.infrastructureSubnetId()); - Assertions.assertEquals("slhhxudbxv", model.dockerBridgeCidr()); - Assertions.assertEquals("htnsi", model.platformReservedCidr()); - Assertions.assertEquals("dhzmmesckdlp", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = - new VnetConfiguration() - .withInternal(true) - .withInfrastructureSubnetId("tgsfja") - .withDockerBridgeCidr("slhhxudbxv") - .withPlatformReservedCidr("htnsi") - .withPlatformReservedDnsIp("dhzmmesckdlp"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("tgsfja", model.infrastructureSubnetId()); - Assertions.assertEquals("slhhxudbxv", model.dockerBridgeCidr()); - Assertions.assertEquals("htnsi", model.platformReservedCidr()); - Assertions.assertEquals("dhzmmesckdlp", 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 80a8f3e04bfae..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.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.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\":\"areqna\",\"mountPath\":\"qugjhkycube\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("areqna", model.volumeName()); - Assertions.assertEquals("qugjhkycube", model.mountPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model = new VolumeMount().withVolumeName("areqna").withMountPath("qugjhkycube"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("areqna", model.volumeName()); - Assertions.assertEquals("qugjhkycube", model.mountPath()); - } -} 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 df9fddf7e793b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.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.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\":2043816183,\"maximumCount\":1103748423,\"currentCount\":1089629771},\"id\":\"amqu\",\"name\":\"iosrsjuivfcdis\",\"type\":\"irnxz\"},{\"properties\":{\"minimumCount\":1330444310,\"maximumCount\":1780974098,\"currentCount\":1436327406},\"id\":\"ujrtrhqvwr\",\"name\":\"vk\",\"type\":\"gnl\"},{\"properties\":{\"minimumCount\":1572707089,\"maximumCount\":118723047,\"currentCount\":1684987702},\"id\":\"qywncvjtsz\",\"name\":\"ofizehtdhgbj\",\"type\":\"vreljea\"}],\"nextLink\":\"rvzmlovuana\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(2043816183, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1103748423, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(1089629771, 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(2043816183) - .withMaximumCount(1103748423) - .withCurrentCount(1089629771)), - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1330444310) - .withMaximumCount(1780974098) - .withCurrentCount(1436327406)), - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1572707089) - .withMaximumCount(118723047) - .withCurrentCount(1684987702)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(2043816183, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1103748423, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(1089629771, 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 e15f71e363afd..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.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.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\":842063408,\"maximumCount\":1640256851,\"currentCount\":1918007053},\"id\":\"rbdkelvidiz\",\"name\":\"zsdbccxjmon\",\"type\":\"dgnwncypuuwwlt\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(842063408, model.properties().minimumCount()); - Assertions.assertEquals(1640256851, model.properties().maximumCount()); - Assertions.assertEquals(1918007053, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model = - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(842063408) - .withMaximumCount(1640256851) - .withCurrentCount(1918007053)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(842063408, model.properties().minimumCount()); - Assertions.assertEquals(1640256851, model.properties().maximumCount()); - Assertions.assertEquals(1918007053, 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 4b173545ef43e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.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.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\":740306752,\"maximumCount\":1798680046,\"currentCount\":1231214883}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(740306752, model.minimumCount()); - Assertions.assertEquals(1798680046, model.maximumCount()); - Assertions.assertEquals(1231214883, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = - new WorkloadProfileStatesProperties() - .withMinimumCount(740306752) - .withMaximumCount(1798680046) - .withCurrentCount(1231214883); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(740306752, model.minimumCount()); - Assertions.assertEquals(1798680046, model.maximumCount()); - Assertions.assertEquals(1231214883, 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 17270e61d7974..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.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.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\":\"oylaxxul\",\"workloadProfileType\":\"disdosfjbjsvgj\",\"minimumCount\":1257369093,\"maximumCount\":1647149514}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("oylaxxul", model.name()); - Assertions.assertEquals("disdosfjbjsvgj", model.workloadProfileType()); - Assertions.assertEquals(1257369093, model.minimumCount()); - Assertions.assertEquals(1647149514, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = - new WorkloadProfile() - .withName("oylaxxul") - .withWorkloadProfileType("disdosfjbjsvgj") - .withMinimumCount(1257369093) - .withMaximumCount(1647149514); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("oylaxxul", model.name()); - Assertions.assertEquals("disdosfjbjsvgj", model.workloadProfileType()); - Assertions.assertEquals(1257369093, model.minimumCount()); - Assertions.assertEquals(1647149514, model.maximumCount()); - } -}